Message ID | 20200409170915.30570-3-jack@suse.cz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | bfq: Waker logic tweaks for dbench performance | expand |
> Il giorno 9 apr 2020, alle ore 19:09, Jan Kara <jack@suse.cz> ha scritto: > > Currently queues that have average think time shorter than slice_idle > cannot have waker. However this requirement is too strict. E.g. dbench > process always submits a one or two IOs (which is enough to pull its > average think time below slice_idle) and then blocks waiting for jbd2 > thread to commit a transaction. Due to idling logic jbd2 thread is > often forced to wait for dbench's idle timer to trigger to be able to > submit its IO and this severely delays the overall benchmark progress. > > E.g. on my test machine current dbench single-thread throughput is ~80 > MB/s, with this patch it is ~200 MB/s. > Hi Jan, I've modified this logic a little bit (in patches that I'm going to submit). And I don't see your boost in my tests. So it's difficult for me to validate this change. If ok for you, you could test it on top of the patches that I'll submit. If you see a boost, and (as I expect) I won't see any regression, this improvement is very welcome for me. Thanks, Paolo > Signed-off-by: Jan Kara <jack@suse.cz> > --- > block/bfq-iosched.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c > index 18f85d474c9c..416473ba80c8 100644 > --- a/block/bfq-iosched.c > +++ b/block/bfq-iosched.c > @@ -1928,7 +1928,6 @@ static void bfq_add_request(struct request *rq) > * I/O-plugging interval for bfqq. > */ > if (bfqd->last_completed_rq_bfqq && > - !bfq_bfqq_has_short_ttime(bfqq) && > ktime_get_ns() - bfqd->last_completion < > 200 * NSEC_PER_USEC) { > if (bfqd->last_completed_rq_bfqq != bfqq && > -- > 2.16.4 >
On Sun 10-01-21 10:20:19, Paolo Valente wrote: > > > > Il giorno 9 apr 2020, alle ore 19:09, Jan Kara <jack@suse.cz> ha scritto: > > > > Currently queues that have average think time shorter than slice_idle > > cannot have waker. However this requirement is too strict. E.g. dbench > > process always submits a one or two IOs (which is enough to pull its > > average think time below slice_idle) and then blocks waiting for jbd2 > > thread to commit a transaction. Due to idling logic jbd2 thread is > > often forced to wait for dbench's idle timer to trigger to be able to > > submit its IO and this severely delays the overall benchmark progress. > > > > E.g. on my test machine current dbench single-thread throughput is ~80 > > MB/s, with this patch it is ~200 MB/s. > > > > Hi Jan, > I've modified this logic a little bit (in patches that I'm going to > submit). And I don't see your boost in my tests. So it's difficult > for me to validate this change. If ok for you, you could test it on > top of the patches that I'll submit. If you see a boost, and (as I > expect) I won't see any regression, this improvement is very welcome > for me. As I wrote in the cover letter, I'm not really convinced that patch conceptually makes sence. What you later implemented should be definitely a more sophisticated approach to the problem. So I'd just discard this patch. Honza
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 18f85d474c9c..416473ba80c8 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -1928,7 +1928,6 @@ static void bfq_add_request(struct request *rq) * I/O-plugging interval for bfqq. */ if (bfqd->last_completed_rq_bfqq && - !bfq_bfqq_has_short_ttime(bfqq) && ktime_get_ns() - bfqd->last_completion < 200 * NSEC_PER_USEC) { if (bfqd->last_completed_rq_bfqq != bfqq &&
Currently queues that have average think time shorter than slice_idle cannot have waker. However this requirement is too strict. E.g. dbench process always submits a one or two IOs (which is enough to pull its average think time below slice_idle) and then blocks waiting for jbd2 thread to commit a transaction. Due to idling logic jbd2 thread is often forced to wait for dbench's idle timer to trigger to be able to submit its IO and this severely delays the overall benchmark progress. E.g. on my test machine current dbench single-thread throughput is ~80 MB/s, with this patch it is ~200 MB/s. Signed-off-by: Jan Kara <jack@suse.cz> --- block/bfq-iosched.c | 1 - 1 file changed, 1 deletion(-)