Relation between RAM / shmmax / shmall / shared_buffers - Mailing list pgsql-admin

From Balkrishna Sharma
Subject Relation between RAM / shmmax / shmall / shared_buffers
Date
Msg-id BAY149-w5102A9288345674F2C689AF0E80@phx.gbl
Whole thread Raw
Responses Re: Relation between RAM / shmmax / shmall / shared_buffers  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Relation between RAM / shmmax / shmall / shared_buffers  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-admin
Hi,

I am having a transactional database heavy on parallel reads and updates. Apart from hardware optimization, I want to ensure that my system parameters are optimized as well. Following is what I am doing on my test system having 4GB RAM. Please let me know if the logic sounds ok (at least at high-level) and if there are other related parameters I should tweak as well:

RAM = 4GB
1. Keeping the kernel parameter kernel.shmmax at 75% of RAM (i.e. at 3GB )kernel.shmmax = 3221225472
2. Keeping the kernel parameter shmall at the same value. Because shmall is measured in number of pages and each page on my linux is 4096 bytes, having kernel.shmall = 786432     (786432 * 4096 = 3221225472, same as shmmax)
3. Keeping the shared_buffer parameter in the postgresql.conf file to be 25% of the kernel.shmmax. i.e. shared_buffers = 768MB (25% of 3072 MB)


Thanks,
-Bala



The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get started.

pgsql-admin by date:

Previous
From: Balkrishna Sharma
Date:
Subject: Re: How to find if a SELECT is reading from buffer or disk ?
Next
From: "Kevin Grittner"
Date:
Subject: Re: Relation between RAM / shmmax / shmall / shared_buffers