Re: Piggybacking vacuum I/O - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Piggybacking vacuum I/O
Date
Msg-id 45B718B3.5070901@enterprisedb.com
Whole thread Raw
In response to Re: Piggybacking vacuum I/O  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Responses Re: Piggybacking vacuum I/O
List pgsql-hackers
Pavan Deolasee wrote:
> I have just counted the number of read/write calls on the CLOG blocks. As
> you can
> see the total number of CLOG reads jumped from 545323 to 1181851 i.e.
> 1181851 - 545323 = 636528 CLOG block reads for 1554697 pages of stock 
> table.

Hmm. So there is some activity there. Could you modify the patch to 
count how many of those reads came from OS cache? I'm thinking of doing 
a gettimeofday() call before and after read, and counting how many 
calls finished in less than say < 1 ms. Also, summing up the total time 
spent in reads would be interesting.

Or, would it be possible to put the clog to a different drive, and use 
iostat to get the numbers?

> This figure is only indicative since it also includes the CLOG block reads
> which would
> have happened as part of other backend operations (VACUUM took almost 55
> minutes to
> complete). Still in the first 210 minutes of the run, the total reads were
> only 545323. So
> most of the 636528 reads in the next 55 minutes can be attributed to 
> VACUUM.

Actually, clog reads during normal activity is even worse.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: "Pavan Deolasee"
Date:
Subject: Re: Piggybacking vacuum I/O
Next
From: re-plore
Date:
Subject: Searching some sites explaing about PosgtreSQL source codes