Page 1 of 1

Postgresql tuning in Mac OS

PostPosted: Sat Aug 24, 2013 2:43 pm
by KobeBryantLA
Hello,

I have a Mac Mini Late 2012 with 16 GB RAM, PT4 running in Mac OS and a huge 150 GB Database. As you can imagine it works very slow with the default settings. What changes in config files do you recommend to increase the performance? Is there any FAQ for this?

Re: Postgresql tuning in Mac OS

PostPosted: Sun Aug 25, 2013 2:12 pm
by kraada
Our database tuning should work for OS X as well - you can access it via the Housekeeping button in the Database Management window - it should take care of everything you need.

Re: Postgresql tuning in Mac OS

PostPosted: Sun Aug 25, 2013 2:28 pm
by KobeBryantLA
kraada wrote:Our database tuning should work for OS X as well - you can access it via the Housekeeping button in the Database Management window - it should take care of everything you need.

I used it Windows, but in Mac OS there is no such button in Database Management window.

Re: Postgresql tuning in Mac OS

PostPosted: Sun Aug 25, 2013 8:43 pm
by kraada
I'll ask our Mac guy tomorrow what he recommends for you.

Re: Postgresql tuning in Mac OS

PostPosted: Tue Aug 27, 2013 5:25 am
by KobeBryantLA
kraada wrote:I'll ask our Mac guy tomorrow what he recommends for you.

Any news?

Re: Postgresql tuning in Mac OS

PostPosted: Tue Aug 27, 2013 9:49 am
by kraada
Use the numbers listed here -- you'll have to make the changes manually though. To do this, open Applications -> Utilities -> Terminal and type:
sudo nano /Library/PostgreSQL/9.0/data/postgresql.conf

After making the changes, ctrl+x exits the program (save the changes when prompted) and reboot your machine and that should do it.

Re: Postgresql tuning in Mac OS

PostPosted: Thu Aug 29, 2013 10:05 am
by KobeBryantLA
I set parameters like this
Code: Select all
shared_buffers = 2048MB   
work_mem = 256MB
maintenance_work_mem = 1024MB   

Changed sysctl.conf to
Code: Select all
kern.sysv.shmall=537466   
kern.sysv.shmmax=2201460736
kern.sysv.shmmin=1
kern.sysv.shmmni=256
kern.sysv.shmseg=64

But still have bad performance.
Any thoughts?

Re: Postgresql tuning in Mac OS

PostPosted: Thu Aug 29, 2013 11:50 am
by kraada
Purging is one of our slowest operations. How are import speeds for you? If you're purging enough data it may actually be faster to export what you want and reimport the data you want to keep into a new database.

Re: Postgresql tuning in Mac OS

PostPosted: Fri Aug 30, 2013 3:47 pm
by KobeBryantLA
kraada wrote:Purging is one of our slowest operations. How are import speeds for you? If you're purging enough data it may actually be faster to export what you want and reimport the data you want to keep into a new database.

Thanks for advise. Speed is about 82 h/s.

Re: Postgresql tuning in Mac OS

PostPosted: Fri Aug 30, 2013 4:19 pm
by WhiteRider
That sounds reasonable.