cat: GNU has better throughput without splice() code path
Open
Nobody has claimed this yet.
U - cat
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
$ truncate -s 9PB /tmp/huge
$ strace -o /dev/null -e inject=splice:error=ENOSYS cat /tmp/huge | pv>/dev/null
^C08GiB 0:00:02 [ 521MiB/s]
$ strace -o /dev/null -e inject=splice:error=ENOSYS gnu-9a3479f1e/cat /tmp/huge | pv>/dev/null
^C72GiB 0:00:01 [1.72GiB/s]
This is important on non-Linux platforms. Actually, I missed that pipe size is 1 MiB on Linux.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two throughput comparisons in the issue using the 9PB sparse file, strace, and pv. Then locate the cat implementation and its splice() code path, comparing behavior when splice() is unavailable. Done should include an evidence-based resolution of the throughput difference, with relevant tests or benchmarks if the project provides them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100