Memory usage per postmaster process - Mailing list pgsql-general

From Grzegorz Tańczyk
Subject Memory usage per postmaster process
Date
Msg-id 13608632.28501383415234955.JavaMail.root@Polzone
Whole thread Raw
List pgsql-general
Hello,

Recently I had some problem with tsearch2 in postgres 8.3. Application
was using JDBC connection pool and it was possible that each connection
from the pool used tsearch2(with dictionary) in some query. This
resulted in almost every postmaster process using >0.5g memory.
Solution of this particular problem was simple: create separate small
pool for tsearch2 related queries.

Unfortunately some other queries make postmaster processes grow and
while it does not make much problems in production environment, it makes
difficult to set up dev instance, because application and postgres take
more RAM than I currently have. 4GB memory in swap kills everything even
though I have it in software raid0 with 6 disks. I run postgres and
application in same LXC instance.

Now I could play around with application code even more, but it is old
and ugly, so instead I am looking at solution in postgresql.conf, which
I don't fully understand.

Postgres upgrade could also be some solution, but was there any
significant improvement in system resources management in 8.X? Upgrade
to 9.X might be too big effort at this time. I want to avoid problems
with compatiblity, because it will take a lot of time to track them in
application code which is very low quality.

Is there any way to limit total memory usage by postgres and keep
maximum connections limit? Postgresql.conf settings are default for
8.3.23. I need to have 100 connections in pool.

Thanks!

--
Regards,
   Grzegorz



pgsql-general by date:

Previous
From: Grzegorz Tańczyk
Date:
Subject: Memory usage per postmaster process
Next
From: John R Pierce
Date:
Subject: Re: Memory usage per postmaster process