mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: Dongdong Tao <dongdong.tao@canonical.com>
Cc: Gavin Guo <gavin.guo@canonical.com>,
	Gerald Yang <gerald.yang@canonical.com>,
	Trent Lloyd <trent.lloyd@canonical.com>,
	Kent Overstreet <kent.overstreet@gmail.com>,
	"open list:BCACHE (BLOCK LAYER CACHE)"
	<linux-bcache@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Dominique Poulain <dominique.poulain@canonical.com>,
	Dongsheng Yang <dongsheng.yang@easystack.cn>
Subject: Re: [PATCH] bcache: consider the fragmentation when update the writeback rate
Date: Tue, 15 Dec 2020 01:07:31 +0800	[thread overview]
Message-ID: <35a038d8-fe6b-7954-f2d9-be74eb32dcdd@suse.de> (raw)
In-Reply-To: <CAJS8hVLMUS1mdrwC8ovzvMO+HWf4xtXRCNJEghtbtW0g93Kh_g@mail.gmail.com>

On 12/14/20 11:30 PM, Dongdong Tao wrote:
> Hi Coly and Dongsheng,
> 
> I've get the testing result and confirmed that this testing result is
> reproducible by repeating it many times.
> I ran fio to get the write latency log and parsed the log and then
> generated below latency graphs with some visualization tool
> 

Hi Dongdong,

Thank you so much for the performance number!

[snipped]
> So, my code will accelerate the writeback process when the dirty buckets
> exceeds 50%( can be tuned), as we can see
> the cache_available_percent does increase once it hit 50, so we won't
> hit writeback cutoff issue.
> 
> Below are the steps that I used to do the experiment:
> 1. make-bcache -B <hdd> -C <nvme> --writeback -- I prepared the nvme
> size to 1G, so it can be reproduced faster
> 
> 2. sudo fio --name=random-writers --filename=/dev/bcache0
> --ioengine=libaio --iodepth=1 --rw=randrw --bs=16k --direct=1
> --rate_iops=90,10 --numjobs=1 --write_lat_log=16k
> 
> 3. For 1 G nvme, running for about 20 minutes is enough get the data. 

1GB cache and 20 minutes is quite limited for the performance valuation.
Could you please to do similar testing with 1TB SSD and 1 hours for each
run of the benchmark ?

> 
> Using randrw with rate_iops=90,10 is just one way to reproduce this
> easily, this can be reproduced as long as we can create a fragmented
> situation that quite few dirty data consumed a lot dirty buckets thus
> killing the write performance.
> 

Yes this is a good method to generate dirty data segments.

> This bug nowadays is becoming very critical, as ceph is hitting it, ceph
> mostly submitting random small IO.
> Please let me know what you need in order to move forward in this
> direction, I'm sure this patch can be improved also.

The performance number is quite convinced and the idea in your patch is
promising.

I will provide my comments on your patch after we see the performance
number for larger cache device and longer run time.

Thanks again for the detailed performance number, which is really
desired for performance optimization changes :-)

Coly Li

  parent reply	other threads:[~2020-12-14 17:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 12:42 Dongdong Tao
2020-11-04  5:06 ` kernel test robot
2020-11-05 16:32 ` Coly Li
2020-11-10  4:19   ` Dongdong Tao
2020-11-11  8:33     ` Coly Li
2020-12-09  2:27 ` Dongsheng Yang
2020-12-09  4:48   ` Dongdong Tao
2020-12-09  7:49     ` Dongsheng Yang
     [not found]       ` <CAJS8hVLMUS1mdrwC8ovzvMO+HWf4xtXRCNJEghtbtW0g93Kh_g@mail.gmail.com>
2020-12-14 17:07         ` Coly Li [this message]
     [not found]           ` <CAJS8hVKMjec1cpe_zoeZAJrfY0Pq9bJ51eO6E+g8pgN9jV3Nmw@mail.gmail.com>
2020-12-21  8:08             ` Coly Li
2021-01-05  3:06 Dongdong Tao
     [not found] ` <CAJS8hVK-ZCxJt=E3hwR0hmqPYL1T07_WC_nerb-dZodO+DqtDA@mail.gmail.com>
2021-01-05  4:33   ` Coly Li
     [not found]     ` <CAJS8hVL2B=RZr8H4jFbz=bX9k_E9ur7kTeue6BJwzm4pwv1+qQ@mail.gmail.com>
2021-01-08  4:05       ` Coly Li
2021-01-08  8:30         ` Dongdong Tao
2021-01-08  8:39           ` Coly Li
2021-01-08  8:47             ` Dongdong Tao
2021-01-14  4:55               ` Dongdong Tao
     [not found]               ` <CAJS8hVJDaREvpvG4iO+Xs-KQXQKFi7=k29TrG=NXqjyiPpUCZA@mail.gmail.com>
2021-01-14 10:05                 ` Coly Li
2021-01-14 12:22                   ` Dongdong Tao
2021-01-14 13:31                     ` Coly Li
2021-01-14 15:35                       ` Dongdong Tao
2021-01-17  7:11 ` kernel test robot
2021-01-19 12:56 Dongdong Tao
2021-01-19 14:06 ` Coly Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35a038d8-fe6b-7954-f2d9-be74eb32dcdd@suse.de \
    --to=colyli@suse.de \
    --cc=dominique.poulain@canonical.com \
    --cc=dongdong.tao@canonical.com \
    --cc=dongsheng.yang@easystack.cn \
    --cc=gavin.guo@canonical.com \
    --cc=gerald.yang@canonical.com \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trent.lloyd@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®