uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.65k stars 1.27k forks source link

Try benchmarking cat with io_uring's splice support #1472

Open ArniDagur opened 4 years ago

ArniDagur commented 4 years ago

I already have PR #1289 which needs some more work before being considered for inclusion in the project. In said PR, cat uses splice() instead of read() on Linux, drastically increasing throughput. In the most recent kernel (5.7), io_uring will finally gain splice support. I want to try comparing a io_uring + splice() implementation of cat with a normal splice()-only implementation.

chadbrewbaker commented 4 years ago

Until this project is super stable, I have been thinking about an optional build flag that inserts a lightweight shim for Linux that if you pass a --classic flag it passes arguments to the old GNU core-util binary. It would also allow for super easy expectation tests both for performance and output equivalence.

A riff on the test harness that Kernighan built for AWK: https://www.cs.princeton.edu/courses/archive/spring01/cs333/awktest.html

The same setup could be used to compare any two shell utility binaries for regression tests too.

Thoughts?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

tertsdiepraam commented 2 years ago

As far as I can tell, this was first attempted in https://github.com/uutils/coreutils/pull/1289, then actually implemented in https://github.com/uutils/coreutils/pull/1978, then reverted in https://github.com/uutils/coreutils/pull/2018 and then finally unreverted in https://github.com/uutils/coreutils/pull/2020 back in April.

ArniDagur commented 2 years ago

I'm the person behind #1289, #1978, and #2020 :) The difference here is that we should try using splice with io_uring. Nevertheless, I'm fine with closing this issue since I probably won't pick this up in the near future.

tertsdiepraam commented 2 years ago

Ah no worries, I'll open this back up. If only to document that this is still a possible improvement. Thanks for letting me know!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.