From remy.tech@webnet.qc.ca Wed Jul 5 19:16:37 2000 Received: from mail.webnet.qc.ca (mail.webnet.qc.ca [216.13.57.5]) by hub.org (8.10.1/8.10.1) with ESMTP id e65JGaS69507 for ; Wed, 5 Jul 2000 15:16:37 -0400 (EDT) Received: from prog [216.13.59.209] by mail.webnet.qc.ca (SMTPD32-5.05) id ABCFEE08006A; Wed, 05 Jul 2000 15:26:07 -0400 Message-ID: <000801bfe6b5$b1d72800$090a0a0a@prog> From: =?iso-8859-1?Q?R=E9my_Dufour?= To: Subject: Memory management Date: Wed, 5 Jul 2000 15:17:42 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0005_01BFE694.2A5009E0" X-Archive-Number: 200007/13 This is a multi-part message in MIME format. ------=_NextPart_000_0005_01BFE694.2A5009E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi there, Recently, I've installed postgres 6.5 on a P3 450 396 megs of RAM. I'm running Linux RedHat 6.2. I got a few db on it and one has around 2 million= s records. When I boot my server, I do a 'free' and it tells me that I got = around 300 megs of RAM free. After I do a couple of requests like "Select count(ID) from Store" the memo= ry fills itself and my system swaps a bit. So, is there a way to limit the memory postgresql is allowed to use? And, if anyone can point me out some docs or references on how postgresql/l= inux manage its memory. I would just add more memory to my machine, but it seems to me that it will= always fills itself and swap some. Regards, Remy Dufour IT Programmer WebNet Inc - ISP remy.tech@webnet.qc.ca ------=_NextPart_000_0005_01BFE694.2A5009E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi there,
 
Recently, I've installed postgres 6.5 on a= P3 450=20 396 megs of RAM. I'm
running Linux RedHat 6.2. I got a few db on it and = one=20 has around 2 millions records. When I boot my server, I do a 'free' and it = tells=20 me that I got around 300 megs of RAM free.
 
After I do a couple of requests like "Sele= ct=20 count(ID) from Store" the memory fills itself and my system swaps a=20 bit.
 
So, is there a way to limit the memory pos= tgresql=20 is allowed to use?
 
And, if anyone can point me out some docs = or=20 references on how postgresql/linux
 manage its memory.
 
I would just add more memory to my machine= , but it=20 seems to me that it will always fills itself and swap some.
 
Regards,
 
Remy Dufour
IT Programmer
WebNet Inc= -=20 ISP
remy.tec= h@webnet.qc.ca
= ------=_NextPart_000_0005_01BFE694.2A5009E0-- From kumar1@home.com Fri Jul 7 00:51:45 2000 Received: from C654771-a.frmt1.sfba.home.com (IDENT:root@c654771-a.frmt1.sfba.home.com [24.1.65.243]) by hub.org (8.10.1/8.10.1) with ESMTP id e670pjW98842 for ; Thu, 6 Jul 2000 20:51:45 -0400 (EDT) Received: (from kumar1@localhost) by C654771-a.frmt1.sfba.home.com (8.9.3/8.9.3) id RAA09482; Thu, 6 Jul 2000 17:51:39 -0700 To: pgsql-admin@postgresql.org Subject: Re: Memory management References: <000801bfe6b5$b1d72800$090a0a0a@prog> From: kumar1@home.com (Prasanth A. Kumar) Date: 06 Jul 2000 17:51:39 -0700 In-Reply-To: Rémy Dufour's message of "Wed, 5 Jul 2000 15:17:42 -0400" Message-ID: Lines: 36 X-Mailer: Gnus v5.7/Emacs 20.7 X-Archive-Number: 200007/25 =?iso-8859-1?Q?R=E9my_Dufour?= writes: Recently, I've installed postgres 6.5 on a P3 450 396 megs of RAM. I'm > running Linux RedHat 6.2. I got a few db on it and one has around 2 million= > s records. When I boot my server, I do a 'free' and it tells me that I got = > around 300 megs of RAM free. > > After I do a couple of requests like "Select count(ID) from Store" the memo= > ry fills itself and my system swaps a bit. > > So, is there a way to limit the memory postgresql is allowed to use? > > And, if anyone can point me out some docs or references on how postgresql/l= > inux > manage its memory. > > I would just add more memory to my machine, but it seems to me that it will= > always fills itself and swap some. You might be able to use the ulimit command to prevent a app running from exceeding a particular amount of virtual memory but that is a per process limit I think. Also, a common mistake people make when they check free memory is they look at the wrong column. In the example below, the free space is 24112K, not 3820K because buffers and caches are just otherwise unused memory put to good use. See the sample below: total used free shared buffers cached Mem: 127720 123900 3820 45420 2984 17308 -/+ buffers/cache: 103608 24112 Swap: 539264 19988 519276 -- Prasanth Kumar kumar1@home.com