Re: old server, new server, same performance

From: "Sarwani Dwinanto" <sarwani(at)detik(dot)com>
To: "Thom Brown" <thom(at)linux(dot)com>, pgsql-performance-owner(at)postgresql(dot)org, "Piotr Legiecki" <piotrlg(at)ams(dot)edu(dot)pl>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: old server, new server, same performance
Date: 2010-05-15 02:26:43
Message-ID: 1158389365-1273890407-cardhu_decombobulator_blackberry.rim.net-178166085-@bda010.bisx.prodap.on.blackberry
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Agree with Thom,

I also had the same problem back then when I was migrate from old servers to new server.

After I vacuum the DB at the new servers the result back to normal.

Rgrds

Sent from my BlackBerry®powered by AyahNaima

-----Original Message-----
From: Thom Brown <thom(at)linux(dot)com>
Date: Fri, 14 May 2010 15:03:26
To: Piotr Legiecki<piotrlg(at)ams(dot)edu(dot)pl>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [PERFORM] old server, new server, same performance

2010/5/14 Piotr Legiecki <piotrlg(at)ams(dot)edu(dot)pl>

> 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 <bakcup_file).
>
> So what is the problem? My simple 'benchmarks' I have done with pgAdmin
> in spare time.
>
> pgAdmin is the latest 1.8.2 on both D and E.
> Using pgAdmin on my (D) computer I have run SELECT * from some_table;
> and noted the execution time on both A and B servers:
> - on A (the old one) about 120sec
> - on B (the new monster) about 120sec (???)
>
> (yes, there is almost no difference)
>
> On the first test runs the postgresql configs on both servers were the
> same, so I have started to optimize (according to postgresql wiki) the
> postgresql on the new (B) server. The difference with my simple select
> * were close to 0.
>
> So this is my first question. Why postgresql behaves so strangely?
> Why there is no difference in database speed between those two machines?
>
> I thought about hardware problem on B, but:
> hdparm shows 140MB/sec on B and 60MB on A (and buffered reads are 8GB on
> B and 800MB on A)
> bonnie++ on B:
>
>> 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
>

Have you compared the PostgreSQL configurations between servers?
(postgresql.conf) And how was it installed? Package or compiled from
scratch?

And has the new DB been VACUUM'd?

Thom

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message joao.pinheiro 2010-05-15 16:42:44 Benchmark with FreeBSD 8.0 and pgbench
Previous Message Scott Carey 2010-05-15 00:46:07 Re: old server, new server, same performance