Skip site navigation (1) Skip section navigation (2)

Re: Prereading using posix_fadvise (was Re: Commitfest patches)

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Zeugswetter Andreas OSB SD <Andreas(dot)Zeugswetter(at)s-itsolutions(dot)at>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prereading using posix_fadvise (was Re: Commitfest patches)
Date: 2008-03-28 15:22:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Zeugswetter Andreas OSB SD wrote:
> Heikki wrote:
>> It seems that the worst case for this patch is a scan on a table that 
>> doesn't fit in shared_buffers, but is fully cached in the OS cache. In
>> that case, the posix_fadvise calls would be a certain waste of time.
> I think this is a misunderstanding, the fadvise is not issued to read
> the
> whole table and is not issued for table scans at all (and if it were it
> would 
> only advise for the next N pages).
> So it has nothing to do with table size. The fadvise calls need to be
> (and are) 
> limited by what can be used in the near future, and not for the whole
> statement.

Right, I was sloppy. Instead of table size, what matters is the amount 
of data the scan needs to access. The point remains that if the data is 
already in OS cache, the posix_fadvise calls are a waste of time, 
regardless of how many pages ahead you advise.

   Heikki Linnakangas

In response to


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2008-03-28 15:25:03
Subject: Re: advancing snapshot's xmin
Previous:From: Brendan JurdDate: 2008-03-28 15:16:45
Subject: Re: Status of GIT mirror (Was having problem in rsync'ing cvs)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group