| От | Tom Lane |
|---|---|
| Тема | Re: performance: use pread instead of lseek+read |
| Дата | |
| Msg-id | 6248.1046130083@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: performance: use pread instead of lseek+read (Manfred Spraul <manfred@colorfullife.com>) |
| Ответы |
Re: performance: use pread instead of lseek+read
|
| Список | pgsql-patches |
Manfred Spraul <manfred@colorfullife.com> writes:
> Tom Lane wrote:
>> It seems unlikely to me that eliminating lseek on some platforms would
>> be worth the hassle of maintaining two code paths. lseek is mighty
>> cheap as system calls go.
>>
> It was considered expensive enough to write a syscall avoidance layer
> that caches the file pointer and skips lseek if fpos==offset.
You're missing the point: that layer is mostly there to ensure that we
don't foul up the kernel's readahead recognition for sequential fetches.
It's nice that Linux doesn't care, but Linux is not the only platform
we worry about.
regards, tom lane
В списке pgsql-patches по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера