insert performance for win32

From: Marc Cousin <mcousin(at)sigma(dot)fr>
To: pgsql-performance(at)postgresql(dot)org
Subject: insert performance for win32
Date: 2005-09-06 14:12:27
Message-ID: 200509061612.27746.mcousin@sigma.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

I usually use PostgreSQL coupled with Linux, but I have to use Windows for a
perticular project.

So I wanted to do some tests to know if the performance will be acceptable (I
don't need PostgreSQL to be as fast with windows as with linux, but it has to
be usable...).

I started with trying to do lots of inserts, and I'm quite astonished by the
catastrophics results ...

The test :
The computer was the same (my workstation, a PIV Dell with SATA disk), dual
boot

The windows OS is XP.

Both Oses are PostgreSQL 8.0.3

Both PostgreSQL clusters (windows and linux) have the same tuning
(shared_buffers=20000, wal_buffers=128, checkpoint_segments=10)

Before each test, the clusters are vacuum analyzed, and the test database is
recreated.

The script is quite dumb :
BEGIN;
CREATE TABLE test (col1 serial, col2 text);
INSERT INTO test (col2) values ('test');
INSERT INTO test (col2) values ('test');
INSERT INTO test (col2) values ('test');
INSERT INTO test (col2) values ('test');
INSERT INTO test (col2) values ('test');
...... 500,000 times
Then COMMIT.

I know it isn't realistic, but I needed to start with something :)

The results are as follows :
Linux : 1'9''
Windows : 9'38''

What I've tried to solve, and didn't work :

- Deactivate antivirus on windows
- fsync=no
- raise the checkpoint_segments value (32)
- remove hyperthreading (who knows...)

I don't know what could cause this (I'm not a windows admin...at all). All I
see is a very high kernel load during the execution of this script, but I
can't determine where it comes from.

I'd like to know if this is a know problem, if there is something I can do,
etc...

Thanks a lot.

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2005-09-06 14:47:16 Re: Improving performance of a query
Previous Message Stephan Szabo 2005-09-06 14:09:08 Re: Improving performance of a query