Re: Is this way of testing a bad idea?

From: Mark Lewis <mark(dot)lewis(at)mir3(dot)com>
To: Fredrik Israelsson <fredrik(dot)israelsson(at)eu(dot)biotage(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Is this way of testing a bad idea?
Date: 2006-08-24 13:40:19
Message-ID: 1156426819.9657.227.camel@archimedes
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Monitoring the processes using top reveals that the total amount of
> memory used slowly increases during the test. When reaching insert
> number 40000, or somewhere around that, memory is exhausted, and the the
> systems begins to swap. Each of the postmaster processes seem to use a
> constant amount of memory, but the total memory usage increases all the
> same.

So . . . . what's using the memory? It doesn't sound like PG is using
it, so is it your Java app?

If it's the Java app, then it could be that your code isn't remembering
to do things like close statements, or perhaps the max heap size is set
too large for your hardware. With early RHEL3 kernels there was also a
quirky interaction with Sun's JVM where the system swaps itself to death
even when less than half the physical memory is in use.

If its neither PG nor Java, then perhaps you're misinterpreting the
results of top. Remember that the "free" memory on a properly running
Unix box that's been running for a while should hover just a bit above
zero due to normal caching; read up on the 'free' command to see the
actual memory utilization.

-- Mark

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bucky Jordan 2006-08-24 14:38:47 Re: Is this way of testing a bad idea?
Previous Message Merlin Moncure 2006-08-24 13:21:27 Re: PowerEdge 2950 questions