public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jeff Janes <[email protected]>
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: can't explain commit performance win7 vs linux : 8000/s vs 419/s
Date: Sat, 25 Jun 2016 12:23:42 -0700
Message-ID: <CAMkU=1wB+35UXmfAnGa_j6ZYeoZx0wO8yhh0g8NKuGDroK4HTw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgsql-performance>

On Sat, Jun 25, 2016 at 9:19 AM, [email protected]
<[email protected]> wrote:
> Hi,
> I've postgres 9.5.3 installed on win7 64 bit, and ubuntu 16.04tls 64 bit,
> same SSD (evo 850 pro) , two different partitions. Laptop is 3.8Ghz.
> I've in each partition a simple database with one table called data256 with
> one column of 256 char.
> I wrote a program using libpq which:
> 1 connects to 127.0.0.1 to the server
> 2 drops and recreates the table;
> 3 executes 2000 times the exec() function with the command  "INSERT INTO
> data256 VALUES ('AAAAAA...... 250 times')"
> I want to commit after every insert of course.
> The program is the same both in win and linux; in ansi c, so it's portable.
>
> Performance:
> Win7: 8000 write/sec
> Linux: 419 write/sec
>
> I don't figure out why such a difference. Also what should I expect? Which
> one is reasonable?

The Win7 numbers seem suspiciously high to me, even for SSD.  Have you
tried holding the power button until it hard-resets the computer in
the middle of a run (preferably several runs going in parallel), and
see if comes back up without corruption and contains consistent data?
And then repeat that a several times?


> I compared the two postgresql.conf, they're identical (except obvious
> things), they're the default ones, I didn't touch them.

We don't know which things are obvious to you.

>
> Then, in order to test write / flush without postgres, I made another C
> program, to open a file in writing, and for 1000 times : write 256 bytes and
> flush them (using fsync in linux and FlushFileBuffers in win).
> Win7: 200 write/sec
> Linux: 100 write/sec

Rather than rolling your own program, can you run pg_test_fsync on each?

Cheers,

Jeff


-- 
Sent via pgsql-performance mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: can't explain commit performance win7 vs linux : 8000/s vs 419/s
  In-Reply-To: <CAMkU=1wB+35UXmfAnGa_j6ZYeoZx0wO8yhh0g8NKuGDroK4HTw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox