pg_test_fsync: "Invalid argument" in the middle of a test

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: pg_test_fsync: "Invalid argument" in the middle of a test
Date: 2014-02-10 22:20:47
Message-ID: CABRT9RBkfUPjemsA-jhQ=ME0TCLGgNK6FfyWkaNw+xGbykg1Sw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi list,

I'm in the middle of setting up a new machine and there's something
odd in pg_test_fsync output. Does anyone have ideas why open_sync
tests would fail in the middle?:

4 * 4kB open_sync writes 89.322 ops/sec 11195 usecs/op
8 * 2kB open_sync writes write failed: Invalid argument

Happens every time I run it. strace reveals that the first 2kB write fails:

open("./pg_test_fsync.out", O_RDWR|O_SYNC|O_DIRECT) = 5
alarm(5) = 0
write(5, "[...]", 2048) = -1 EINVAL (Invalid argument)

This is on Ubuntu 13.10 (kernel 3.11) with XFS (mount ed with noatime,
no other customizations). Using the LSI SAS 2008 RAID controller
branded as Fujitsu D2607 (latest firmware) and megaraid_sas driver.
There are no warnings or anything in dmesg or other logs. This does
not occur on other Ubuntu 13.10 installations which have different
storage stacks.

The timings are too fast, as well, since it's backed by four 15k
drives in RAID10, no battery and no cache. The write failure does not
occur on ext4 in the same setup, but the timings are still too fast.

Regards,
Marti

----
Full pg_test_fsync output:

5 seconds per test
O_DIRECT supported on this platform for open_datasync and open_sync.

Compare file sync methods using one 8kB write:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
open_datasync 1575.148 ops/sec 635 usecs/op
fdatasync 1460.741 ops/sec 685 usecs/op
fsync 1362.300 ops/sec 734 usecs/op
fsync_writethrough n/a
open_sync 1528.402 ops/sec 654 usecs/op

Compare file sync methods using two 8kB writes:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
open_datasync 106.022 ops/sec 9432 usecs/op
fdatasync 1300.160 ops/sec 769 usecs/op
fsync 1353.178 ops/sec 739 usecs/op
fsync_writethrough n/a
open_sync 108.378 ops/sec 9227 usecs/op

Compare open_sync with different write sizes:
(This is designed to compare the cost of writing 16kB
in different write open_sync sizes.)
1 * 16kB open_sync write 1405.532 ops/sec 711 usecs/op
2 * 8kB open_sync writes 108.439 ops/sec 9222 usecs/op
4 * 4kB open_sync writes 89.322 ops/sec 11195 usecs/op
8 * 2kB open_sync writes write failed: Invalid argument

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marti Raudsepp 2014-02-10 23:28:01 Re: pg_test_fsync: "Invalid argument" in the middle of a test
Previous Message Ben Chobot 2014-02-10 22:13:00 Re: Optimizing tables for known queries?