Re: [PATCH] bcache: inherit underlying queue limits for bcache drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 23 May 2017, Coly Li wrote:

> On 2017/5/23 下午4:14, tang.junhui@xxxxxxxxxx wrote:
> > From: "tang.junhui" <tang.junhui@xxxxxxxxxx>
> > 
> > We'd better let the stacking driver inherit underlying queue limits,
> > so, we can avoid the unnessary mergering in the top layer, and It leads
> > a 10% performance promotion in large sequential IO reading testing as
> > follows:
> > 
> 
> Hi Junhui,
> 
> I don't get the point why there is unnecessary merging in the upper
> layer, and how the unnecessary merging can be avoided by set a queue limit.
> 
> And from the testing, I see total data size is around 21GB which is not
> convinced enough. Is it possible to use a large enough data size, e.g.
> 512GB or 1TB ?


Please test with `fio` with directio instead of `dd`.  I've seen too many 
times where DD is inaccurate for unknown reasons.  

Also, this should be tested with your cache detached from bcache.  If it 
really does improve performance that would be great.

--
Eric Wheeler


> 
> Thanks.
> 
> > before:
> > [root@ceph192-9-9-151 ~]# dd if=/dev/bcache3p2 of=/dev/zero bs=1M
> > count=20480 iflag=direct
> > 20480+0 records in
> > 20480+0 records out
> > 21474836480 bytes (21 GB) copied, 173.424 s, 124 MB/s
> > 
> > after:
> > [root@ceph192-9-9-151 tjh]# dd if=/dev/bcache3p2 of=/dev/zero bs=1M
> > count=20480 iflag=direct
> > 20480+0 records in
> > 20480+0 records out
> > 21474836480 bytes (21 GB) copied, 151.107 s, 142 MB/s
> > 
> > Signed-off-by: tang.junhui <tang.junhui@xxxxxxxxxx>
> > ---
> >  drivers/md/bcache/super.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
> > index 3a19cbc..615782c 100644
> > --- a/drivers/md/bcache/super.c
> > +++ b/drivers/md/bcache/super.c
> > @@ -1129,6 +1129,8 @@ static int cached_dev_init(struct cached_dev *dc, unsigned block_size)
> >  	if (ret)
> >  		return ret;
> >  
> > +	blk_queue_stack_limits(dc->disk.disk->queue, q);
> > +
> >  	set_capacity(dc->disk.disk,
> >  		     dc->bdev->bd_part->nr_sects - dc->sb.data_offset);
> >  
> > 
> 
> 
> -- 
> Coly Li
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux