Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3MM9h305024 for ; Sun, 22 Apr 2001 18:09:50 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f3MM8hR06601; Sun, 22 Apr 2001 18:09:03 -0400 (EDT) To: xbdelacour@yahoo.com cc: pgsql-admin@postgresql.org Subject: Re: Large database help In-reply-to: <5.0.2.1.0.20010422165107.02b46ec0@209.61.155.192> References: <5.0.2.1.0.20010422165107.02b46ec0@209.61.155.192> Comments: In-reply-to xbdelacour@yahoo.com message dated "Sun, 22 Apr 2001 17:12:20 -0400" Date: Sun, 22 Apr 2001 18:08:43 -0400 Message-ID: <6598.987977323@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200104/98 X-Sequence-Number: 1235 xbdelacour@yahoo.com writes: > Hi everyone, I'm more or less new to PostgreSQL and am trying to setup a > rather large database for a data analysis application. Data is collected > and dropped into a single table, which will become ~20GB. Analysis happens > on a Windows client (over a network) that queries the data in chunks across > parallel connections. I'm running the DB on a dual gig p3 w/ 512 memory > under Redhat 6 (.0 I think). > I am setting 'echo 402653184 >/proc/sys/kernel/shmmax', which is being > reflected in top. I also specify '-B 48000' when starting postmaster. Hm. 384M shared memory request on a 512M machine. I'll bet that the kernel is deciding you don't need all that stuff in RAM, and is swapping out chunks of the shared memory region to make room for processes and its own disk buffering activity. Try a more reasonable -B setting, like maybe a quarter of your physical RAM, max. There's no percentage in -B large enough to risk getting swapped. Moreover, any physical RAM that does happen to be free will be exploited by the kernel for disk buffering at its level, so you aren't really saving any I/O by increasing Postgres' internal buffering. BTW, what Postgres version are you using? regards, tom lane