Received: from smtp018.mail.yahoo.com (smtp018.mail.yahoo.com [216.136.174.115]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3MMuN317040 for ; Sun, 22 Apr 2001 18:56:23 -0400 (EDT) (envelope-from xbdelacour@yahoo.com) Received: from adsl-151-203-18-126.bostma.adsl.bellatlantic.net (HELO slim.yahoo.com) (151.203.18.126) by smtp.mail.vip.sc5.yahoo.com with SMTP; 22 Apr 2001 22:56:20 -0000 X-Apparently-From: Message-Id: <5.0.2.1.0.20010422184417.01972e70@pop.mail.yahoo.com> X-Sender: xbdelacour@pop.mail.yahoo.com X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Sun, 22 Apr 2001 18:52:26 -0400 To: Ragnar =?iso-8859-1?Q?Kj=F8rstad?= From: xbdelacour@yahoo.com Subject: Re: Large database help Cc: pgsql-admin@postgresql.org In-Reply-To: <20010423004646.A4724@vestdata.no> References: <5.0.2.1.0.20010422165107.02b46ec0@209.61.155.192> <5.0.2.1.0.20010422165107.02b46ec0@209.61.155.192> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by postgresql.org id f3MMuN317041 X-Archive-Number: 200104/101 X-Sequence-Number: 1238 I'm spawning 6 backends to query the data. top lists 6 postmaster processes working, and therefore the idle time should hit 0% easily. Also, the hard drive light goes nuts when I'm running this. Here is the pertinent information from top. To be clear, I'm NOT spawning a new postmaster per chunk. These same six processes are alive and kicking for over 4 minutes. I hope the formatting works ok. PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND 2379 mg 13 0 14476 14M 12908 S 0 5.8 2.7 0:01 postmaster 2380 mg 10 0 14436 14M 12868 S 0 2.9 2.7 0:01 postmaster 2381 mg 10 0 13572 13M 12012 S 0 2.9 2.6 0:00 postmaster 2377 mg 10 0 13640 13M 12072 S 0 2.4 2.6 0:01 postmaster 2378 mg 11 0 14476 14M 12908 S 0 2.4 2.7 0:01 postmaster 2376 mg 8 0 13556 13M 11984 S 0 1.9 2.6 0:00 postmaster 27 processes: 24 sleeping, 3 running, 0 zombie, 0 stopped CPU states: 16.3% user, 3.8% system, 0.0% nice, 79.8% idle Mem: 517292K av, 508400K used, 8892K free, 94444K shrd, 197224K buff Swap: 65988K av, 0K used, 65988K free 160740K cached -Xavier At 12:46 AM 4/23/01 +0200, Ragnar Kjørstad wrote: >On Sun, Apr 22, 2001 at 05:12:20PM -0400, xbdelacour@yahoo.com wrote: > > My problem is this: during the query process the hard drive is being > tagged > > excessively, while the cpu's are idling at 50% (numbers from Linux > command: > > top), and this is bringing down the speed pretty dramatically since the > > process is waiting on the hard disk. How do I get the database to be > > completely resident in memory such that selects don't cause hdd activity? > > How do I pin how exactly why the hard disk is being accessed? > >50% idle on a 2 CPU system mean one CPU is busy and one is idle - as >expected if you run a single CPU-intensive job. > > > I am setting 'echo 402653184 >/proc/sys/kernel/shmmax', which is being > > reflected in top. I also specify '-B 48000' when starting postmaster. My > > test DB is only 86MB, so in theory the disk has no business being active > > once the data is read into memory unless I perform a write operation.. > What > > am I missing? > >What does top say? >How much memory do each of your postgres processes take, and how much of >it is shared? >Is there any free memory? > > >-- >Ragnar Kjørstad _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com