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

Re: Postgres 8.2 memory weirdness

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Tory M Blue <tmblue(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgres 8.2 memory weirdness
Date: 2008-01-24 00:31:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Wed, 23 Jan 2008, Tory M Blue wrote:

> I have hundreds of thousands of updates, inserts a day. But what I'm 
> seeing is my server appears to "deallocate" memory (for the lack of a 
> better term) and performance goes to heck, slow response, a sub second 
> query takes anywhere from 6-40 seconds to complete when this happens.

Generally if you have a system doing many updates and inserts that slows 
for that long, it's because it hit a checkpoint.  I'm not sure what your 
memory-related issues are but it's possible that might be from a backlog 
of sessions using memory that are stuck behind the checkpoint, 
particularly since you mention simple query connections stacking up during 
these periods.

In any case you should prove/disprove this is checkpoint-related behavior 
before you chase down something more esoteric.  There's a quick intro to 
this area in the "Monitoring checkpoints" section of and the 
later sections go into what you can do about it.

> I suspect I've outgrown our initial postgres config, or there are more
> sysctl or other kernel tweaks that need to happen.

You should post a list of what you're changed from the defaults.  You're 
analyzing from the perspective where you assume it's a memory problem and 
a look at your config will give a better idea whether that's possible or 
not.  Other good things to mention:  exact 8.2 version, OS, total memory, 
outline of disk configuration.

* Greg Smith gsmith(at)gregsmith(dot)com Baltimore, MD

In response to


pgsql-performance by date

Next:From: Greg SmithDate: 2008-01-24 00:54:24
Subject: Re: Making the most of memory?
Previous:From: Craig JamesDate: 2008-01-23 21:06:22
Subject: Re: Making the most of memory?

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