Received: from bonito.atc.unican.es (bonito.atc.unican.es [193.144.185.218]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0OIMFl23478 for ; Thu, 24 Jan 2002 13:22:15 -0500 (EST) (envelope-from lamigo@atc.unican.es) Received: from atc.unican.es (congrio [193.144.185.193]) by bonito.atc.unican.es (8.11.0/8.8.7) with ESMTP id g0OIOQL32033; Thu, 24 Jan 2002 19:24:26 +0100 Message-ID: <3C505122.40C40C13@atc.unican.es> Date: Thu, 24 Jan 2002 19:23:30 +0100 From: Luis Amigo X-Mailer: Mozilla 4.76C-SGI [en] (X11; I; IRIX64 6.5 IP25) X-Accept-Language: en MIME-Version: 1.0 To: "Peter T. Brown" CC: "'Jean Huveneers'" , pgsql-admin@postgresql.org Subject: Re: Maximum Performance Follow-up Question References: <003301c1a501$aa69df20$7d00000a@PETER> Content-Type: multipart/mixed; boundary="------------10092BC9E342DD38BC592BD0" X-Archive-Number: 200201/169 X-Sequence-Number: 3055 This is a multi-part message in MIME format. --------------10092BC9E342DD38BC592BD0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Peter T. Brown" wrote: > But how can Postgres be 'forced' to keep a table in memory? I've noticed > that on our Dual Pentium4, 1GB RAM machine, the size of the individual > postgres threads is very small. Top reports it as like 5K or 20K (I believe > that's what it means). Shouldn't this number be 100's of MB if postgres is > properly moving my tables to RAM? I do notice that the system cache is very > very large... Is there any way to specify that a certain table should have > priority for being transferred into RAM? Should I reduce the system cache > size so that postgres has more room to play with? > > Thanks for any help! > > here is a top dump: > I don't know about linuxes, so I can't tell u about cache, what I can tell u is if u asign a high number to shared_buffers(I would use 65536 for 1Gb ram machine) and a high sort_mem(16384kb on this machine) in postgres.conf u can do that all the data a query needs could be on memory. here is sizes for one of our backends(i've no time so i don't leave him to charge all in memory(659M demanded 15M used) with a 100Mb base(a lot more with indexes) PID PGRP USERNAME PRI SIZE RES STATE TIME WCPU% CPU% COMMAND 97441 94523 lamigo 20 659M 15M sleep 0:00 8.8 8.83 postgre this is a memory snap shot of a typical load(7 backends with AD-HOC queries) IRIX64 congrio 6.5 IP25 load averages: 6.04 5.03 3.73 20:19:56 97 processes: 90 sleeping, 7 running 8 CPUs: 25.3% idle, 72.1% usr, 2.5% ker, 0.0% wait, 0.0% xbrk, 0.1% intr Memory: 1024M max, 940M avail, 221M free, 2304M swap, 2294M free swap feel free of making questions hope it helps regards --------------10092BC9E342DD38BC592BD0 Content-Type: text/x-vcard; charset=us-ascii; name="lamigo.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Luis Amigo Content-Disposition: attachment; filename="lamigo.vcf" begin:vcard n:Amigo Navarro;Luis Alberto tel;cell:609581857 x-mozilla-html:FALSE org:Universidad de Cantabria;Arquitectura de Computadores adr:;;Avda Los Castros S/N ;Santander;Cantabria;39005;Espaņa version:2.1 email;internet:lamigo@atc.unican.es x-mozilla-cpt:;0 fn:Luis Amigo end:vcard --------------10092BC9E342DD38BC592BD0--