Re: [PATCH] Revert default wal_sync_method to fdatasync on Linux 2.6.33+

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Revert default wal_sync_method to fdatasync on Linux 2.6.33+
Date: 2010-12-23 23:29:24
Message-ID: 4D13DB54.60900@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg, All:

Results for Solaris 10u8, on ZFS on a 7-drive attached storage array:

bash-3.00# ./test_fsync -f /dbdata/pgdata/test.out
Loops = 10000

Simple write:
8k write 59988.002/second

Compare file sync methods using one write:
open_datasync 8k write 214.125/second
(unavailable: o_direct)
open_sync 8k write 222.155/second
(unavailable: o_direct)
8k write, fdatasync 214.086/second
8k write, fsync 215.035/second
(unavailable: fsync_writethrough)

Compare file sync methods using two writes:
2 open_datasync 8k writes 108.227/second
(unavailable: o_direct)
2 open_sync 8k writes 106.935/second
(unavailable: o_direct)
8k write, 8k write, fdatasync 205.525/second
8k write, 8k write, fsync 210.483/second
(unavailable: fsync_writethrough)

Compare open_sync with different sizes:
open_sync 16k write 211.481/second
2 open_sync 8k writes 106.202/second

Test if fsync on non-write file descriptor is honored:
(If the times are similar, fsync() can sync data written
on a different descriptor.)
8k write, fsync, close 207.499/second
8k write, close, fsync 213.656/second

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-12-24 00:08:38 Re: Streaming replication as a separate permissions
Previous Message Srini Raghavan 2010-12-23 23:18:01 Re: Database file copy