lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <EA52CBCF76D5E04D95BED55B83577BE7A677C0@MBX50.360buyAD.local>
Date:   Thu, 9 Aug 2018 12:08:32 +0000
From:   刘硕然 <liushuoran@...com>
To:     Miklos Szeredi <miklos@...redi.hu>
CC:     "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        刘海锋 <bjliuhaifeng@...com>,
        郭卫龙 <guoweilong@...com>
Subject: Re: FUSE: write operations trigger balance_dirty_pages when using
 writeback cache

Thanks for the advice. I tried removing BDI_CAP_STRICTLIMIT, and it works. There is no balance_dirty_pages() triggered, and the performance improves a lot.

Tested by libfuse passthrough_ll example and fio:
./passthrough_ll -o writeback /mnt/fuse/
fio --name=test --ioengine=psync --directory=/mnt/fuse/home/test --bs=4k --direct=0 --size=64M --rw=write --fallocate=0 --numjobs=1

performance with BDI_CAP_STRICTLIMIT:
WRITE: bw=158MiB/s (165MB/s), 158MiB/s-158MiB/s (165MB/s-165MB/s), io=64.0MiB (67.1MB), run=406-406msec

Performance without BDI_CAP_STRICTLIMIT:
WRITE: bw=1561MiB/s (1637MB/s), 1561MiB/s-1561MiB/s (1637MB/s-1637MB/s), io=64.0MiB (67.1MB), run=41-41msec

However, I wonder if there are some side-effects to remove it? Since it seems that the original purpose of this feature is to prevent FUSE from consuming too much memory. Please correct me if I am mistaken. Thanks in advance.


Regards,
Shuoran


-----邮件原件-----
发件人: Miklos Szeredi [mailto:miklos@...redi.hu] 
发送时间: 2018年8月9日 16:30
收件人: 刘硕然 <liushuoran@...com>
抄送: linux-fsdevel@...r.kernel.org; linux-kernel@...r.kernel.org
主题: Re: FUSE: write operations trigger balance_dirty_pages when using writeback cache

On Thu, Aug 9, 2018 at 9:31 AM, 刘硕然 <liushuoran@...com> wrote:
> Thank you for the prompt reply.
>
> I tried this config, but still can get balance_dirty_pages triggered.

I think it may be due to BDI_CAP_STRICTLIMIT used by fuse.  If you remove that setting from fuse in the kernel you should not be getting the balance_dirty_pages() as often.

Not sure if that's the realproblem, though, that depends on how much time is spent in balance_dirty_pages().  You can try profiling the kernel to find that out.

My guess is that the real cause of the slowdown is some other place.
There's for example a known issue with selinux related getxattr thrashing.  Disabling getxattr on your filesystem may significantly improve performance.

Thanks,
Miklos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