Wednesday, November 23, 2005

PostgreSQL on Solaris 10 .. Better use these values in your postgresql.conf

If you are using Postgresql V8.x on Solaris 10 x64 better add these values to your postgresql.conf before you try to compare its performance with PostgreSQL on Linux. Add the following to your postgresql.conf (better yet add it to your template postgresql.conf.sample so it always uses this values on Solaris 10.

wal_sync_method = fsync
wal_buffers = 128
checkpoint_segments = 128
bgwriter_percent = 0
bgwriter_maxpages = 0

wal_sync_method on Linux and Solaris seems to be different, so making it more apples to apples comparison, wal_buffers, checkpoint_segments improve your log performance on Solaris like 4X. I still haven't seen any benefits from background writer except locking up the semaphore to write so turn it off until it improves.

If you have more performance with PostgreSQL on Solaris 10 x64 Vs other Operating Systems after incorporating the above recommendations, let me know.



Jerry Kemp said...

would you/do you have similar suggestions for PostgreSQL 8.1.x on Solaris 10 Sparc? I am running PostgreSQL 8.1.2 on a V210 to support Journyx time tracking software.
Jerry Kemp

Jignesh Shah said...

I would try with these parameters and see the difference on SPARC too. If you still have issues, feel free to send me an email. (Information in the blog header)

Francis Liu said...

Hi Jignesh,
is the project also going to develop/provide a SMF manifest? - FrancisLiu