LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 11-17-2009, 10:31 AM   #1
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Squid "slowness"; CPU 100% used :/


Hello,

I've set up a squid server to use as a proxy (with various ACLs). During testing (with just me on the server) and the CPU is 100% utilized and the internet seems "slow" (well I know the end users will say as such)...

Here is what I got...
Code:
[root@squid1 squid]# cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 2
model name      : QEMU Virtual CPU version 0.9.0
stepping        : 3
cpu MHz         : 3000.156
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm up nonstop_tsc pni
bogomips        : 6000.31

[root@squid1 squid]# free -mo
             total       used       free     shared    buffers     cached
Mem:          2004        782       1222          0        121        295
Swap:         2047          0       2047
Ok okay...I know what you're going to say...BUT before you say ANYTHING remember that squid does NOT support SMP (i.e. no matter how many processors I have it will still only use 1)

And as you can see memory is not an issue...PLUS it's just ME on the server....

So before you say "throw more hardware" at it...why would it be slow if it's only serving me?

-C
 
Old 11-17-2009, 10:40 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Did you run top to see what is eating cpu cycles? Do you know for sure it is squid or something else?

Also, from your posting it appears you're running squid on a virtual machine via QEMU. If so, is there a way to "tune" QEMU to improve performance? I haven't worked much with virtual machines, so I'm just throwing this out there.
 
Old 11-17-2009, 12:41 PM   #3
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979

Original Poster
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by pljvaldez View Post
Did you run top to see what is eating cpu cycles? Do you know for sure it is squid or something else?

Also, from your posting it appears you're running squid on a virtual machine via QEMU. If so, is there a way to "tune" QEMU to improve performance? I haven't worked much with virtual machines, so I'm just throwing this out there.
Code:
Tasks:  78 total,   2 running,  76 sleeping,   0 stopped,   0 zombie
Cpu(s): 93.1%us,  1.3%sy,  0.0%ni,  5.2%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st
Mem:   2052112k total,   804548k used,  1247564k free,   128996k buffers
Swap:  2097144k total,        0k used,  2097144k free,   303384k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                  
14594 squid     25   0  248m 244m 2288 R 92.7 12.2  74:33.87 squid                                                                                    
22490 chrish    15   0  6020 1696 1272 R  1.6  0.1   0:00.25 top                                                                                      
 1709 root      15   0  1972  636  556 S  0.3  0.0   1:12.17 hald-addon-stor                                                                          
 1755 root      25   0 46888 3036 2212 S  0.3  0.1   0:47.12 automount                                                                                
    1 root      15   0  2068  632  540 S  0.0  0.0   0:01.87 init                                                                                     
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0                                                                              
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0                                                                              
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0                                                                               
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.04 events/0                                                                                 
    6 root      10  -5     0    0    0 S  0.0  0.0   0:00.01 khelper                                                                                  
    7 root      10  -5     0    0    0 S  0.0  0.0   0:00.01 kthread                                                                                  
   10 root      10  -5     0    0    0 S  0.0  0.0   0:02.41 kblockd/0                                                                                
   11 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 cqueue/0                                                                                 
   14 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khubd                                                                                    
   16 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod                                                                                  
   43 root      15   0     0    0    0 S  0.0  0.0   0:01.37 kapmd                                                                                    
   88 root      25   0     0    0    0 S  0.0  0.0   0:00.00 pdflush                                                                                  
   89 root      15   0     0    0    0 S  0.0  0.0   0:05.77 pdflush                                                                                  
   90 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 kswapd0                                                                                  
   91 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0                                                                                    
  246 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 kpsmoused                                                                                
  271 root      12  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0                                                                                    
  272 root      12  -5     0    0    0 S  0.0  0.0   0:00.00 ata_aux                                                                                  
  277 root      13  -5     0    0    0 S  0.0  0.0   0:00.00 kstriped                                                                                 
  286 root      14  -5     0    0    0 S  0.0  0.0   0:00.00 ksnapd                                                                                   
  297 root      10  -5     0    0    0 S  0.0  0.0   0:04.00 kjournald                                                                                
  323 root      10  -5     0    0    0 S  0.0  0.0   0:00.17 kauditd                                                                                  
  356 root      18  -4  2472  932  388 S  0.0  0.0   0:00.83 udevd                                                                                    
  951 root      12  -5     0    0    0 S  0.0  0.0   0:00.00 kmpathd/0                                                                                
  952 root      12  -5     0    0    0 S  0.0  0.0   0:00.00 kmpath_handlerd
Looks like it's just squid...

I wonder if I CAN tune qemu...do you know how that's done?
 
Old 11-17-2009, 12:53 PM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Out of my depth on the VM aspect here, but this isn't just a case of the VM only getting out this much time because it only wants to use this much time, is it?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Measure "CPU load" and "memory consumption" of a process DaneelGiskard Programming 3 08-30-2007 11:43 AM
Generate alert with "CPU load average" "CPU utilization" viky Linux - Hardware 3 07-25-2007 04:24 AM
Alert used "cpu load" and "cpu utilization" viky General 0 07-23-2007 03:19 AM
"User" & "System" CPU load difference JJX Linux - General 3 06-06-2004 01:42 AM
Why is "whiptail" using 80-100% of my CPU? wylum Linux - Newbie 2 02-19-2004 08:16 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 06:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration