dbTalk Databases Forums  

[BUGS] A memory leak. Postgres 7.4. Mac OS. X Server

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] A memory leak. Postgres 7.4. Mac OS. X Server in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PAviles@its.co.cr
 
Posts: n/a

Default [BUGS] A memory leak. Postgres 7.4. Mac OS. X Server - 05-28-2004 , 07:13 PM






This is a multipart message in MIME format.
--=_alternative 0075C19606256E9B_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,=20
we have a postgresql 7.4 database server on an X Server with Mac OS=20
10.3.3, 7F45
The server possess two CPU's, 4 Gb in memory, and an adequate space on=20
disk.
The service run fine in the majority of time. But, we see the memory go=20
down, bit by bit. (A memory leak).
No errors are produced, but the memory is missing, and then we need to=20
restart the service (pg_ctl restart) to clean the busy memory. Before the=
=20
reload, the postgres run slow (by the lack of memory, I think!).
Postgres was compiled with gcc 3.3, with fink on stable (read line, open=20
ssl),=20
and with CFLAGS=3D -03-mtune=3D970 -funroll-loops
The parameters used was: /configure --with-includes=3D/sw/include=20
--with-libraries=3D/sw/lib --prefix=3D/sw --with-rendevouz

Regards

Pablo Avil=E9s Cisneros=20
Area Manager=20
Software Research and Development Area
Development and Research, ITS=20
San Jos=E9,Costa Rica=20
email: paviles (AT) its (DOT) co.cr
phone: (506) 2110319=20
cel: (506) 8444312=20
--=_alternative 0075C19606256E9B_=
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"sans-serif">Hi, </font>
<br><font size=3D2 face=3D"sans-serif">we have a postgresql 7.4 database se=
rver
on an &nbsp;X Server with Mac OS 10.3.3, 7F45</font>
<br><font size=3D2 face=3D"sans-serif">The server &nbsp;possess two CPU's,
4 Gb in memory, and an adequate space on disk.</font>
<br><font size=3D2 face=3D"sans-serif">The service run fine in the majority
of time. But, we see the memory go down, bit by bit. (A memory leak).</font>
<br><font size=3D2 face=3D"sans-serif">No errors are produced, but the memo=
ry
is missing, and then we need to restart the service (pg_ctl restart) to
clean the busy memory. Before the reload, the postgres run slow (by the
lack of memory, I think!).</font>
<br><font size=3D2 face=3D"sans-serif">Postgres was compiled with gcc 3.3,
with fink on stable (read line, open ssl), </font>
<br><font size=3D2 face=3D"sans-serif">and with CFLAGS=3D -03-mtune=3D970 -=
funroll-loops</font>
<br><font size=3D2 face=3D"sans-serif">The parameters used was: /configure
--with-includes=3D/sw/include --with-libraries=3D/sw/lib --prefix=3D/sw --w=
ith-rendevouz<br>
</font><font size=3D2 face=3D"Arial"><br>
Regards</font>
<p><font size=3D2 face=3D"Arial Unicode MS"><b><i><br>
Pablo Avil=E9s Cisneros <br>
Area Manager <br>
Software Research and Development Area<br>
Development and Research, ITS </i></b><i><br>
San Jos=E9,Costa Rica <br>
email: </i></font><font size=3D2 color=3D#000080 face=3D"Arial Unicode MS">=
<i><u>paviles (AT) its (DOT) co.cr</u></i></font><font size=3D2 face=3D"Arial Unicode =
MS"><i><br>
phone: (506) 2110319 <br>
cel: (506) 8444312 </i></font>
--=_alternative 0075C19606256E9B_=--

Reply With Quote
  #2  
Old   
Christian van der leeden
 
Posts: n/a

Default Re: [BUGS] A memory leak. Postgres 7.4. Mac OS. X Server - 06-07-2004 , 03:58 PM






--Apple-Mail-1-959338206
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed

Hi,

this is just a me too message. We have 7.4.2 running which
was build from fink (I guess same compiler settings).

My investigation so far is that:
- the system will eat more and more memory and will start swapping
to hard disk
- no performance hits so far (I haven't noticed any)
- the system will crash when the partition where the swap files reside=20
is full
- stopping the connections will free up the virtual memory reported in=20
top
- stopping postmaster will free up the disk space used for swapping and
will bring back everything to "normal"
- top will report nothing unusual (no large VSIZE, RSIZE, RSHRD values
per process), just a large total of virtual memory

Settings:
shared_buffers =3D 12500 # 12500*8.2kB + 1 MB =3D shmem ~=3D100MB

/etc/rc
sysctl -w kern.sysv.shmmax=3D268435456
sysctl -w kern.sysv.shmmin=3D1
sysctl -w kern.sysv.shmmni=3D32
sysctl -w kern.sysv.shmseg=3D8
sysctl -w kern.sysv.shmall=3D65536

We've got about 50 concurrent connections (WebApp, via JDBC...)
OSX Server 10.3.4, on XServe G5 2x2Ghz

Another thing is that we have a C trigger that will do replication on=20
update/insert/delete.

The whole setup was fine when running on 10.2.x and 7.3.4.

Anyway, I don't know if this is a postgres problem or an OSX 10.3.4=20
problem.

If you have any hints or places or tools that I could use to analyze the
problem more throughly, I'd be very glad (right now we're down to=20
rebooting
the system every week).

