Thread: Disk and shared buffer cache use
Hello All, Is there a way to determine the percentage of data found in the shared buffer cache when running a query in PostgreSQL 7.4? Or to put it in another way, how do you measure the effectiveness of the shared buffer cache? I read through several sites on PostgreSQL performance tuning, but couldn't find a method to measure this. Thank you, Chamara
My apologies, I am afraid I am new to PostgreSQL. Where can I find contrib mdoules or a list of modules? At the pgFoundry project site? Thanks! On 5/8/07, Guido Barosio <gbarosio@gmail.com> wrote: > AFAIK there is a contrib module that helps you with these kind of > tasks, but I can't remember the name right now. But the name was > pretty clear so you won't have problems. > > g.- > > On 5/8/07, Chamara Gunaratne <chamarag@gmail.com> wrote: > > Hello All, > > Is there a way to determine the percentage of data found in the shared > > buffer cache when running a query in PostgreSQL 7.4? Or to put it in > > another way, how do you measure the effectiveness of the shared buffer > > cache? > > > > I read through several sites on PostgreSQL performance tuning, but > > couldn't find a method to measure this. > > Thank you, > > > > Chamara > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 1: if posting/reading through Usenet, please send an appropriate > > subscribe-nomail command to majordomo@postgresql.org so that your > > message can get through to the mailing list cleanly > > > > > -- > Guido Barosio > ----------------------- > http://www.globant.com > guido.barosio@globant.com > -- Priyanga Chamara Gunaratne
On May 8, 2007, at 2:29 PM, Chamara Gunaratne wrote: > Hello All, > Is there a way to determine the percentage of data found in the shared > buffer cache when running a query in PostgreSQL 7.4? Or to put it in > another way, how do you measure the effectiveness of the shared buffer > cache? > > I read through several sites on PostgreSQL performance tuning, but > couldn't find a method to measure this. > Thank you, Look at the pg_statio_* views (you'll need block level stats enabled in postgresql.conf). Personally, I wouldn't worry too much about this unless you're trying to chase some specific performance issue. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Thanks guys, you comments are much appreciated. My background is mainly in network performance evaluation and I am new to db tuning. I will enable block level stats and get the data. The reason I am looking for this data is that I am debugging a very slow db server. CPU wait time % is over 50% and it is constantly reading in MB's of data (vmstat bi column). I have shared buffers at 128MB and effective cache size at 256MB. and the db size is around 1.5GB. I am guessing that the db working set is much larger than available cache memory. Cheers, -- Chamara On 5/9/07, Jim Nasby <decibel@decibel.org> wrote: > On May 8, 2007, at 2:29 PM, Chamara Gunaratne wrote: > > Hello All, > > Is there a way to determine the percentage of data found in the shared > > buffer cache when running a query in PostgreSQL 7.4? Or to put it in > > another way, how do you measure the effectiveness of the shared buffer > > cache? > > > > I read through several sites on PostgreSQL performance tuning, but > > couldn't find a method to measure this. > > Thank you, > > Look at the pg_statio_* views (you'll need block level stats enabled > in postgresql.conf). > > Personally, I wouldn't worry too much about this unless you're trying > to chase some specific performance issue. > -- > Jim Nasby jim@nasby.net > EnterpriseDB http://enterprisedb.com 512.569.9461 (cell) > > > -- Priyanga Chamara Gunaratne