Re: Use fadvise in wal replay
От
Andrey Borodin
Тема
Re: Use fadvise in wal replay
Дата
Msg-id
979BDEE2-49C1-4420-8578-9182BC2DE875@yandex-team.ru
Ответ на
Re: Use fadvise in wal replay (Pavel Borisov)
Список
Дерево обсуждения
Use fadvise in wal replay Kirill Reshke <reshke@double.cloud>
Re: Use fadvise in wal replay Amit Kapila <amit.kapila16@gmail.com>
Re: Use fadvise in wal replay Andrey Borodin <x4mmm@yandex-team.ru>
RE: Use fadvise in wal replay Jakub Wartak <Jakub.Wartak@tomtom.com>
Re: Use fadvise in wal replay Andrey Borodin <x4mmm@yandex-team.ru>
RE: Use fadvise in wal replay Jakub Wartak <Jakub.Wartak@tomtom.com>
Re: Use fadvise in wal replay Thomas Munro <thomas.munro@gmail.com>
RE: Use fadvise in wal replay Jakub Wartak <Jakub.Wartak@tomtom.com>
Re: Use fadvise in wal replay Andrey Borodin <x4mmm@yandex-team.ru>
RE: Use fadvise in wal replay Jakub Wartak <Jakub.Wartak@tomtom.com>
Re: Use fadvise in wal replay Andrey Borodin <x4mmm@yandex-team.ru>
RE: Use fadvise in wal replay Jakub Wartak <Jakub.Wartak@tomtom.com>
Re: Use fadvise in wal replay Justin Pryzby <pryzby@telsasoft.com>
Re: Use fadvise in wal replay Robert Haas <robertmhaas@gmail.com>
Re: Use fadvise in wal replay Andrey Borodin <x4mmm@yandex-team.ru>
Re: Use fadvise in wal replay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Use fadvise in wal replay Andrey Borodin <x4mmm@yandex-team.ru>
Re: Use fadvise in wal replay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Use fadvise in wal replay Andrey Borodin <x4mmm@yandex-team.ru>
Re: Use fadvise in wal replay Andrey Borodin <amborodin86@gmail.com>
Re: Use fadvise in wal replay Pavel Borisov <pashkin.elfe@gmail.com>
Re: Use fadvise in wal replay Andrey Borodin <amborodin86@gmail.com>
Re: Use fadvise in wal replay Tomas Vondra <tomas.vondra@enterprisedb.com>
Re: Use fadvise in wal replay Andres Freund <andres@anarazel.de>
Re: Use fadvise in wal replay "Gregory Stark (as CFM)" <stark.cfm@gmail.com>
Re: Use fadvise in wal replay Pavel Borisov <pashkin.elfe@gmail.com>
Re: Use fadvise in wal replay Andrey Borodin <x4mmm@yandex-team.ru>
Re: Use fadvise in wal replay Pavel Borisov <pashkin.elfe@gmail.com>
Re: Use fadvise in wal replay Andrey Borodin <x4mmm@yandex-team.ru>
Re: Use fadvise in wal replay Pavel Borisov <pashkin.elfe@gmail.com>
Re: Use fadvise in wal replay Andrey Borodin <x4mmm@yandex-team.ru>
Re: Use fadvise in wal replay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Use fadvise in wal replay Amit Kapila <amit.kapila16@gmail.com>
Re: Use fadvise in wal replay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Use fadvise in wal replay Amit Kapila <amit.kapila16@gmail.com>
> On 21 Jun 2022, at 20:52, Pavel Borisov wrote: > > > On 21 Jun 2022, at 16:59, Jakub Wartak wrote: > Oh, wow, your benchmarks show really impressive improvement. > > FWIW I was trying to speedup long sequential file reads in Postgres using fadvise hints. I've found no detectable improvements. > Then I've written 1Mb - 1Gb sequential read test with both fadvise POSIX_FADV_WILLNEED and POSIX_FADV_SEQUENTIAL in Linux. Did you drop caches? > The only improvement I've found was > > 1. when the size of read was around several Mb and fadvise len also around several Mb. > 2. when before fdavice and the first read there was a delay (which was supposedly used by OS for reading into prefetch buffer) That's the case of startup process: you read a xlog page, then redo records from this page. > 3. If I read sequential blocks i saw speedup only on first ones. Overall read speed of say 1Gb file remained unchanged no matter what. > > I became convinced that if I read something long, OS does necessary speedups automatically (which is also in agreement with fadvise manual/code comments). > Could you please elaborate how have you got the results with that big difference? (Though I don't against fadvise usage, at worst it is expected to be useless). FWIW we with Kirill observed drastically reduced lag on a production server when running patched version. Fidvise surely works :) The question is how to use it optimally. Best regards, Andrey Borodin.
В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата: