From: | Florian Weimer <fweimer(at)bfk(dot)de> |
---|---|
To: | Havasvölgyi Ottó <havasvolgyi(dot)otto(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: fsync on ext4 does not work |
Date: | 2011-12-20 10:21:32 |
Message-ID: | 82vcpbilw3.fsf@mid.bfk.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
* Havasvölgyi Ottó:
> 2011/12/19 Florian Weimer <fweimer(at)bfk(dot)de>
>
>> * Havasvölgyi Ottó:
>>
>> > Even though the TPS in pgbench about 700 with 1 client.
>> > I have tried other sync methods (fdatasync, open_sync), but all are
>> similar.
>> > Should I disable write cache on HDD to make it work?
>>
>> Did you mount your ext4 file system with the nobarrier option?
>>
>> By default, ext4 is supposed to cope properly with hard disk caches,
>> unless the drive is lying about completing writes (but in that case,
>> disabling write caching is probably not going to help much with
>> reliability, either).
>>
>
> It is mounted with defaults, no other option yet, so it should flush.
> These HDDs are 7200 rpm SATA with some low level software RAID1.
> I cannot understand why disabling HDD write cache does not help either.
> Could you explain please?
The drive appears to be fundamentally broken. Disabling the cache won't
change that.
But you mention software RAID1---perhaps your version of the RAID code
doesn't pass down the barriers to the disk?
> There is also an InnoDB transaction log on this partition, but its commit
> time is quite longer. On the same workload PgSql's commit is about 1 ms,
> but InnoDB's is about 4-7 ms. I think 4-7 is also too short to flush
> something to such disk, am I right?
Yes, it's still too low, unless multiple commits are grouped together.
--
Florian Weimer <fweimer(at)bfk(dot)de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Migowski | 2011-12-20 10:48:31 | pg_restore should restore the schema comments and the database properties |
Previous Message | Louis-David Mitterrand | 2011-12-20 09:05:41 | using pg's internal timezone database? |