From owner-freebsd-stable@FreeBSD.ORG Mon Nov 19 16:04:57 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECC6016A505; Mon, 19 Nov 2007 16:04:57 +0000 (UTC) (envelope-from lol@chistydom.ru) Received: from hermes.hw.ru (hermes.hw.ru [80.68.240.91]) by mx1.freebsd.org (Postfix) with ESMTP id 15A7413C457; Mon, 19 Nov 2007 16:04:56 +0000 (UTC) (envelope-from lol@chistydom.ru) Received: from [80.68.244.40] (account a_popov@rbc.ru [80.68.244.40] verified) by hermes.hw.ru (CommuniGate Pro SMTP 5.0.13) with ESMTPA id 201299938; Mon, 19 Nov 2007 19:03:44 +0300 Message-ID: <4741B3DE.2000009@chistydom.ru> Date: Mon, 19 Nov 2007 19:03:42 +0300 From: Alexey Popov User-Agent: Thunderbird 2.0.0.6 (X11/20070924) MIME-Version: 1.0 To: Ivan Voras References: <4741905E.8050300@chistydom.ru> <47419AB3.5030008@chistydom.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: 2 x quad-core system is slower that 2 x dual core on FreeBSD X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2007 16:04:58 -0000 Hi. Ivan Voras wrote: >> last pid: 5266; load averages: 24.67, 22.65, 17.44 up 0+03:56:38 >> 121 processes: 41 running, 62 sleeping, 18 waiting >> CPU states: 9.5% user, 0.0% nice, 82.0% system, 0.5% interrupt, 8.0% >> idle > This is really unusual - the number of processes is not that high, but > if I'm reading the line from systat correctly, you have unusually many > context switches: > r p d s w Csw Trp Sys Int Sof Flt cow 16839 total > 27 1 39 137k 3390 33k 2490 313 2519 2519 zfod > sio0 irq4 > nginx or similar asynchronous web servers should reduce inter-process > contention context switches dramatically, but you say that it didn't > work as such so the problem might be somewhere else. > Try sending a 10-second or so output from vmstat to confirm this problem. Yes, there's really many context switches: %vmstat 1 procs memory page disk faults cpu r b w avm fre flt re pi po fr sr mf0 in sy cs us sy id 23 1 0 615284 3581456 15980 0 0 0 15964 0 0 1414 58211 115230 25 60 15 24 0 0 631668 3564976 9940 0 0 0 5793 0 0 664 30036 158059 11 79 10 20 0 0 655220 3545516 22146 0 0 0 16731 0 0 1992 77638 116627 31 65 4 23 0 0 622452 3579700 18248 0 0 0 27451 0 0 1839 80646 115798 38 59 3 15 9 0 614260 3587484 4795 0 0 0 6765 0 0 352 23938 159993 6 83 11 21 0 0 625524 3567948 10154 0 0 0 5308 0 0 653 32718 159119 11 81 8 13 3 0 627572 3571924 15266 0 0 0 16278 0 0 1031 50321 142111 20 69 11 21 0 0 605044 3591860 9008 0 0 0 14021 0 0 873 42083 160441 13 79 8 19 1 0 611188 3593404 7498 0 0 0 7920 0 0 489 30012 158176 10 77 13 24 0 0 610164 3592360 5855 0 0 0 5602 0 0 666 26627 162937 8 81 11 20 3 0 622452 3587456 6372 0 0 0 5144 0 0 362 23705 161257 10 81 10 ^C % > If you can, attach a ktrace(1) to one of the httpd processes that > consumes CPU, and send the processed kdump output. Here is it: http://83.167.98.162/gprof/kdump.txt.gz > Also, did you try configuring and running pecl-APC for PHP?'s I'm using eAccelerator. Again, the same soft works good on less-CPU system and on Linux. With best regards, Alexey Popov