The DB has one large table with around 1.6 million rows.

Thanks

Christian




On May 21, 2004, at 10:15 PM, PAviles (AT) its (DOT) co.cr wrote:

Quote:
Hi,
we have a postgresql 7.4 database server on an =A0X Server with Mac OS=20
10.3.3, 7F45
The server =A0possess two CPU's, 4 Gb in memory, and an adequate space=20
on disk.
The service run fine in the majority of time. But, we see the memory=20
go down, bit by bit. (A memory leak).
No errors are produced, but the memory is missing, and then we need to=20
restart the service (pg_ctl restart) to clean the busy memory. Before=20
the reload, the postgres run slow (by the lack of memory, I think!).
Postgres was compiled with gcc 3.3, with fink on stable (read line,=20
open ssl),
and with CFLAGS=3D -03-mtune=3D970 -funroll-loops
The parameters used was: /configure --with-includes=3D/sw/include=20
--with-libraries=3D/sw/lib --prefix=3D/sw --with-rendevouz

Regards


Pablo Avil=E9s Cisneros
Area Manager
Software Research and Development Area
Development and Research, ITS
San Jos=E9,Costa Rica
email: paviles (AT) its (DOT) co.cr
phone: (506) 2110319
cel: (506) 8444312
--Apple-Mail-1-959338206
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1

Hi,


this is just a me too message. We have 7.4.2 running which

was build from fink (I guess same compiler settings).


My investigation so far is that:

- the system will eat more and more memory and will start swapping

to hard disk

- no performance hits so far (I haven't noticed any)

- the system will crash when the partition where the swap files reside
is full

- stopping the connections will free up the virtual memory reported in
top

- stopping postmaster will free up the disk space used for swapping and

will bring back everything to "normal"

- top will report nothing unusual (no large VSIZE, RSIZE, RSHRD values=20

per process), just a large total of virtual memory


Settings:

shared_buffers =3D 12500 # 12500*8.2kB + 1 MB =3D shmem ~=3D100MB


/etc/rc

sysctl -w kern.sysv.shmmax=3D268435456

sysctl -w kern.sysv.shmmin=3D1

sysctl -w kern.sysv.shmmni=3D32

sysctl -w kern.sysv.shmseg=3D8

sysctl -w kern.sysv.shmall=3D65536


We've got about 50 concurrent connections (WebApp, via JDBC...)

OSX Server 10.3.4, on XServe G5 2x2Ghz


Another thing is that we have a C trigger that will do replication on
update/insert/delete.


The whole setup was fine when running on 10.2.x and 7.3.4.


Anyway, I don't know if this is a postgres problem or an OSX 10.3.4
problem.


If you have any hints or places or tools that I could use to analyze
the

problem more throughly, I'd be very glad (right now we're down to
rebooting

the system every week).


The DB has one large table with around 1.6 million rows.


Thanks


Christian





On May 21, 2004, at 10:15 PM, PAviles (AT) its (DOT) co.cr wrote:


<excerpt>

<smaller>Hi, </smaller>

<smaller>we have a postgresql 7.4 database server on an =A0X Server with
Mac OS 10.3.3, 7F45</smaller>=20

<smaller>The server =A0possess two CPU's, 4 Gb in memory, and an
adequate space on disk.</smaller>=20

<smaller>The service run fine in the majority of time. But, we see the
memory go down, bit by bit. (A memory leak).</smaller>=20

<smaller>No errors are produced, but the memory is missing, and then
we need to restart the service (pg_ctl restart) to clean the busy
memory. Before the reload, the postgres run slow (by the lack of
memory, I think!).</smaller>=20

<smaller>Postgres was compiled with gcc 3.3, with fink on stable (read
line, open ssl), </smaller>

<smaller>and with CFLAGS=3D -03-mtune=3D970 -funroll-loops</smaller>=20

<smaller>The parameters used was: /configure
--with-includes=3D/sw/include --with-libraries=3D/sw/lib --prefix=3D/sw
--with-rendevouz</smaller>


<fontfamily><param>Arial</param><smaller>
Regards</smaller></fontfamily>=20



