From owner-freebsd-stable@FreeBSD.ORG Tue Nov 20 17:15:18 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 CFFC816A469 for ; Tue, 20 Nov 2007 17:15:18 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.191]) by mx1.freebsd.org (Postfix) with ESMTP id B1E6613C448 for ; Tue, 20 Nov 2007 17:15:18 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so1843709rvb for ; Tue, 20 Nov 2007 09:15:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=IaTvqpKFfx0FgnEibmvU9La8y4ksl2O4QasVKzzs79Y=; b=Ivo+Kk0pM8xUMSAJpGiJEhIjOwJa/+EthydEPL7M2gfTlPKLC4zkMMxqtqF6Sg2TIrawbqehIxffrJSPk2ffxOvYvDXcW/dKtaJkA18Z70aYn76hVCqLIeozeGLxTugp0VyvGmZF4ud1bSK4uH1vfLHD6L8HvwROOvZaclgaAWk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=eeflIgb15/pv7MmF6dVaivGRe96r6knTmNOF64qVO6eSrmEBhV5IndoZe47yWsCDQpcbw1b93RBlRrY4wT0ro9tJFT9odgDED4G92sqTw2AhW777eClkpby7XCJHAShVREH6Mc27/ld2wqvTJzGuHk7Q/SvmtrM9PraDlfUg3QQ= Received: by 10.140.142.4 with SMTP id p4mr2472435rvd.1195578917833; Tue, 20 Nov 2007 09:15:17 -0800 (PST) Received: by 10.141.211.5 with HTTP; Tue, 20 Nov 2007 09:15:17 -0800 (PST) Message-ID: <9bbcef730711200915n12e37efcs67cf260641b9baab@mail.gmail.com> Date: Tue, 20 Nov 2007 18:15:17 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Alexey Popov" In-Reply-To: <47430AE8.7050408@chistydom.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4741905E.8050300@chistydom.ru> <47419AB3.5030008@chistydom.ru> <4741B3DE.2000009@chistydom.ru> <47430AE8.7050408@chistydom.ru> X-Google-Sender-Auth: 969eb154c0d67094 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: Tue, 20 Nov 2007 17:15:18 -0000 On 20/11/2007, Alexey Popov wrote: > CPU states: 5.9% user, 0.0% nice, 81.3% system, 0.0% interrupt, 12.8% idle > CPU states: 82.2% user, 0.0% nice, 13.8% system, 0.0% interrupt, 4.0% idle Interesting coincidence: 1 CPU generates almost 8x less "sys time" then 8 CPUs. But it seems that you have found something real. Inspired by your problem I've done a simple measurement ("ab") on a 4-CPU (2x2 core Opterons 2216 HE, PAE) machine I maintain, under these circumstances: - a "heavy" PHP application - FastCGI - in this case, load of 4 clients - on 6-STABLE and I'm reporting similar findings: last pid: 2254; load averages: 1.43, 0.92, 0.69 up 71+08:23:06 18:00:31 153 processes: 8 running, 144 sleeping, 1 zombie CPU states: 38.8% user, 0.0% nice, 48.4% system, 3.2% interrupt, 9.6% idle Mem: 2321M Active, 1135M Inact, 313M Wired, 139M Cache, 112M Buf, 93M Free Swap: 4500M Total, 336K Used, 4500M Free PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 2208 www 1 99 0 115M 19808K RUN 1 0:06 36.83% php-cgi 2207 www 1 100 0 114M 19348K RUN 3 0:05 32.66% php-cgi 1715 www 1 99 0 115M 23672K CPU0 0 0:24 27.83% php-cgi 1710 www 1 101 0 114M 23460K RUN 1 0:31 22.17% php-cgi 1882 www 1 99 0 115M 23392K CPU2 3 0:18 21.34% php-cgi 1718 www 1 4 0 114M 22556K sbwait 0 0:21 19.14% php-cgi 2677 pgsql 1 4 0 977M 55768K sbwait 0 0:00 28.00% postgres We are not so performance bound as you so I didn't do measurements earlier. I cannot "play" with settings on this machine as it is in production, but ~~50% sys time (the measurement changes around 45% +/- 10%) seems too much. On another 4-CPU machine (2x2 Xeons 5110, AMD64) with the same application and benchmark setup, but RELENG_7, which is not yet in production, the results are slightly different: last pid: 66564; load averages: 1.87, 0.48, 0.18 up 15+05:27:03 17:09:09 113 processes: 9 running, 104 sleeping CPU states: 49.0% user, 0.0% nice, 28.8% system, 0.0% interrupt, 22.1% idle Mem: 555M Active, 295M Inact, 884M Wired, 98M Cache, 213M Buf, 135M Free Swap: 2047M Total, 2047M Free PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 66557 www 1 109 0 105M 25340K RUN 3 0:14 64.99% php-cgi 66559 www 1 109 0 105M 25308K RUN 2 0:14 62.99% php-cgi 66561 www 1 98 0 105M 22196K RUN 0 0:01 12.99% php-cgi 66562 www 1 98 0 105M 22196K RUN 1 0:01 11.96% php-cgi 59043 nobody 1 47 0 7012K 3744K select 2 0:27 5.96% sqlcached 774 pgsql 1 44 0 437M 112M select 2 3:55 0.00% postgres