←back to thread

lsr: ls with io_uring

(rockorager.dev)
335 points mpweiher | 6 comments | | HN request time: 1.637s | source | bottom
Show context
fermuch ◴[] No.44604316[source]
The link isn't working for me. For those who were able to see it: does it improve anything by using that instead of what ls does now??
replies(3): >>44604334 #>>44604354 #>>44604356 #
ta988 ◴[] No.44604354[source]
70% faster, but more importantly 35x times less syscalls.
replies(2): >>44604411 #>>44604739 #
1. loeg ◴[] No.44604739[source]
Why do you say more importantly? The time is all that matters, I think.
replies(1): >>44605281 #
2. plq ◴[] No.44605281[source]
%70 faster = you wait less

35x less system calls = others wait less for the kernel to handle their system calls

replies(1): >>44605691 #
3. loeg ◴[] No.44605691[source]
> 35x less system calls = others wait less for the kernel to handle their system calls

That isn't how it works. There isn't a fixed syscall budget distributed among running programs. Internally, the kernel is taking many of the same locks and resources to satisfy io_uring requests as ordinary syscall requests.

replies(1): >>44605841 #
4. plq ◴[] No.44605841{3}[source]
More system calls mean more overall OS overhead eg. more context switches, or as you say more contention on internal locks etc.

Also, more fs-related system calls mean less available kernel threads to process these system calls. eg. XFS can paralellize mutations only up to its number of allocation groups (agcount)

replies(1): >>44606083 #
5. loeg ◴[] No.44606083{4}[source]
> More system calls mean more overall OS overhead [than the equivalent operations performed with io_uring]

Again, this just isn't true. The same "stat" operations are being performed one way or another.

> Also, more fs-related system calls mean less available kernel threads to process these system calls.

Generally speaking sync system calls are processed in the context of the calling (user) thread. They don't consume kernel threads generally. In fact the opposite is true here -- io_uring requests are serviced by an internal kernel thread pool, so to the extent this matters, io_uring requests consume more kernel threads.

replies(1): >>44606142 #
6. plq ◴[] No.44606142{5}[source]
> Again, this just isn't true.

Again, it just is true.

More fs-related operations mean less kthreads available for others. More syscalls means more OS overhead. It's that simple.