Skip site navigation (1) Skip section navigation (2)

Re: H800 + md1200 Performance problem

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: H800 + md1200 Performance problem
Date: 2012-04-04 16:54:06
Message-ID: 4F7C7CAE.40306@fuzzy.cz (view raw or flat)
Thread:
Lists: pgsql-performance
On 4.4.2012 18:22, Scott Marlowe wrote:
> On Wed, Apr 4, 2012 at 7:20 AM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
>> On 4.4.2012 15:15, Scott Marlowe wrote:
>>> On Wed, Apr 4, 2012 at 3:42 AM, Cesar Martin <cmartinp(at)gmail(dot)com> wrote:
>>>>
>>>> I have noticed that since I changed the setting  vm.zone_reclaim_mode = 0,
>>>> swap is totally full. Do you recommend me disable swap?
>>>
>>> Yes
>>
>> Careful about that - it depends on how you disable it.
>>
>> Setting 'vm.swappiness = 0' is a good idea, don't remove the swap (I've
>> been bitten by the vm.overcommit=2 without a swap repeatedly).
> 
> I've had far more problems with swap on and swappiness set to 0 than
> with swap off.  But this has always been on large memory machines with
> 64 to 256G memory.  Even with fairly late model linux kernels (i.e.
> 10.04 LTS through 11.04) I've watched the kswapd start up swapping
> hard on a machine with zero memory pressure and no need for swap.
> Took about 2 weeks of hard running before kswapd decided to act
> pathological.
> 
> Seen it with swap on, with swappiness to 0, and overcommit to either 0
> or 2 on big machines.  Once we just took the swap partitions away it
> the machines ran fine.

I've experienced the issues in exactly the opposite case - machines with
very little memory (like a VPS with 512MB of RAM). I did want to operate
that machine without a swap yet it kept failing because of OOM errors or
panicking (depending on the overcommit ratio value).

Turns out it's quite difficult (~ almost impossible) tune the VM for a
swap-less case. In the end I've just added a 256MB of swap and
everything started to work fine - funny thing is the swap is not used at
all (according to sar).

T.

In response to

pgsql-performance by date

Next:From: Tomas VondraDate: 2012-04-04 16:59:51
Subject: Re: about multiprocessingmassdata
Previous:From: Scott MarloweDate: 2012-04-04 16:42:14
Subject: Re: H800 + md1200 Performance problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group