pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tv@fuzzy.cz>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: H800 + md1200 Performance problem
Date: Wed, 04 Apr 2012 18:54:06 +0200
Message-ID: <4F7C7CAE.40306@fuzzy.cz> (raw)
In-Reply-To: <CAOR=d=0SQ7K4PGMqjpNj6URg+Bn8A4Duo2bkX2-QXvp7xy4mjg@mail.gmail.com>
References: <CAMAsR=4acKwYjow-VWQ0xH0+WjXEtVJWxP0A0y4vx=oyr5fhpQ@mail.gmail.com>
	<920BB532-C321-45A3-851E-8B688A5963F7@yahoo.com>
	<CAMAsR=7g5PXU45+Z3aBW+ur-kPQKiW2MG=NJ3TOqNn6iqaVCVw@mail.gmail.com>
	<4F7AF966.20809@fuzzy.cz>
	<CAMAsR=637=zAtOSxGF=JH9apfOtU7FaUXR27+J2syzE_c-rdYw@mail.gmail.com>
	<4F7B3AEC.4000204@fuzzy.cz>
	<CAMAsR=7onjeWr--PtgHgfZv=yYSB8FVxf1BsYSwu2752YY0Q8w@mail.gmail.com>
	<CAOR=d=036JkSF9743YBBLF3avOSqOs4niadGR0UDu6Ji5ba5xw@mail.gmail.com>
	<4F7C4AAE.4060608@fuzzy.cz>
	<CAOR=d=0SQ7K4PGMqjpNj6URg+Bn8A4Duo2bkX2-QXvp7xy4mjg@mail.gmail.com>

On 4.4.2012 18:22, Scott Marlowe wrote:
> On Wed, Apr 4, 2012 at 7:20 AM, Tomas Vondra <tv@fuzzy.cz> wrote:
>> On 4.4.2012 15:15, Scott Marlowe wrote:
>>> On Wed, Apr 4, 2012 at 3:42 AM, Cesar Martin <cmartinp@gmail.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.



view thread (36+ messages)  latest in thread

Message-ID: <4F7C7CAE.40306@fuzzy.cz>
Permalink:  ../4F7C7CAE.40306@fuzzy.cz/
Also on:    postgresql.org/message-id/4F7C7CAE.40306@fuzzy.cz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tv@fuzzy.cz, scott.marlowe@gmail.com
  Subject: Re: H800 + md1200 Performance problem
  In-Reply-To: <4F7C7CAE.40306@fuzzy.cz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox