Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > parameters in p...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3163 of 3255
Post > Topic >>

parameters in pg_conf

by ramkaka@[EMAIL PROTECTED] ("Ram Ravichandran") Jul 8, 2008 at 03:45 PM

------=_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&nbsp;&nbsp;quad-core 2.5Ghz xeon 5420, 8GB RAM with 2x 73GB 15K SCSI
drives in a battery-backed RAID 1. &nbsp;My target DB size will be around
10GB. The server hosts postgresql + application server (Rails) + web
server (NGinx) + MemcacheD .&nbsp;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.&nbsp;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 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; # 25% of 4GB remaining memory&nbsp;</div><div>work_mem =
2MB</div><div>maintenance_work_mem = 128MB</div><div>checkpoint_segments =
8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div>wal_buffers =
1MB&nbsp;</div>
<div>effective_cache_size = 2GB<br>random_page_cost = 2.5 &nbsp;
&nbsp;<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 &quot;</span><span class="Apple-style-span"
style="font-family: Arial; "><span class="Apple-style-span"
style="font-size: small;">cpu_* = multiply all by .2&quot; I am not sure
what that means. Does that mean&nbsp;</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&nbsp;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]&nbsp;</span></span><span class="Apple-style-span"
style="font-family: arial, sans-serif;"><span class="Apple-style-span"
style="font-size: small;">&quot;Performance Whack-a-Mole&quot; 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]&nbsp;<a
href="http://www.powerpostgresql.com/PerfList">http://www.powerpostgresql.com/PerfList</a><br>[3]&nbsp;<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]&nbsp;<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--
 




 1 Posts in Topic:
parameters in pg_conf
ramkaka@[EMAIL PROTECTED]  2008-07-08 15:45:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 6:38:12 CDT 2008.