Re: fsync on ext4 does not work

Поиск
Список
Период
Сортировка
От Florian Weimer
Тема Re: fsync on ext4 does not work
Дата
Msg-id 82vcpbilw3.fsf@mid.bfk.de
обсуждение исходный текст
Ответ на Re: fsync on ext4 does not work  (Havasvölgyi Ottó <havasvolgyi.otto@gmail.com>)
Список pgsql-general
* Havasvölgyi Ottó:

> 2011/12/19 Florian Weimer <fweimer@bfk.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@bfk.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Louis-David Mitterrand
Дата:
Сообщение: using pg's internal timezone database?
Следующее
От: Daniel Migowski
Дата:
Сообщение: pg_restore should restore the schema comments and the database properties