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-prev] [day] [month] [year] [list]
Message-ID: <61f74c43.16f9.18b5a51868f.Coremail.00107082@163.com>
Date:   Mon, 23 Oct 2023 10:16:14 +0800 (CST)
From:   "David Wang" <00107082@....com>
To:     "Dave Chinner" <david@...morbit.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PERFORMANCE]fs: sendfile suffer performance degradation when
 buffer size have performance impact on underling IO




At 2023-10-23 06:53:17, "Dave Chinner" <david@...morbit.com> wrote:

>
>O_DSYNC is the problem here.
>
>This forces an IO to disk for every write IO submission from
>sendfile to the filesystem. For synchronous IO (as in "waiting for
>completion before sending the next IO), a larger IO size will
>*always* move data faster to storage.
>
>FWIW, you'll get the same behaviour if you use O_DIRECT for either
>source or destination file with sendfile - synchronous 64kB IOs are
>a massive performance limitation even without O_DSYNC.
>
>IOWs, don't use sendfile like this. Use buffered IO and
>sendfile(fd); fdatasync(fd); if you need data integrity guarantees
>and you won't see any perf problems resulting from the size of the
>internal sendfile buffer....
>
>-Dave.
>-- 
>Dave Chinner
>david@...morbit.com

Thanks for the information, and Yes, buffered IO shows no significant 
performance difference.
Feel that this usage caveat should be recorded in the "NOTE" section of man page for sendfile.

Thanks
David

 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