X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 3A7E49FA509 for ; Fri, 5 May 2006 08:54:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 21901-03 for ; Fri, 5 May 2006 08:54:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from morpheus.bostonstock.com (unknown [192.233.205.44]) by postgresql.org (Postfix) with ESMTP id 16C259FA372 for ; Fri, 5 May 2006 08:54:31 -0300 (ADT) Received: by MORPHEUS with Internet Mail Service (5.5.2653.19) id <2R02CAV7>; Fri, 5 May 2006 07:49:37 -0400 Message-ID: <0C4841B42F87D51195BD00B0D020F5CB044B2608@MORPHEUS> From: "mcelroy, tim" To: pgsql-performance@postgresql.org Subject: Memory and/or cache issues? Date: Fri, 5 May 2006 07:49:32 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C67039.F90AB2B4" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/104 X-Sequence-Number: 18891 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C67039.F90AB2B4 Content-Type: text/plain; charset="iso-8859-1" Good morning, First the stats: I'm using PostgreSQL 8.0.1 (I know I should upgrade, cannot due to vendor app. restrictions...), RedHat 9 on a SUN V40Z with 8GB of memory. I'm using the "out-of-the-box" settings in postgresql.conf. I've been testing various changes but cannot increase anything to improve performance till I get this memory leak and/or cache issue resolved. Scenario: Last night the backup of my largest DB failed (4.4GB in size with 44Million+ tuples) with a memory alloc error. I'll attach it at the end of this email. Once we rebooted the box and freed memory all was well, the backup completed fine but as the backup ran and I did a few minor queries all of a sudden 3+GB of memory was used up! I then performed my nightly vacuumdb with analyze and just about the remaining 4GB of memory was gone! This was the only application running in the machine at the time. Questions: 1. I thought using such "smallish" setting as provided would cause postgres to go to swap instead of eating up all the memory? 2. If PostgreSQL is the culprit (which I hope it is not) does postgres release any memory it assumes during processing when that processing is complete? Such as the backup and vacuumdb I mentioned? 3. Does anyone know of a way to determine if it actually is postgres hogging this memory? Using TOP I only see my postgres processes using 1% or 2% of memory. It would be nice to have a tool that showed exactly what is eating up that 7+GB? 4. IS this due to my low setting in postgresql.conf? Any and all help is welcomed. For you PostgreSQL purists out there of whom I am fast becoming, your help is needed as my company is considering dumping postgresql in favor of Oracle.....I would much rather figure out the issue then switch DBs. Here is the error received from the failed backup and the second was noted in my pg_log file: pg_dump: ERROR: invalid memory alloc request size 18446744073709551613 pg_dump: SQL command to dump the contents of table "msgstate" failed: PQendcopy() failed. pg_dump: Error message from server: ERROR: invalid memory alloc request size 18446744073709551613 pg_dump: The command was: COPY public.msgstate (id, connectormsgid, parentid, orderidfk, clordid, orgclordid, msg, rawmsg, msgtype, "action", sendstate, statechain, fromdest, todest, inserted, op_id, released, reason, outgoing, symbol, qty, price, stopprice, side, data1, data2, data3, data4, data5) TO stdout; 2006-05-04 18:04:58 EDT USER=postgres DB=FIX1 [12427] PORT = [local] ERROR: invalid memory alloc request size 18446744073709551613 Thank you, Tim McElroy ------_=_NextPart_001_01C67039.F90AB2B4 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Memory and/or cache issues?

Good morning,

First the stats:  I'm using = PostgreSQL 8.0.1 (I know I should upgrade, cannot due to vendor app. = restrictions...), RedHat 9 on a SUN V40Z with 8GB of memory.  I'm = using the "out-of-the-box" settings in postgresql.conf.  = I've been testing various changes but cannot increase anything to = improve performance till I get this memory leak and/or cache issue = resolved.

Scenario:  Last night the backup = of my largest DB failed (4.4GB in size with 44Million+ tuples) with a = memory alloc error.  I'll attach it at the end of this = email.  Once we rebooted the box and freed memory all was well, = the backup completed fine but as the backup ran and I did a few minor = queries all of a sudden 3+GB of memory was used up!  I then = performed my nightly vacuumdb with analyze and just about the remaining = 4GB of memory was gone!  This was the only application running in = the machine at the time.

Questions:
1. I thought using such = "smallish" setting as provided would cause postgres to go to = swap instead of eating up all the memory?

2. If PostgreSQL is the culprit (which = I hope it is not) does postgres release any memory it assumes during = processing when that processing is complete?  Such as the backup = and vacuumdb I mentioned?

3. Does anyone know of a way to = determine if it actually is postgres hogging this memory?  Using = TOP I only see my postgres processes using 1% or 2% of memory.  It = would be nice to have a tool that showed exactly what is eating up that = 7+GB?

4. IS this due to my low setting in = postgresql.conf?

Any and all help is welcomed.  = For you PostgreSQL purists out there of whom I am fast becoming, your = help is needed as my company is considering dumping postgresql in favor = of Oracle.....I would much rather figure out the issue then switch = DBs.  Here is the error received from the failed backup and the = second was noted in my pg_log file:

pg_dump: ERROR:  invalid memory = alloc request size 18446744073709551613
pg_dump: SQL command to dump the = contents of table "msgstate" failed: PQendcopy() = failed.
pg_dump: Error message from server: = ERROR:  invalid memory alloc request size = 18446744073709551613
pg_dump: The command was: COPY = public.msgstate (id, connectormsgid, parentid, orderidfk, clordid, = orgclordid, msg, rawmsg, msgtype, "action", sendstate, = statechain, fromdest, todest, inserted, op_id, released, reason, = outgoing, symbol, qty, price, stopprice, side, data1, data2, data3, = data4, data5) TO stdout;


2006-05-04 18:04:58 EDT = USER=3Dpostgres DB=3DFIX1 [12427] PORT =3D [local] ERROR:  invalid = memory alloc request size 18446744073709551613

Thank you,
Tim McElroy

------_=_NextPart_001_01C67039.F90AB2B4--