Re: Speed differences between two servers

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Speed differences between two servers
Date: 2017-05-08 23:06:05
Message-ID: CAOR=d=3h25QxOe9uz_RooJeux4Ok29c-ndF2GnC6_9uZ5qDGGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, May 8, 2017 at 4:24 PM, Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr> wrote:
> On Mon, 8 May 2017 12:48:29 -0600
> Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
>
> Hi Scott,
>
> Thank you for your input.
>
>>
>> The most likely cause of the difference would be that one server IS
>> honoring fsync requests from the db and the other one isn't.
>>
>> If you run pgbench on both (something simple like pgbench -c 1 -T 60,
>> aka one thread for 60 seconds) on a machine running on a 7200RPM hard
>> drive, you should get approximately 120 transactions per second
>
> Here are the results :
>
> #Kimsufi
> pgbench -c 1 -T 60 test
> starting vacuum...end.
> transaction type: TPC-B (sort of)
> scaling factor: 1
> query mode: simple
> number of clients: 1
> number of threads: 1
> duration: 60 s
> number of transactions actually processed: 6618
> latency average: 9.069 ms
> tps = 110.270771 (including connections establishing)
> tps = 110.283733 (excluding connections establishing)

Just under 120, looks like fsync is working.

>
> #Online
> starting vacuum...end.
> transaction type: TPC-B (sort of)
> scaling factor: 1
> query mode: simple
> number of clients: 1
> number of threads: 1
> duration: 60 s
> number of transactions actually processed: 1150
> latency average: 52.317 ms
> tps = 19.114403 (including connections establishing)
> tps = 19.115739 (excluding connections establishing)

OK that's horrendous. My mobile phone is likely faster. We need to
figure out why it's so slow. If it's in a RAID-1 set it might be
syncing.

>> > -Why are regular queries much faster on this same server?
>>
>> That's a whole nother subject. Most likely the faster machine can fit
>> the whole db in memory, or has much faster memory, or the whole
>> dataset is cached etc etc.
>>
>
> The dataset is small (35 MB) and both servers have 4GB memory. It appears to be faster on the Online server.

Yeah it fits in memory. Select queries will only hit disk at bootup.

First machine
SNIP
> Speed: 1066 MHz
SNIP
> Configured Clock Speed: 1066 MHz

Second machine

> Speed: 1600 MHz
SNIP
> Configured Clock Speed: 1333 MHz

Yeah the second machine likely has a noticeably faster CPU than the
first as well. It's about two years younger so yeah it's probably just
cpu/mem that's making it fast.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2017-05-08 23:12:12 Re: Postgres uses too much RAM
Previous Message Vincent Veyron 2017-05-08 22:24:41 Re: Speed differences between two servers