Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 6669F9FA19A for ; Mon, 4 Dec 2006 14:45:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 56308-02 for ; Mon, 4 Dec 2006 14:45:01 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from yertle.kcilink.com (yertle.kcilink.com [74.92.149.58]) by postgresql.org (Postfix) with ESMTP id E8FD19FA182 for ; Mon, 4 Dec 2006 14:45:01 -0400 (AST) Received: from [192.168.7.103] (host-103.int.kcilink.com [192.168.7.103]) by yertle.kcilink.com (Postfix) with ESMTP id 77CA1B80F for ; Mon, 4 Dec 2006 13:45:00 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <673ECBB77DA91F47AD4902A5FD73BCE4D5ED15@mail3> References: <673ECBB77DA91F47AD4902A5FD73BCE4D5ED15@mail3> Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-14-119622599; protocol="application/pkcs7-signature" Message-Id: <320E1EF2-FC6F-428E-88CB-DB0455CE2134@khera.org> From: Vivek Khera Subject: Re: Configuration settings for 32GB RAM server Date: Mon, 4 Dec 2006 13:44:59 -0500 To: "Pgsql-Performance ((((E-mail))))" X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/58 X-Sequence-Number: 22114 --Apple-Mail-14-119622599 Content-Type: multipart/alternative; boundary=Apple-Mail-13-119622473 --Apple-Mail-13-119622473 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed On Dec 4, 2006, at 12:10 PM, Mark Lonsdale wrote: > - 4 physical CPUs (hyperthreaded to 8) i'd tend to disable hyperthreading on Xeons... > shared_buffers =96 50,000 - >=46rom what Id read, increasing this = =20 > number higher than this wont have any advantages ? > > if you can, increase it until your performance no longer increases. =20 i run with about 70k on a server with 8Gb of RAM. > effective_cache_size =3D 524288 - My logic was I thought Id give =20 > the DB 16GB of the 32, and based this number on 25% of that number, =20= > sound okay? > > this number is advisory to Pg. it doesn't allocate resources, rather =20= it tells Pg how much disk cache your OS will provide. > work_mem =96 32768 - I only have up to 30 connections in parallel, =20= > and more likely less than =BD that number. My sql is relatively =20 > simple, so figured even if there was 5 sorts per query and 30 =20 > queries in parallel, 32768 would use up 4GB of memory.. Does this =20= > number sound too high? you need to evaluate how much memory you need for your queries and =20 then decide if increasing this will help. benchmarking your own use =20 patterns is the only way to do this. > Maintenance_work_mem =3D 1048576 =96 Figured Id allocate 1GB for this. > > I usually do this, too. > fsm_relations =3D 2000 - I have about 200 tables plus maybe 4 or 5 =20= > indexes on each, and didn=92t want to have to worry about this number =20= > in future so doubled it. i usually never need to go more than the default. > fsm_pages =3D 200,000 =96 Based this on some statistics about the =20 > number of pages freed from a vacuum on older server. Not sure if =20 > its fair to calculate this based on vacuum stats of 7.3.4 server? On my big DB server, this sits at 1.2 million pages. You have to =20 check the output of vacuum verbose from time to time to ensure it is =20 not getting out of bounds; if so, you need to either vacuum more =20 often or you need to pack your tables, or increase this parameter. > Do these numbers look reasonable given the machine above? Any =20 > other settings that I should be paying particular consideration too? They're a good starting point. --Apple-Mail-13-119622473 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=WINDOWS-1252
On Dec 4, 2006, at = 12:10 PM, Mark Lonsdale wrote:


- 4 physical CPUs = (hyperthreaded to = 8)


i'd tend to disable = hyperthreading on Xeons...

shared_buffers =96 50,000 =A0=A0=A0=A0-=A0 >=46rom what = Id read, increasing this number higher than this wont have any = advantages ?

this number is advisory to Pg.=A0 = it doesn't allocate resources, rather it tells Pg how much disk cache = your OS will provide.

work_mem =96 32768 = =A0- I only have up to 30 connections in parallel, and more likely less = than =BD that number.=A0 =A0My sql is relatively simple, so figured even = if there was 5 sorts per query and 30 queries in parallel, 32768 would = use up 4GB of memory.. =A0=A0Does this number sound too = high?

you need to = evaluate how much memory you need for your queries and then decide if = increasing this will help.=A0 benchmarking your own use patterns is the = only way to do this.


I usually do this, too.

fsm_relations =3D 2000=A0 - I have about = 200 tables plus maybe 4 or 5 indexes on each, and didn=92t want to have = to worry about this number in future so doubled = it.


i usually never need to go more = than the default.

fsm_pages =3D = 200,000 =96 Based this on some statistics about the number of pages = freed from a vacuum on older server. =A0=A0Not sure if its fair to = calculate this based on vacuum stats of 7.3.4 = server?

On my big DB = server, this sits at 1.2 million pages.=A0 =A0You have to check the = output of vacuum verbose from time to time to ensure it is not getting = out of bounds; if so, you need to either vacuum more often or you need = to pack your tables, or increase this parameter.

Do these numbers = look reasonable given the machine above? =A0=A0Any other settings that I = should be paying particular consideration = too?

They're a good = starting point.


= --Apple-Mail-13-119622473-- --Apple-Mail-14-119622599 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGlDCCAz8w ggKooAMCAQICAQ0wDQYJKoZIhvcNAQEFBQAwgdExCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0 ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcx KDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0 ZSBQZXJzb25hbCBGcmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxA dGhhd3RlLmNvbTAeFw0wMzA3MTcwMDAwMDBaFw0xMzA3MTYyMzU5NTlaMGIxCzAJBgNVBAYTAlpB MSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUg UGVyc29uYWwgRnJlZW1haWw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