I was going through the various performance tweaking documents pointed out
by various people on this mailing list last month. I was hoping I could do a
quick spot-check, and get your expert opinion.
This is for a new web application. Currently I have one quad-core 2.5Ghz
xeon 5420, 8GB RAM with 2x 73GB 15K SCSI drives in a battery-backed RAID 1.
My target DB size will be around 10GB. The server hosts postgresql +
application server (Rails) + web server (NGinx) + MemcacheD . I expect to
see really high usage for about 5 - 7 hours a day (same time every day).
From benchmarking with test data (that I am not sure will reflect real life
scenario), the application server + nginx demands about 2GB of memory. So I
think I will have about 4 - 5 GB of working memory for Postgresql + OS. My
FS is ext3 with noatime and writeback cache enabled. My understanding is
that writeback is okay since I have a battery-backed raid controller.
Looking through [1 - 4], I set the following non-default parameters in my
max_connections = 50
shared_buffers = 1GB # 25% of 4GB remaining memory
work_mem = 2MB
maintenance_work_mem = 128MB
checkpoint_segments = 8
wal_buffers = 1MB
effective_cache_size = 2GB
random_page_cost = 2.5
1. Should I turn autovacuum off and run them nightly since I have a peak
usage for a few hours a day?
2. Since I have a battery-backed raid controller, is it safe to turn fsync
off? Is this done in practice? What is the average increase in performance?
3.  says "cpu_* = multiply all by .2" I am not sure what that means. Does
that mean that I should set them to 0.2 or multiply the defaults by 0.2?
Any suggestions given my current setup?
4. Does the random_page_cost of 2.5 seem reasonable for my setup?
Thanks a lot.
 "Performance Whack-a-Mole" Tutorial PGCon 2007. Presentation
pgsql-novice by date
|Next:||From: Selvakaruppiah s-TLS,Chennai||Date: 2008-07-09 06:08:47|
|Subject: [Problem] - Error: cannot open pg_class_oid_index: Permission denied|
|Previous:||From: Albe Laurenz||Date: 2008-07-08 12:15:31|
|Subject: Re: please explain vacuum with WAL|