Re: [HACKERS] posix_fadvsise in base backups

2011-09-25 Thread Andres Freund
Hi Greg, On Sunday, September 25, 2011 03:25:50 AM Greg Stark wrote: > On Sat, Sep 24, 2011 at 4:16 PM, Magnus Hagander wrote: > > I was assuming the kernel was smart enough to read this as "*this* > > process is not going to be using this file anymore", not "nobody in > > the whole machine is g

Re: [HACKERS] posix_fadvsise in base backups

2011-09-24 Thread Greg Stark
On Sat, Sep 24, 2011 at 4:16 PM, Magnus Hagander wrote: > I was assuming the kernel was smart enough to read this as "*this* > process is not going to be using this file anymore", not "nobody in > the whole machine is going to use this file anymore". And the process > running the base backup is ce

Re: [HACKERS] posix_fadvsise in base backups

2011-09-24 Thread Cédric Villemain
2011/9/24 Andres Freund : > Hi, > > On Saturday, September 24, 2011 05:16:48 PM Magnus Hagander wrote: >> On Sat, Sep 24, 2011 at 17:14, Andres Freund wrote: >> > On Saturday, September 24, 2011 05:08:17 PM Magnus Hagander wrote: >> >> Attached patch adds a simple call to posix_fadvise with >> >>

Re: [HACKERS] posix_fadvsise in base backups

2011-09-24 Thread Andres Freund
Hi, On Saturday, September 24, 2011 05:16:48 PM Magnus Hagander wrote: > On Sat, Sep 24, 2011 at 17:14, Andres Freund wrote: > > On Saturday, September 24, 2011 05:08:17 PM Magnus Hagander wrote: > >> Attached patch adds a simple call to posix_fadvise with > >> POSIX_FADV_DONTNEED on all the file

Re: [HACKERS] posix_fadvsise in base backups

2011-09-24 Thread Magnus Hagander
On Sat, Sep 24, 2011 at 17:14, Andres Freund wrote: > Hi, > > On Saturday, September 24, 2011 05:08:17 PM Magnus Hagander wrote: >> Attached patch adds a simple call to posix_fadvise with >> POSIX_FADV_DONTNEED on all the files being read when doing a base >> backup, to help the kernel not to tras

Re: [HACKERS] posix_fadvsise in base backups

2011-09-24 Thread Andres Freund
Hi, On Saturday, September 24, 2011 05:08:17 PM Magnus Hagander wrote: > Attached patch adds a simple call to posix_fadvise with > POSIX_FADV_DONTNEED on all the files being read when doing a base > backup, to help the kernel not to trash the filesystem cache. > > Seems like a simple enough fix -

[HACKERS] posix_fadvsise in base backups

2011-09-24 Thread Magnus Hagander
Attached patch adds a simple call to posix_fadvise with POSIX_FADV_DONTNEED on all the files being read when doing a base backup, to help the kernel not to trash the filesystem cache. Seems like a simple enough fix - in fact, I don't remember why I took it out of the original patch :O Any reason