Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TLMg6-0001lN-Gv for pgsql-performance@postgresql.org; Mon, 08 Oct 2012 23:24:02 +0000 Received: from [2001:1528:137::f1] (helo=mail.gransy.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TLMg5-00036r-RO for pgsql-performance@postgresql.org; Mon, 08 Oct 2012 23:24:02 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 6B319508A43 for ; Tue, 9 Oct 2012 01:24:01 +0200 (CEST) Received: from mail.gransy.com ([82.208.44.189]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id WWOOMbd9DmSy for ; Tue, 9 Oct 2012 01:24:01 +0200 (CEST) Received: by mail.gransy.com (Postfix, from userid 5000) id 570E2508A47; Tue, 9 Oct 2012 01:24:01 +0200 (CEST) Received: from [192.168.1.237] (ip-78-45-133-255.net.upcbroadband.cz [78.45.133.255]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id 259B5508A43 for ; Tue, 9 Oct 2012 01:24:01 +0200 (CEST) Message-ID: <50736092.8080906@fuzzy.cz> Date: Tue, 09 Oct 2012 01:24:02 +0200 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Two identical systems, radically different performance References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:1528:137::f1 (failed) X-Pg-Spam-Score: -1.1 (-) X-Archive-Number: 201210/77 X-Sequence-Number: 48036 On 9.10.2012 00:33, Evgeny Shishkin wrote: >> >> pgbench: Old server >> >> pgbench -i -s 100 -U test >> pgbench -U test -c ... -t ... >> >> -c -t TPS >> 5 20000 3777 >> 10 10000 2622 >> 20 5000 3759 >> 30 3333 5712 >> 40 2500 5953 >> 50 2000 6141 >> >> New server >> -c -t TPS >> 5 20000 2733 >> 10 10000 2783 >> 20 5000 3241 >> 30 3333 2987 >> 40 2500 2739 >> 50 2000 2119 > > On new server postgresql do not scale at all. Looks like contention. Why? The evidence we've seen so far IMHO suggests a poorly performing I/O subsystem. Post a few lines of "vmstat 1" / "iostat -x -k 1" collected when the pgbench is running, that might tell us more. Try a few very basic I/O tests that are easy to understand rather than running bonnie++ which is quite complex. For example try this: time sh -c "dd if=/dev/zero of=myfile.tmp bs=8192 count=4194304 && sync" dd if=myfile.tmp of=/dev/null bs=8192 The former measures sequential write speed, the latter measures sequential read speed in a very primitive way. Watch vmstat/iostat and don't bother running pgbench until you get a reasonable performance on both systems. Tomas