Re: OS cached buffers (was: Support Parallel Query Execution - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: OS cached buffers (was: Support Parallel Query Execution
Date
Msg-id 200604141346.k3EDkvZ07955@candle.pha.pa.us
Whole thread Raw
In response to Re: OS cached buffers (was: Support Parallel Query Execution  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
Jim C. Nasby wrote:
> Yeah, my assumption has been that the only way to tell the difference
> would be by timing, but I don't know how practical that is. Since
> gettime() or whatever EXPLAIN ANALYZE uses is apparently very expensive,
> perhaps there's some other alternative. Perhapse the timing info in
> getrusage would work for this. Another idea is setting an alarm for a
> fairly short period before making the IO request. If the request comes
> back before the alarm fires, the data must have been in the OS cache.
> 
> Another thought is that any IO request that goes to disk would most
> likely put the process requesting the IO to sleep, but a request being
> served out of cache might not do that. Perhaps there's some way to
> recognize that.
> 
> Or maybe a better track would be to develop a patch for as many OSes as
> possible that would tell the caller if an IO request came out of cache
> or not.

Or give up, which seems the most fruitful approach.

--  Bruce Momjian   http://candle.pha.pa.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Control File
Next
From: Greg Stark
Date:
Subject: Re: Practical impediment to supporting multiple SSL libraries