Re: PostgreSQL is extremely slow on Windows - Mailing list pgsql-performance

From Magnus Hagander
Subject Re: PostgreSQL is extremely slow on Windows
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE47697A@algol.sollentuna.se
Whole thread Raw
In response to PostgreSQL is extremely slow on Windows  ("Vig, Sandor (G/FI-2)" <Sandor.Vig@audi.hu>)
Responses Re: PostgreSQL is extremely slow on Windows
List pgsql-performance
> Hi,
>
> I changed fsync to false. It took 8 minutes to restore the
> full database.
> That is 26 times faster than before. :-/ (aprox. 200 tps)
> With background writer it took 12 minutes. :-(

That seems reasonable.


> The funny thing is, I had a VMWARE emulation on the same
> Windows mashine, running Red Hat, with fsync turned on. It
> took also 8 minutes to finish.
> Probably the Linux code is better + VMWARE optimises (physical) disk
> access.(?)

Vmware makes fsync() into a no-op. It will always cache the disk.
(This is vmware workstation. Their server products behave differntly, of
course)


> It seems to me, I need 2 types of operating modes:
> - For bulk loading (database restore) : fsync=false
> - Normal operation fsync=true

Yes, fsync=false is very good for bulk loading *IFF* you can live with
data loss in case you get a crash during load.


> Am I right? How can I do it "elegantly"?

You'll need to edit postgresql.conf and restart the server for this.


> I Think, it should be a "performance tuning guide" in the
> docomentation.
> (not just explaning the settings) Playing with the settings
> could be quite anoying.

There is some information on techdocs.postgresql.org you miht be
interested in.

//Magnus

pgsql-performance by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: PostgreSQL is extremely slow on Windows
Next
From: amrit@health2.moph.go.th
Date:
Subject: Re: Problem with 7.4.5 and webmin 1.8 in grant function