Re: We really ought to do something about O_DIRECT and data=journalled on ext4
Josh Berkus <josh@agliodbs.com>
From: Josh Berkus <josh@agliodbs.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-12-07T02:32:48Z
Lists: pgsql-hackers
All,
Geirth's results from his FreeBSD 7.1 server using 8.4's test_fsync:
Simple write timing:
write 0.007081
Compare fsync times on write() and non-write() descriptor:
If the times are similar, fsync() can sync data written
on a different descriptor.
write, fsync, close 5.937933
write, close, fsync 8.056394
Compare one o_sync write to two:
one 16k o_sync write 7.366927
two 8k o_sync writes 15.299300
Compare file sync methods with one 8k write:
(o_dsync unavailable)
open o_sync, write 7.512682
(fdatasync unavailable)
write, fsync 5.856480
Compare file sync methods with two 8k writes:
(o_dsync unavailable)
open o_sync, write 15.472910
(fdatasync unavailable)
write, fsync 5.880319
... again, open_sync does not look very impressive.
--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com