Postgres and Sun Studio 12 build parameters and postgresql.conf values
Lot of people were requesting the compiler options and postgresql.conf options used in the Postgres scalability on Sun Fire T2000 test that I had done previously.
I had not published them before since I am not sure if these options are optimal for all cases or not. Anyway I am providing them as it looks it will help lot of people to jumpstart with Postgres on Solaris and in the meanwhile I can continue doing more tests and tweak them for another entry if required.
The PostgreSQL binaries were configured with Sun Studio 12 as follows:
$ ./configure --prefix=/usr/local/pg824 CC=/opt/SUNWspro/bin/cc CFLAGS="-xO3 -xarch=native \
-xspace -W0,-Lt -W2,-Rcond_elim -Xa -xildoff -xc99=none -xCC" --without-readline
Again, I am told that the above options may not be optimum for Sun Studio 12. I will update them after doing more tests with other options.
The main postgresql.conf options modified are as follows:
max_connections = 1000 unix_socket_directory = '/tmp'shared_buffers=3GB temp_buffers = 1000 max_prepared_transactions = 450 work_mem=100MB maintenance_work_mem = 512MB max_fsm_pages = 208000 max_fsm_relations = 10000 vacuum_cost_delay = 50 bgwriter_delay = 200ms bgwriter_lru_percent=20.0 bgwriter_lru_maxpages=100 bgwriter_all_percent=3 bgwriter_all_maxpages=600 wal_sync_method = fdatasync full_page_writes = off wal_buffers = 2500 commit_delay = 10 checkpoint_segments = 256 checkpoint_timeout = 300 checkpoint_warning = 99 random_page_cost = 1.5 cpu_tuple_cost = 0.001 cpu_index_tuple_cost = 0.0005 cpu_operator_cost = 0.00025 effective_cache_size = 40GB
Of course I shouldn't forget the network tunables used also:
ndd -set /dev/tcp tcp_naglim_def 1
The actual database was divided into three file systems: One for $PGDATA, one for pg_xlog and one more for index tablespaces. All mounted with forcedirectio option) Your mileage may vary but hopefully for the better.

Posted by Scott Marlowe on July 12, 2007 at 12:41 PM EDT #
./configure --prefix=/usr/local/pg84devel CC=/opt/SunStudioExpress/bin/cc CFLAGS="-xO3 -xarch=native \
-xspace -W0,-Lt -W2,-Rcond_elim -Xa -xildoff -xc99=none -xCC" --with-perl --with-python --enable-dtrace \
--enable-thread-safety --without-readline
I prefer with this configuration :)
On OpenSolaris th path of SunStudio changes (2008.11)
Posted by Emanuel Calvo Franco on December 23, 2008 at 03:21 PM EST #
Hello Jignesh,
thank you for your frequent information. Perhaps you can give me some usage recommendations. I normally rely on psql having "readline".
1) Why do you compile psql without "readline"?
2) Why is the standard OpenSolaris psql compiled without "readline"?
3) How do you use psql so that you don't need "readline"?
Thanks,
Oliver
Posted by Oliver Seidel on July 14, 2009 at 04:50 PM EDT #
readline was not available out of the box on OpenSolaris due to some licensing constraint in regards with Postgres and hence it was compiled with readedit library. However with recent information it seems readline is being integrated starting with build 114 of OpenSolaris. I guess with that the later releases of Postgres will be using the readline library on OpenSolaris too.
http://osdir.com/ml/opensolaris-discuss/2009-05/msg00538.html
Posted by Jignesh Shah on July 14, 2009 at 05:01 PM EDT #