From: | "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at> |
---|---|
To: | "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Mark Kirkwood" <markir(at)paradise(dot)net(dot)nz> |
Cc: | <pgsql-performance(at)postgresql(dot)org>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] fsync method checking |
Date: | 2003-12-12 12:22:00 |
Message-ID: | 46C15C39FEB2C44BA555E356FBCD6FA40184CF68@m0114.s-mxs.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
> Running the attached test program shows on BSD/OS 4.3:
>
> write 0.000360
> write & fsync 0.001391
I think the "write & fsync" pays for the previous "write" test (same filename).
> write, close & fsync 0.001308
> open o_fsync, write 0.000924
I have tried to modify the program to more closely resemble WAL
writes (all writes to WAL are 8k), the file is usually already open,
and test larger (16k) transactions.
zeu(at)a82101002:~> test_sync1
write 0.000625
write & fsync 0.016748
write & fdatasync 0.006650
write, close & fsync 0.017084
write, close & fdatasync 0.006890
open o_dsync, write 0.015997
open o_dsync, one write 0.007128
For the last line xlog.c would need to be modified, but the measurements
seem to imply that it is only worth it on platforms that have O_DSYNC
but not fdatasync.
Andreas
Attachment | Content-Type | Size |
---|---|---|
test_sync1.c | application/octet-stream | 4.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-12 14:58:27 | Re: Use of 'cp -r' in CREATE DATABASE |
Previous Message | Thomas Hallgren | 2003-12-12 07:30:26 | Re: pljava revisited |
From | Date | Subject | |
---|---|---|---|
Next Message | Rhaoni Chiu Pereira | 2003-12-12 12:39:59 | ODBC Driver generates a too big "windows swap file" and it's too slow |
Previous Message | Hartmut Raschick | 2003-12-12 10:47:54 | Re: TRUNCATE veeeery slow compared to DELETE in 7.4 |