coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

Try benchmarking cat with io_uring's splice support

Open ArniDagur opened this issue 5 years ago • 6 comments

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.

ArniDagur avatar Apr 13 '20 17:04 ArniDagur

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?

chadbrewbaker avatar Aug 02 '20 16:08 chadbrewbaker

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.

stale[bot] avatar Aug 02 '21 16:08 stale[bot]

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.

tertsdiepraam avatar Jan 10 '22 23:01 tertsdiepraam

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.

ArniDagur avatar Jan 11 '22 11:01 ArniDagur

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!

tertsdiepraam avatar Jan 11 '22 12:01 tertsdiepraam

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.

stale[bot] avatar Jan 13 '23 12:01 stale[bot]