Re: [HACKERS] lseek/read/write overhead becomes visible at scale ..
От | Thomas Munro |
---|---|
Тема | Re: [HACKERS] lseek/read/write overhead becomes visible at scale .. |
Дата | |
Msg-id | CAEepm=3BGNbWaznawm3LVk69ucKqXdAcb-aboG8cK375GcsMdQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] lseek/read/write overhead becomes visible at scale .. (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: [HACKERS] lseek/read/write overhead becomes visible at scale ..
|
Список | pgsql-hackers |
On Fri, Jun 23, 2017 at 4:50 AM, Andres Freund <andres@anarazel.de> wrote: > On 2017-06-22 12:43:16 -0400, Robert Haas wrote: >> On Wed, Jan 25, 2017 at 2:52 PM, Andres Freund <andres@anarazel.de> wrote: >> > You'll, depending on your workload, still have a lot of lseeks even if >> > we were to use pread/pwrite because we do lseek(SEEK_END) to get file >> > sizes. >> >> I'm pretty convinced that the lseek overhead that we're incurring >> right now is excessive. > > No argument there. My 2c: * every comparable open source system I looked at uses pread() if it's available * speedups have been claimed * it's also been claimed that readahead heuristics are not defeated on Linux or FreeBSD, which isn't too surprising because you'd expect it to be about blocks being faulted in, not syscalls * just in case there exists an operating system that has pread() but doesn't do readahead in that case, we could provide a compile-time option to select the fallback mode (until such time as you can get that bug fixed in your OS?) * syscalls aren't getting cheaper, and this is a 2-for-1 deal, what's not to like? +1 for adopting pread()/pwrite() in PG12. I understand that the use of lseek() to find file sizes is a different problem and unrelated. -- Thomas Munro http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: