刘硕然 商城技术架构部 智能存储部 ------------------------------------------------------------------------------------------------ 手机/+86 18201588100 邮箱/liushuoran@xxxxxx 地址/北京市经济技术开发区科创十一街18号院京东大厦B座16层 ------------------------------------------------------------------------------------------------ > -----邮件原件----- > 发件人: Constantine Shulyupin [mailto:const@xxxxxxxxxxxxx] > 发送时间: 2018年9月26日 18:07 > 收件人: 刘硕然 <liushuoran@xxxxxx> > 抄送: Miklos Szeredi <miklos@xxxxxxxxxx>; open list:FUSE: FILESYSTEM IN > USERSPACE <linux-fsdevel@xxxxxxxxxxxxxxx>; Jonathan Corbet > <corbet@xxxxxxx>; mitsuo.hayasaka.hu@xxxxxxxxxxx; Amir Goldstein > <amir73il@xxxxxxxxx> > 主题: Re: [PATCH v4] fuse: add max_pages option > > Hi Shuoran, > > On Wed, Sep 26, 2018 at 12:40 PM 刘硕然 <liushuoran@xxxxxx> wrote: > > I haven't tested the patch yet. But after reviewing the patch, I don't see > anything related to BDI_CAP_STRICTLIMIT. So would you please explain a > little bit more? Thanks. > > Bigger size of request reduces total number of requests and reduces > overhead of per request operations. > > > PS: I did try increasing FUSE_MAX_PAGES_PER_REQ, but it seemed not > helping in my scenario(writeback cache enabled, 4K writes, total write size is > not very large). > > To utilize FUSE_MAX_PAGES_PER_REQ in kernel it is must to increase > KERNEL_BUF_PAGES it libfuse too. I have libfuse patch with configurable > max_pages. > > But 4K writes will not benefit from increase of request size, which now is > 128K and proposed size is 1M. > This is true. So my original purpose of using writeback cache was trying to improve the performance of small writes. Because for big writes, fuse kernel would send requests to libfuse anyway, with or without writeback cache. The BDI_CAP_STRICTLIMIT issue happens when writeback cache is enabled, since balance_dirty_pages() is triggered in every small writes even if no request is sent to libfuse, which slows things down. So IMHO, increasing FUSE_MAX_PAGES_PER_REQ would certainly help for big writes, but might not be a solution to BDI_CAP_STRICTLIMIT issue. Please feel free to correct me if I misunderstand anything. Thanks in advance. > Thanks