Search Postgresql Archives

Re: linux server configuration

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

 



On Thu, Jan 6, 2011 at 4:20 AM, Sim Zacks <sim@xxxxxxxxxxxxxx> wrote:
> We are about to build a new database server, our plan is to use Debian.
>
> Is there documentation of recommended server configurations for Linux, such
> as kernel parameters, preferred file system, etc that work best with
> postgresql?

This really depends on your hardware.  If you're running a battery
backed caching RAID controller it's a good idea to lobotamize the io
scheduler since it just gets in the way at that point:

echo noop > /sys/block/sda/queue/scheduler

On our machines with 128G of ram, we have occasionally seen swap
storms for no apparent reason, and have turned off swap.

/sbin/swapoff -a

On a machine with 16 or more cores, the linux kernel may decide to use
the zone reclaim mode, which is supposed to keep memory pinned in the
bank accessible by a certain cpu / core for things like
virtualization.  This leads to disasterous performance on file servers
and pg servers.  Turn it off in /etc/sysctl.conf:

vm.zone_reclaim_mode = 0

For most uses, linux doesn't need a lot of tuning really.  Turning the
scheduler to noop gained us a bit of performance especially as load
increases it's more noticeable that the OS is no longer trying to do
the RAID controller's job.  If you want to hunt for more tips, search
through Greg Smith's site, or buy his excellent pg 9.0 performance
book.  It'll keep you occupied for days and days with all the cool
stuff you can do to make fast pg machines.

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux