Re: Postgre Eating Up Too Much RAM - Mailing list pgsql-admin

From Aaron Bono
Subject Re: Postgre Eating Up Too Much RAM
Date
Msg-id CAAbw2tWxLNxPvbe_QxQ4W5Dm2D-oCTi9M6hdZ-4Wm3t8Y3=0MA@mail.gmail.com
Whole thread Raw
In response to Postgre Eating Up Too Much RAM  (Aaron Bono <aaron.bono@aranya.com>)
List pgsql-admin
On Wed, Jan 2, 2013 at 1:38 AM, Jesper Krogh <jesper@krogh.cc> wrote:
I do suspect you have too much IO going on for the hardware.

I would trim down. /proc/sys/vm/dirty_ratio and dirty_background_ratio to 2 and 1 and see if the problem goes away.

And establish graphing of the io-wait numbers if you dont have that allready.

I didn't know about this setting, thanks for the information.

I have been doing some reading on these settings and hope I am coming to an understanding.  Can you help clarify whether I am understanding this properly?

So this setting is the amount of disk writes, as a percentage of the RAM both physical and virtual available, that will be held before writing to the disk?  Which then would mean that the more RAM you have the more will build up before a write?  So at some point there would be some trigger to fire off the write and since we have so much RAM it could take quite some time to finish the write causing the server to appear to become unresponsive?

If my understanding of this is correct and it will block all processes while until it falls under the dirty_background_ratio then the bigger the difference between the dirty_ratio and dirty_background_ratio and the more RAM and swap you have the longer it will block all processes (causing the server to appear to lock up?).  That would definitely lead the the problems I am experiencing.

The odd thing is that the articles I am reading suggest increasing the dirty_ratio and decreasing the dirty_background_ratio which is the opposite of what you are suggesting.


Though I think these suggest lowering the ratios:

and

I just want to make sure I understand this setting before making the change.

Thank you very much for your help!

-Aaron

pgsql-admin by date:

Previous
From: ynux
Date:
Subject: SQL to monitor postgres with prtg /
Next
From: Baptiste LHOSTE
Date:
Subject: Re: Autovacuum issues with truncate and create index ...