Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 94A07634387 for ; Fri, 14 May 2010 10:54:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14900-05 for ; Fri, 14 May 2010 13:54:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sci.pam.szczecin.pl (sci.pam.szczecin.pl [212.14.5.155]) by mail.postgresql.org (Postfix) with ESMTP id D9E1C634340 for ; Fri, 14 May 2010 10:54:31 -0300 (ADT) Received: from flox.pam.szczecin.pl ([212.14.5.130] helo=[192.168.1.18]) by sci.pam.szczecin.pl with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1OCuiG-0000lO-EL for pgsql-performance@postgresql.org; Fri, 14 May 2010 15:14:00 +0200 Message-ID: <4BED4C98.1080206@ams.edu.pl> Date: Fri, 14 May 2010 15:14:00 +0200 From: Piotr Legiecki User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: old server, new server, same performance Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-10 required=5 tests=BAYES_40=-0.001 X-Spam-Level: X-Archive-Number: 201005/62 X-Sequence-Number: 38646 Hi I have a situation at my work which I simply don't understand and hope that here I can find some explanations. What is on the scene: A - old 'server' PC AMD Athlon64 3000+, 2GB RAM, 1 ATA HDD 150GB, Debian etch, postgresql 8.1.19 B - new server HP DL 360, 12GB RAM, Intel Xeon 8 cores CPU, fast SAS (mirrored) HDDs, Debian 64 bit, lenny, backported postgresql 8.1.19 C - our Windows application based on Postgresql 8.1 (not newer) and second role actors (for pgAdmin) D - my old Windows XP computer, Athlon64 X2 3800+, with 100Mbit ethernet E - new laptop with Ubuntu, 1000Mbit ethernet The goal: migrate postgresql from A to B. Simple and works fine (using pg_dump, psql -d dbname Version 1.03d ------Sequential Output------ --Sequential Input- --Random- > -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- > Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP > malwa 24G 51269 71 49649 10 34974 6 48969 82 147840 13 1150 1 on A: > Version 1.03 ------Sequential Output------ --Sequential Input- --Random- > -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- > Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP > irys 4G 42961 93 41125 13 14414 3 20262 48 38487 5 167.0 0 Here the difference in writings is not so big (wonder why, the price between those machines is huge) but in readings are noticeably better on B. Ok, those were the tests done using my old Windows PC (D) computer. So I have decided to do the same using my new laptop with Ubuntu (E). The results were soooo strange that now I am completely confused. The same SELECT: - on A first (fresh) run 30sec, second (and so on) about 11sec (??!) - on B first run 80sec, second (and so on) about 80sec also What is going on here? About 8x faster on slower machine? One more thing comes to my mind. The A server has iso-8859-2 locale and database is set to latin2, the B server has utf8 locale, but database is still latin2. Does it matter anyway? So here I'm stuck and hope for help. Is there any bottleneck? How to find it? Regards Piotr