> Nope - just reading N buffers ahead for seqscans. Subsequent > calls use previously read pages. The objective is to issue > contiguous reads to the OS in sizes greater than the PG page > size (which is much smaller than what is needed for fast > sequential I/O).
Problem here is that eighter you issue the large read into throwaway private memory and hope that when you later read 8k you get the page from OS buffercache, or you need ScatterGather IO and a way to grab 32 buffers at once. > Yes, I think the ring buffer strategy should be used when the > table size is > 1 x bufcache and the ring buffer should be of > a fixed size smaller than L2 cache (32KB - 128KB seems to work well). How do you merge those two objectives? It seems the ring buffer needs to be at least as large as the contiguous read size. Thus you would need at least 256k ring buffer. Better yet have twice the IO size as ring buffer size, so two sessions can alternately take the lead while the other session still blocks a prev page. Modern L2 cache is 8 Mb, so 512k seems no problem ? Andreas ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings