Re: The shared buffers challenge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Scott Carey wrote:
And there is an OS component to it too.  You can actually get away with
shared_buffers at 90% of RAM on Solaris.  Linux will explode if you try
that (unless recent kernels have fixed its shared memory accounting).

You can use much larger values for shared_buffers on Solaris with UFS as the filesystem than almost anywhere else, as you say. UFS defaults to caching an extremely tiny amount of memory by default. Getting PostgreSQL to buffer everything therefore leads to minimal double-caching and little write caching that creates checkpoint spikes, so 90% is not impossible there.

If you're using ZFS instead, that defaults to similar aggressive caching as Linux. You may even have to turn that down if you want the database to have a large amount of memory for its own use even with normal levels of sizing; just space for shared_buffers and work_mem can end up being too large of a pair of competitors for caching RAM. ZFS is not really not tuned all that differently from how Linux approaches caching in that regard.

--
Greg Smith   2ndQuadrant US    greg@xxxxxxxxxxxxxxx   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books


--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux