Re: Why O_SYNC is faster than fsync on ext3

Поиск
Список
Период
Сортировка
От Manfred Spraul
Тема Re: Why O_SYNC is faster than fsync on ext3
Дата
Msg-id 405D723E.3050309@colorfullife.com
обсуждение исходный текст
Ответ на Why O_SYNC is faster than fsync on ext3  (Yusuf Goolamabbas <yusufg@outblaze.com>)
Список pgsql-hackers
Yusuf Goolamabbas wrote:

>I sent this to Bruce but forgot to cc pgsql-hackers, The patches are
>likely to go into 2.6.6. People interested in extremely safe fsync
>writes should also follow the IDE barrier thread and the true fsync() in
>Linux on IDE thread
>  
>
Actually the most interesting part of the thread was the initial post 
from Peter Zaitsev on a fcntl(fd, F_FULLSYNC, NULL): He wrote that this 
is necessary for Mac OS X to force a flush of the write caches in the 
disks. Unfortunately I can't find anything about this flag with google.

Another interesting point is that right now, ide write caches must be 
disabled for reliable fsync operations  with Linux. Recent suse kernels 
contain partial support. If the existing patches are completed and 
merged, it will be safe to enable write caching.

Perhaps Bruce's cache flush test could be modified slightly to check 
that the OS isn't lying about fsync: if fsync is faster than the 
rotational delay of the disks, then the setup is not suitable for 
postgres. This could be recommended as a setup test in the install document.

--   Manfred



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

Предыдущее
От: Yusuf Goolamabbas
Дата:
Сообщение: Why O_SYNC is faster than fsync on ext3
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Unbalanced Btree Indices ...