From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Sim Zacks <sim(at)compulab(dot)co(dot)il> |
Cc: | PostgreSQL general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: linux server configuration |
Date: | 2011-01-06 14:28:49 |
Message-ID: | AANLkTikoZJV859uV7etbzZQFztQetFKons+_TP8okv89@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jan 6, 2011 at 4:20 AM, Sim Zacks <sim(at)compulab(dot)co(dot)il> 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Ribe | 2011-01-06 14:29:48 | Re: UUID column as pimrary key? |
Previous Message | Scott Ribe | 2011-01-06 14:28:04 | Re: UUID column as pimrary key? |