Re: heavy swapping, not sure why

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Lonni J Friedman <netllama(at)gmail(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: heavy swapping, not sure why
Date: 2011-08-30 22:31:08
Message-ID: CAHyXU0zRrAuudU-fxWB9uLxiO7875DKa8a8yhKz7vkfbXauV2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 30, 2011 at 5:05 PM, Lonni J Friedman <netllama(at)gmail(dot)com> wrote:
> On Tue, Aug 30, 2011 at 2:55 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:
>> On 08/30/11 12:18 PM, Tom Lane wrote:
>>>>>
>>>>>            total       used       free     shared    buffers     cached
>>>>> >>  Mem:         56481      55486        995          0         15
>>>>> >>  53298
>>>>> >>  -/+ buffers/cache:       2172      54309
>>>>> >>  Swap:         1099         18       1081
>>>>
>>>> >  This is totally uninteresting.
>>>
>>> Yeah.  You're going to need a whole lot more than 17MB of bloat before
>>> it'll be possible to tell which process is at fault, given that the
>>> expected process sizes are up to 10GB.
>>
>> indeed, its 100% normal for the linux virtual memory manager to write
>> 'dirty' pages to the swapfile during idle time.
>
> Sure, but it shouldn't grow indefinitely?

no it should not (and it can't -- you've only reserved so much space).
however 35mb swap is incredibly low. on my linux workstation vm
I've got 176mb used with nary an issue -- it fluctuates a lot
depending what happens to be going on at the time (a workstation
includes a lot of high memory low activity processes like gnome-panel
which tend to swap out). had I disabled swappiness, that would have
reduced memory available to do stuff with rather drastically.

btw symptoms of swap thrashing are 100% full swap volume, extremely
high iowait, low/no memory used for file caching, process(s) with high
non shared resident memory usage, and, depending on how serious your
situation is and how linux is configured, OOM errors and/or randomly
killed processes. for systems not under extreme memory stress
(including yours, at least at the moment) it's main purpose is to make
sure some processes doesn't gobble up memory and sit on it.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dan Scott 2011-08-30 22:45:44 Re: SELECT Query on DB table preventing inserts
Previous Message Ben Chobot 2011-08-30 22:24:38 regression between 8.4.8 and 8.4.2?