From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | test_fsync label adjustments |
Date: | 2011-01-18 20:55:12 |
Message-ID: | 201101182055.p0IKtCX10332@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I have modified test_fsync to use test labels that match wal_sync_method
values, and and added more tests for open_sync with different sizes.
This should make the program easier for novices to understand. Here is
a test run for Ubuntu 11.04:
$ ./test_fsync
2000 operations per test
Compare file sync methods using one 8k write:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
open_datasync (non-direct I/O)* 85.127 ops/sec
open_datasync (direct I/O) 87.119 ops/sec
fdatasync 81.006 ops/sec
fsync 82.621 ops/sec
fsync_writethrough n/a
open_sync (non-direct I/O)* 84.412 ops/sec
open_sync (direct I/O) 91.006 ops/sec
* This non-direct I/O mode is not used by Postgres.
Compare file sync methods using two 8k writes:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
open_datasync (non-direct I/O)* 42.721 ops/sec
open_datasync (direct I/O) 45.296 ops/sec
fdatasync 76.665 ops/sec
fsync 78.361 ops/sec
fsync_writethrough n/a
open_sync (non-direct I/O)* 42.311 ops/sec
open_sync (direct I/O) 45.247 ops/sec
* This non-direct I/O mode is not used by Postgres.
Compare open_sync with different write sizes:
(This is designed to compare the cost of writing 16k
in different write open_sync sizes.)
1 16k open_sync write 86.740 ops/sec
2 8k open_sync writes 44.709 ops/sec
4 4k open_sync writes 22.096 ops/sec
8 2k open_sync writes 10.856 ops/sec
16 1k open_sync writes 5.434 ops/sec
Test if fsync on non-write file descriptor is honored:
(If the times are similar, fsync() can sync data written
on a different descriptor.)
write, fsync, close 86.802 ops/sec
write, close, fsync 85.766 ops/sec
Non-sync'ed 8k writes:
write 83.068 ops/sec
Applied patch attached.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/test_fsync | text/x-diff | 11.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2011-01-18 21:36:25 | Re: ToDo List Item - System Table Index Clustering |
Previous Message | Kevin Grittner | 2011-01-18 20:38:44 | Re: SSI patch version 12 |