diff options
author | Jan Kara <jack@suse.cz> | 2011-02-21 17:25:37 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2012-04-11 11:12:44 +0200 |
commit | 2db938bee32e7469ca8ed9bfb3a05535f28c680d (patch) | |
tree | 7d175a486c2e02270839ba18da61455603c2205e /fs/ext3 | |
parent | Smack: build when CONFIG_AUDIT not defined (diff) | |
download | linux-2db938bee32e7469ca8ed9bfb3a05535f28c680d.tar.xz linux-2db938bee32e7469ca8ed9bfb3a05535f28c680d.zip |
jbd: Refine commit writeout logic
Currently we write out all journal buffers in WRITE_SYNC mode. This improves
performance for fsync heavy workloads but hinders performance when writes
are mostly asynchronous, most noticably it slows down readers and users
complain about slow desktop response etc.
So submit writes as asynchronous in the normal case and only submit writes as
WRITE_SYNC if we detect someone is waiting for current transaction commit.
I've gathered some numbers to back this change. The first is the read latency
test. It measures time to read 1 MB after several seconds of sleeping in
presence of streaming writes.
Top 10 times (out of 90) in us:
Before After
2131586 697473
1709932 557487
1564598 535642
1480462 347573
1478579 323153
1408496 222181
1388960 181273
1329565 181070
1252486 172832
1223265 172278
Average:
619377 82180
So the improvement in both maximum and average latency is massive.
I've measured fsync throughput by:
fs_mark -n 100 -t 1 -s 16384 -d /mnt/fsync/ -S 1 -L 4
in presence of streaming reader. The numbers (fsyncs/s) are:
Before After
9.9 6.3
6.8 6.0
6.3 6.2
5.8 6.1
So fsync performance seems unharmed by this change.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3')
0 files changed, 0 insertions, 0 deletions