Re: posix_fadvsise in base backups

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: posix_fadvsise in base backups
Дата
Msg-id CAM-w4HPR=wFt006sxLOD3uTCO1ow7W0Z05KOZ67ZQBvc4txutQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: posix_fadvsise in base backups  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: posix_fadvsise in base backups
Список pgsql-hackers
On Sat, Sep 24, 2011 at 4:16 PM, Magnus Hagander <magnus@hagander.net> 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 certainly not going to read it again.
>
> But that's a good point - do you know if that is the case, or does it
> mandate more testing?

It's not the case on Linux. I used to use DONTNEED to flush pages from
cache before running a benchmark. I verified with mincore that the
pages were actually getting removed from cache. Sometimes there was
the occasional straggler but nearly all got flushed and after a second
or third pass the stragglers were gone too.

In case you're wondering, this was because using /proc/.../drop_caches
caused flaky benchmarks. My theory was that it was causing pages of
the executable to trigger page faults in the middle of the benchmark.



-- 
greg


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniel Farina
Дата:
Сообщение: Re: Hot Backup with rsync fails at pg_clog if under load
Следующее
От: Marti Raudsepp
Дата:
Сообщение: [PATCH] Caching for stable expressions with constant arguments v3