Whamcloud - gitweb
LU-11423 osc: Do not walk full extent list 27/33227/4
authorPatrick Farrell <paf@cray.com>
Tue, 25 Sep 2018 15:19:27 +0000 (10:19 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 6 Nov 2018 06:41:09 +0000 (06:41 +0000)
commit7f8143cf85b7e658976aa6526689628a81ed6a32
treedaf44102ccba2b641767b407592293ed39064f71
parentadb5aca3d67380078c4bd35c74651a7b9f848f4d
LU-11423 osc: Do not walk full extent list

It is only possible to merge with the extent immediately
before or immediately after the one we are trying to add,
so do not continue to walk the extent list after passing
that extent.

This has a significant impact when writing large sparse
files, where most writes create a new extent, and many
extents are too distant to be merged with their neighbors.

Writing 2 GiB of data randomly 4K at a time, we see an
improvement of about 15% with this patch.

mpirun -n 1 $IOR -w -t 4K -b 2G -o ./file -z
w/o patch:
write         285.86 MiB/s
w/patch:
write         324.03 MiB/s

Cray-bug-id: LUS-6523
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I3da224762638aa71714cfc6dd1f0abac42e1f358
Reviewed-on: https://review.whamcloud.com/33227
Reviewed-by: Jinshan Xiong <jinshan.xiong@gmail.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_cache.c