Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A98C86329BA for ; Fri, 14 May 2010 05:51:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 80563-04 for ; Fri, 14 May 2010 08:51:19 +0000 (UTC) X-Greylist: delayed 00:26:50.167354 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 90EE8632910 for ; Fri, 14 May 2010 05:51:19 -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 1OCqC2-0004vS-7l for pgsql-performance@postgresql.org; Fri, 14 May 2010 10:24:26 +0200 Message-ID: <4BED08B4.4030507@sci.pam.szczecin.pl> Date: Fri, 14 May 2010 10:24:20 +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.011 tagged_above=-10 required=5 tests=BAYES_40=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/71 X-Sequence-Number: 38655 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