Whamcloud - gitweb
LU-12043 llite: fix to submit complete read block with ra disabled 17/35217/11
authorWang Shilong <wshilong@ddn.com>
Thu, 13 Jun 2019 00:25:47 +0000 (08:25 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Apr 2020 16:49:14 +0000 (16:49 +0000)
commit7e8efb339b0958146eb294fc9d961688f5d16079
treedda35474235935f691ab7c0fa83528fd36fe7d57
parent596420d2e7a17dc0189fdbd2d7cc94ae391ab6c8
LU-12043 llite: fix to submit complete read block with ra disabled

Even if readahead disabled, we need to make first cache-miss read
cover current read. Otherwise, without readahead, we are
always sending 1 page RPC which makes performances really bad.

Benchmarked with following command:

iozone -w -c -i 5 -t1 -j 2 -s 100m -r 1m data

Without patch: 39917.20 kB/sec
read write
pages per rpc         rpcs   % cum % |       rpcs   % cum %
1:      25088 100 100   |          0   0   0

With patch: 754811.62 kB/sec
read write
pages per rpc         rpcs   % cum % |       rpcs   % cum %
1:          0   0   0   |          0   0   0
2:          0   0   0   |          0   0   0
4:          0   0   0   |          0   0   0
8:          0   0   0   |          0   0   0
16:          0   0   0   |          0   0   0
32:          0   0   0   |          0   0   0
64:          0   0   0   |          0   0   0
128:          0   0   0   |          0   0   0
256:         98 100 100   |          0   0   0

We got huge peformances up x17 performances up, this is really
expected behavior without RA since we don't readahead any extra
pages, we just send RPC with one transfer size once rather than
send page by page, this help several cases that i could think of:

1) make more sense to compare RA without RA performances, for example
overhead of RA.

2)we could get better performances with multiple thread read same
file without RA.

Same test with RA enabled: 737746.56 kB/sec
read write
pages per rpc         rpcs   % cum % |       rpcs   % cum %
1:          0   0   0   |          0   0   0
2:          0   0   0   |          0   0   0
4:          0   0   0   |          0   0   0
8:          0   0   0   |          0   0   0
16:          0   0   0   |          0   0   0
32:          0   0   0   |          0   0   0
64:          0   0   0   |          0   0   0
128:          0   0   0   |          0   0   0
256:          0   0   0   |          0   0   0
512:          6  10  10   |          0   0   0
1024:         52  89 100   |          0   0   0

Change-Id: I95511fb371912a47d0b566f64a524f3a7500421c
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/35217
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/rw.c
lustre/tests/sanity.sh