From owner-freebsd-hackers Wed Nov 5 12:22:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA04780 for hackers-outgoing; Wed, 5 Nov 1997 12:22:09 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from monk.via.net (monk.via.net [140.174.204.10]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id MAA04768 for ; Wed, 5 Nov 1997 12:21:55 -0800 (PST) (envelope-from joe@via.net) Received: (from joe@localhost) by monk.via.net (8.6.11/8.6.12) id MAA27359 for hackers@freebsd.org; Wed, 5 Nov 1997 12:11:32 -0800 Date: Wed, 5 Nov 1997 12:11:32 -0800 From: Joe McGuckin Message-Id: <199711052011.MAA27359@monk.via.net> To: hackers@freebsd.org Subject: 'sys' is consuming %50 of cpu X-Sun-Charset: US-ASCII Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I've got a web server that was just upgraded to a 300Mhz Pentium II. Now the load average is down to a more manageable '20'. This machine has around 3K tcp connections to it according to netstat. Here they are listed by type: CLOSE_WAIT 5 LAST_ACK 25 ESTABLISHED 443 SYN_RCVD 59 FIN_WAIT_1 341 LISTEN 1 TIME_WAIT 723 FIN_WAIT_2 1716 CLOSING 29 One thing I've noticed is that vmstat reports that the kernel is using over 50% of the cpu: procs memory page disks faults cpu r b w avm fre flt re pi po fr sr s0 s1 in sy cs us sy id 63 1 0469488 46096 303 0 0 0 260 110 3 46 1339 4284 2445 16 54 30 31 1 0470192 45084 370 0 0 0 253 0 0 23 1572 5277 3150 13 87 0 60 1 0469216 43668 530 0 0 0 380 0 2 32 1574 5162 2172 17 83 0 50 7 0468076 41548 465 0 0 0 348 0 12 73 1561 5172 2203 15 85 0 5535 0472800 39856 384 0 0 0 203 0 0 163 1588 4749 1836 13 87 0 7511 0476216 38988 776 0 0 0 514 0 0 96 1595 5835 2150 24 74 2 5 1 0479988 39852 596 0 0 0 598 0 0 33 1731 6267 3114 20 80 0 ---------------------------------------------------------------------------------- 2 users Load 18.18 12.81 13.37 Wed Nov 5 11:53 Mem:KB 3112 1108 464516 1316 41264 VN PAGER SWAP PAGER 54716 1976 3927692 8464 Free in out in out Act 111568 1108 466136 1316 49780 count 86 All 247736 1980 3942260 8556 pages 163 358 75 3420 3024 485 5417 1359 198 346 59600 cow Interrupts Proc:r p d s w Csw Trp Sys Int Sof Flt 49884 zfod 1336 total 64.5%Sys 17.3%Intr 16.44 509 4984 1336 1.99 374 59180 wire 092 clk0 irq0 139168 act 38 rtc0 irq8 68.0%Sys 16.4%Intr 14.=========+++++++++>>>>>>> 2096 inact 1082 pci irq10 | | | | | | | | | | 40704 cache 26 pci irq11 ==================================++++++++>>>>>> 9245 free fdc0 irq6 daefr sc0 irq1 20669 14385 70 35 0 213 prcfr Calls hits % hits % react 16645 12251 74 32 0 pdwake 38 1 pdpgs Discs sd 38 intrn seeks 1 254 8345 buf xfers 26 blks 1 193 msps ------------------------------------------------------------------------------------ Is there anything I can do to reduce the amount of cpu the kernel is using? With this many network connections, would I gain anything by making the TCBHASHSIZE larger? What about turning off FAILSAFE? Would that make a noticable difference? Also, the ethernet card I'm using is a 100mb 3COM (VX driver). I notice that the man page for the vx driver implies that this card is a poor performer. Is that still true? What card should I get? Thanks! Joe