
PostgreSQL Tuning Tips for Sun Fire T2000 Systems Running SolarisLatest binaries Download the latest PostreSQL packages, compiled to achieve optimal performance on Solaris 10 (both SPARC and x86).
Download the Installation Guide for this release.
Tuning /etc/system Recommend: Solaris 10 11/06 as the OS to use. Apply the tuning parameters listed at: For Data Warehousing type of workloads also use: set maxphys = 1048576 Only set the following parameter if you have plenty of available physical memory and UFS is used instead of ZFS: set segmap_percent=50 For ZFS please use the following patches (recommended for Solaris 10 11/06):
Reboot the system for the above changes to take effect. Important notes about the /etc/system settings above:
Tuning /etc/project For bufferpools bigger than 25% of RAM and high concurrent users (Replace string "postgres" with the username of PostgreSQL database user) : # projadd -U postgres user.postgres # projmod -a -K "project.max-sem-ids=(priv,4k,deny)" user.postgres # projmod -a -K "project.max-shm-memory=(priv,4G,deny)" user.postgresI/O Tunning Putting the log into a different filesystem with the forcedirectio option can improve performance for OLTP workloads. Here's a sample entry from /etc/vfstab showing a filesystem with forcedirectio enabled: /dev/dsk/c1t1d0s0 /dev/rdsk/c1t1d0s0 /pglog ufs 1 yes forcedirectio Forcedirectio can also be enabled dynamically (applies only until the next reboot): mount -o remount,forcedirectio /pglog After running initdb, move $PGDATA/pg_log to your log partition mount point. The Sun Fire T2000's internal disks are shipped with write cache disabled. To maximize write performance, it is possible to enable the disk write cache using the format -e command, but at the risk of losing data in the event of a power failure. For the best disk I/O performance combined with full data protection, use an external storage array in a RAID 1 + 0 configuration. PostgreSQL Tuning Performance tests have been carried out on a Sun Fire T2000 system with 8 cores and 32 GB memory using an internal OLTP workload located on the internal drives. The test database was less than 2GB in size, though, and could fit into memory. Our main interest was CPU scaleability, and indeed PostgreSQL scales quite well on the T2000 when increasing the number of users. The testing showed that a number of parameters in postgresql.conf can be tuned to improve OLTP performance. The following settings provided the best throughput: wal_sync_method = fdatasync The above parameters were tuned for our OLTP test workload and the results may vary for your application. The following links provide some guidelines for determining the optimal settings for your specific workload: Server Configuration (PostgreSQL 8.1.3 Manual)
PostgreSQL 8.0 Performance Checklist (from Power PostgreSQL, by Josh Berkus and Joe Conway)
| ||||||