Re: Bug: Buffer cache is not scan resistant - Mailing list pgsql-hackers

From Mark Kirkwood
Subject Re: Bug: Buffer cache is not scan resistant
Date
Msg-id 45EC8B75.9040806@paradise.net.nz
Whole thread Raw
In response to Re: Bug: Buffer cache is not scan resistant  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug: Buffer cache is not scan resistant  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> So the
> problem is not so much the clock sweep overhead as that it's paid in a
> very nonuniform fashion: with N buffers you pay O(N) once every N reads
> and O(1) the rest of the time.  This is no doubt slowing things down
> enough to delay that one read, instead of leaving it nicely I/O bound
> all the time.  Mark, can you detect "hiccups" in the read rate using
> your setup?
> 

I think so, here's the vmstat output for 400MB of shared_buffers during
the scan:

procs -----------memory---------- ---swap-- -----io---- --system-- 
----cpu---- r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us 
sy id wa 1  0    764  51772      0 1990688    0    0 120422     2 1546  1755 16 
37 46  1 1  0    764  53640      0 1988792    0    0 120422     2 1544  1446 14 
40 46  1 1  0    788  54900      0 1987564    0    0 116746    15 1470  3067 15 
39 44  2 1  0    788  52800      0 1989552    0    0 119199    20 1488  2216 14 
37 47  1 1  0    788  52372      0 1990000    0    0 122880     7 1532  1203 15 
39 45  1 1  0    788  54592      0 1987872    0    5 124928     5 1557  1058 17 
38 46  0 2  0    788  54052      0 1987836    0    0 118787     0 1500  2469 16 
36 47  1 1  0    788  52552      0 1989892    0    0 120419     0 1506  2531 15 
36 48  1 1  0    788  53452      0 1989356    0    0 119195     2 1501  1698 15 
37 47  1 1  0    788  52680      0 1989796    0    0 120424     2 1521  1610 16 
37 47  1


Cheers

Mark





pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Bug: Buffer cache is not scan resistant
Next
From: Tom Lane
Date:
Subject: Re: Bug: Buffer cache is not scan resistant