-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve perfomance even more #2
Comments
Came across this comment for your post in HN. This can get rid of the intermediary pipe (using |
That's one option. We just need to keep in mind that this only supports Linux Kernels 4.5 and up. So that would be the March 2016 release and later. |
As a first step, shall we increase the buffer size to 65536 bytes as suggested by the comment on Reddit @vbrandl ? |
I'm not too deep into low level systems programming but I think the optimal buffer size depends on the OS pages size, the architecture (32 or 64 bit) and maybe other factors. |
The comment over on Reddit mentioned, that a buffer larger than /// Maximum number of bytes that is guaranteed to be atomic when writing to
/// a pipe.
PIPE_BUF = libc::_PC_PIPE_BUF, Looks like, that's not public, though. It leads to those constants in libc, though but they have really small values: https://github.com/rust-lang/libc/search?q=PIPE_BUF&type=Code. In the end, I don't really know what to do other than testing a bigger buffer and measuring the performance. Then take the buffer size with the best performance and wait until somebody screams. 😉 |
Suggestions here: https://www.reddit.com/r/rust/comments/93fbrj/fascat_a_faster_cat_implementation_using_splice/e3dl0f3/
The text was updated successfully, but these errors were encountered: