%cpu in system - squid performance in FreeBSD 5.3

Jeff Behl jbehl at fastclick.com
Tue Dec 7 09:15:43 PST 2004

I upgraded to STABLE but  most cpu time is still being spent in system.  
This system is doing ~20Mb/s total with all content being grabbed out of 
memory.  I see similar results when running MySQL (a lot of time being 
spent in system)

Any ideas on what updates to be on the lookout for that might help with 
this?  Am I right in guessing that this is a SMP issue and doesn't have 
anything to do with AMD architecture?


FreeBSD www2 5.3-STABLE FreeBSD 5.3-STABLE #2: Sun Dec  5 21:06:14 PST 
2004     root at www2.cdn.sjc:/usr/obj/usr/src/sys/SMP  amd64

last pid: 15702;  load averages:  0.15,  0.31,  0.31                up 
0+19:55:14  09:09:28
38 processes:  2 running, 36 sleeping
CPU states:  5.4% user,  0.0% nice, 12.7% system,  3.4% interrupt, 78.4% 
Mem: 163M Active, 284M Inact, 193M Wired, 72K Cache, 214M Buf, 1245M Free
Swap: 4069M Total, 4069M Free

  486 squid     96    0 79820K 73996K CPU1   1 110:00 15.04% 15.04% squid
  480 squid     96    0 75804K 70012K select 0 105:56 14.89% 14.89% squid

Sean Chittenden wrote:

>> but the % system time can fluctuate up to 60 at times.  My question is
>> if this is about the type of performance I could expect, or if people
>> have seen better.
> I don't know about other people, but I suspect you're running into 
> lock contention.  Try using a post 5.3 snapshot (something from 
> RELENG_5) since alc@ has set debug.mpsafevm=1, which lets many calls 
> to the VM run without GIANT, which I suspect is your problem and why 
> the system usage is all over the place.  -sc

More information about the freebsd-performance mailing list