------=_Part_711_3025920.1215546307554
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,
I was going through the various performance tweaking do***ents 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.
SPECS
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.
CONF Settings
Looking through [1 - 4], I set the following non-default parameters in my
conf file:
---------------
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
----------------
Questions:
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. [1] 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.
Ram
References
[1] "Performance Whack-a-Mole" Tutorial PGCon 2007. Presentation
[2] http://www.powerpostgresql.com/PerfList
[3] http://www.westnet.com/~gsmith/content/postgresql/pg-5minute.htm
[4] http://www.revsys.com/writings/postgresql-performance.html
------=_Part_711_3025920.1215546307554
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,<br><br>I was going through the various performance tweaking do***ents
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.<br><br><span class="Apple-style-span" style="font-weight:
bold;">SPECS</span><br>
<br>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).<br>
<br>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.<br>
<br><span class="Apple-style-span" style="font-weight: bold;">CONF
Settings</span><br><br>Looking through [1 - 4], I set the following
non-default parameters in my conf
file:<br><br>---------------<br><div>max_connections = 50</div>
<div>shared_buffers = 1GB
# 25% of 4GB remaining memory </div><div>work_mem =
2MB</div><div>maintenance_work_mem = 128MB</div><div>checkpoint_segments =
8 </div><div>wal_buffers =
1MB </div>
<div>effective_cache_size = 2GB<br>random_page_cost = 2.5
<br>----------------<br><br><span class="Apple-style-span"
style="font-weight: bold;">Questions:</span><br><br><span
class="Apple-style-span" style="font-size: small;">1. Should I turn
autovacuum off and run them nightly since I have a peak usage for a few
hours a day?<br>
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?<br>3. [1] says "</span><span class="Apple-style-span"
style="font-family: Arial; "><span class="Apple-style-span"
style="font-size: small;">cpu_* = multiply all by .2" I am not sure
what that means. Does that mean </span></span><span
class="Apple-style-span" style="font-size: small;">that I should set them
to 0.2 or multiply the defaults by 0.2?<br>
Any suggestions given my current setup?<br>4. Does
the random_page_cost of 2.5 seem reasonable for my
setup?<br><br><br>Thanks a lot.<br><br>Ram<br><br></span><br><span
class="Apple-style-span" style="font-weight: bold;">References</span><br>
<br><span class="Apple-style-span" style="font-family: arial,
sans-serif;"><span class="Apple-style-span" style="font-size:
small;">[1] </span></span><span class="Apple-style-span"
style="font-family: arial, sans-serif;"><span class="Apple-style-span"
style="font-size: small;">"Performance Whack-a-Mole" Tutorial
PGCon 2007. Presentation</span></span><span class="Apple-style-span"
style="font-family: arial, sans-serif;"><span class="Apple-style-span"
style="font-size: small;"><br>
[2] <a
href="http://www.powerpostgresql.com/PerfList">http://www.powerpostgresql.com/PerfList</a><br>[3] <a
href="http://www.westnet.com/~gsmith/content/postgresql/pg-5minute.htm">http://www.westnet.com/~gsmith/content/postgresql/pg-5minute.htm</a><br>
[4] <a
href="http://www.revsys.com/writings/postgresql-performance.html">http://www.revsys.com/writings/postgresql-performance.html</a><br><br></span></span><br><br><br><br></div>
------=_Part_711_3025920.1215546307554--


|