<bold><italic><smaller> Pablo Avil=E9s Cisneros </smaller></italic></bold>

<bold><italic><smaller> Area Manager</smaller></italic></bold>

<bold><italic><smaller> Software Research and Development Area</smaller></i=
talic></bold>

<bold><italic><smaller> Development and Research, ITS</smaller></italic></b=
old>

<bold><italic><smaller> </smaller></italic></bold><italic><smaller>San
Jos=E9,Costa Rica </smaller></italic>

<italic><smaller> email:
<color><param>0000,0000,8080</param>paviles (AT) its (DOT) co.cr</color></smaller></it=
alic>

<italic><smaller> phone: (506) 2110319 </smaller></italic>

<italic><smaller> cel: (506) 8444312</smaller></italic>

</excerpt>
--Apple-Mail-1-959338206--



Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] A memory leak. Postgres 7.4. Mac OS. X Server - 06-07-2004 , 11:58 PM



Christian van der leeden <lists (AT) logicunited (DOT) com> writes:
Quote:
this is just a me too message.
Neither one of you has provided any information that would let anyone
else even guess where to look for the problem :-(

For starters, which process or processes is eating memory? (see top(1))

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #4  
Old   
Christian van der Leeden
 
Posts: n/a

Default Re: [BUGS] A memory leak. Postgres 7.4. Mac OS. X Server - 06-11-2004 , 04:17 AM



--Apple-Mail-17--883815247
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed

Hi Tom,

I'll try to be more specific, but top doesn't report anything
unusual. Each connection (28 of them) has around 1 MB RPRVT,
101 MB real shared, between 10 and 50 MB Real Size, and
231 MB Virtual Size. These values haven't changed. The postmaster
has 60k Real private, 101MB Real shared, 756 k real size and 230 MB
in Virtual Size.

shared buffers is at shared_buffers = 12500 (100 MB)
sort_mem = 5000
vacuum_mem = 5000

My problem is that I can't pinpoint a process that is constantly paging
out. So any pointers to tools to investigate the problem more would
be very helpful. Any unusual things to look for when running
lsof? Nothing special in the postgres server log.
Settings for shared memory in /etc/rc:
sysctl -w kern.sysv.shmmax=268435456
sysctl -w kern.sysv.shmmin=1
sysctl -w kern.sysv.shmmni=32
sysctl -w kern.sysv.shmseg=8
sysctl -w kern.sysv.shmall=65536

The only thing that strikes me as odd, is that each connection has such
a large
virtual size, our backup system is running with shared_buffers of 10 MB
and shows only around 30 MB Virtual size.

Basic problem that the system is paging out and allocating more and
more place
on the disc persists (9 GB, right now and has been up for 3 days).

Maybe I'll try to lower shared buffers...

Christian

P.S.: Running 7.4.2 on OSX 10.3.4 with 4.5 GB RAM.



On Jun 8, 2004, at 6:53 AM, Tom Lane wrote:

Quote:
Christian van der leeden <lists (AT) logicunited (DOT) com> writes:
this is just a me too message.

Neither one of you has provided any information that would let anyone
else even guess where to look for the problem :-(

For starters, which process or processes is eating memory? (see top(1))

regards, tom lane

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to
majordomo (AT) postgresql (DOT) org)

-----------------------------------------------
Christian van der Leeden
Software Engineering

--Apple-Mail-17--883815247
Content-Transfer-Encoding: quoted-printable
Content-Type: text/directory;
x-unix-mode=0644;
name="Christian van der Leeden.vcf"
Content-Disposition: attachment;
filename="Christian van der Leeden.vcf"

BEGIN:VCARD
VERSION:3.0
N:van der Leeden;Christian;;;
FN:Christian van der Leeden
ORG:Logic United GmbH;
TITLE:Software Engineering
EMAIL;type=3DINTERNET;type=3DHOME;type=3Dpref:next 2you (AT) mac (DOT) com
EMAIL;type=3DINTERNET;type=3DWORK:leeden (AT) logicunited (DOT) com
TEL;type=3DWORK;type=3Dpref:+49-89-189488-66
TEL;type=3DCELL:+49-163-3747111
item1.ADR;type=3DWORK;type=3Dpref:;;Brecherspitzst rasse 8;Muenchen;;81541;G=
ermany
item1.X-ABADR:de
URL:www.logicunited.com
X-AIM;type=3DHOME;type=3Dpref:next2you
X-ICQ;type=3DWORK;type=3Dpref:13450543
CATEGORY:Buddy,EADS
END:VCARD

--Apple-Mail-17--883815247
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed



--Apple-Mail-17--883815247
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

--Apple-Mail-17--883815247--



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.