| From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> | 
|---|---|
| To: | Gerhard Hintermayer <g(dot)hintermayer(at)inode(dot)at> | 
| Cc: | <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: Backend memory leakage when inserting | 
| Date: | 2003-05-06 20:41:17 | 
| Message-ID: | Pine.LNX.4.33.0305061440280.6450-100000@css120.ihs.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Tue, 6 May 2003, Gerhard Hintermayer wrote:
> Gerhard Hintermayer wrote:
> > Should have investigated this better before posting:
> > 
> > I have the following test case:
> > PostgreSQL 7.3.1 on i686-pc-linux-gnu, compiled by GCC 2.95.2 (running
> > a 2.2.23 kernel)
> > create an empty database
> > create table testdb(i integer,t timestamp);
> > 
> > edit a file fill.sql with 500 identical lines:
> > INSERT INTO testdb VALUES(1,'now()');
> > 
> > check memory of backend process (ps axuw): Column RSS 3224
> > \i fill.sql
> > backend RSS 3295 (ok, some sort of basic mem probably)
> > \i fill.sql ~ 10 times
> > backend RSS 3300
> > \i fill.sql ~ 25 times
> > backend RSS 3304
> > \i fill.sql ~ 70 times
> > backend RSS 3316
> > 
> > VSZ value is always the same (6248). So what's going on here ?
> > 
> > 
> > (now i have ~ 53500 tuples in my table)
> > 
> > 
> > I have no idea, what's going on here ? Any ideas ?
> > 
> > Gerhard
> 
> Did compile postgreSQL (7.3.1) on a SuSE 8.1 box (Linux,2.4.19 kernel) 
> and see exactly the same behavior. Seems like the amount of leakage 
> depends on the size (number of tables, number of triggers ???) of the 
> whole database, on a empty database the memory growth rate is quite slow 
> (see posted example) , on the production system the mem usage was ~ 120 
> MB after ~ 300000 inserts.
How many shared buffers is your machine set to use?  it may just be using 
them and it looks like a memory leak when it isn't.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Erik Ronström | 2003-05-06 21:53:22 | Server error | 
| Previous Message | Nigel J. Andrews | 2003-05-06 19:56:50 | Re: What is the best practise for "autonumbering"..? |