dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/fs/jbd
Andrew Morton fe1dcbc4f3 [PATCH] jbd: fix transaction batching
Ben points out that:

  When writing files out using O_SYNC, jbd's 1 jiffy delay results in a
  significant drop in throughput as the disk sits idle.  The patch below
  results in a 4-5x performance improvement (from 6.5MB/s to ~24-30MB/s on my
  IDE test box) when writing out files using O_SYNC.

So optimise the batching code by omitting it entirely if the process which is
doing a sync write is the same as the one which did the most recent sync
write.  If that's true, we're unlikely to get any other processes joining the
transaction.

(Has been in -mm for ages - it took me a long time to get on to performance
testing it)

Numbers, on write-cache-disabled IDE:

/usr/bin/time -p synctest -n 10 -uf -t 1 -p 1 dir-name

Unpatched:
	40 seconds
Patched:
	35 seconds
Batching disabled:
	35 seconds

This is the problematic single-process-doing-fsync case.  With multiple
fsyncing processes the numbers are AFACIT unaltered by the patch.

Aside: performance testing and instrumentation shows that the transaction
batching almost doesn't help (testing with synctest -n 1 -uf -t 100 -p 10
dir-name on non-writeback-caching IDE).  This is because by the time one
process is running a synchronous commit, a bunch of other processes already
have a transaction handle open, so they're all going to batch into the same
transaction anyway.

The batching seems to offer maybe 5-10% speedup with this workload, but I'm
pretty sure it was more important than that when it was first developed 4-odd
years ago...

Cc: "Stephen C. Tweedie" <sct@redhat.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-05 11:06:53 -08:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
checkpoint.c [PATCH] jbd: log_do_checkpoint fix 2006-01-18 19:20:16 -08:00
commit.c [PATCH] jbd: remove_transaction fix 2006-01-18 19:20:16 -08:00
journal.c [PATCH] gfp_t: fs/* 2005-10-28 08:16:47 -07:00
recovery.c [PATCH] jbd doc: fix some kernel-doc warnings 2005-11-07 07:53:55 -08:00
revoke.c [PATCH] Change ll_rw_block() calls in JBD 2005-09-07 16:57:55 -07:00
transaction.c [PATCH] jbd: fix transaction batching 2006-02-05 11:06:53 -08:00