←back to thread

lsr: ls with io_uring

(rockorager.dev)
335 points mpweiher | 2 comments | | HN request time: 0.478s | source
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 #
eviks ◴[] No.44604411[source]
Is there a noticeable benefit of this huge syscall reduction?
replies(1): >>44604442 #
Imustaskforhelp ◴[] No.44604442[source]
Yes I just checked it after installing strace

strace -c ls gave me this

100.00 0.002709 13 198 5 total

strace -c eza gave me this

100.00 0.006125 12 476 48 total

strace -c lsr gave me this

100.00 0.001277 33 38 total

So seeing the number of syscalls in the calls directory

198 : ls

476 : eza

33 : lsr

A meaningful difference indeed!

replies(1): >>44605184 #
1. richardwhiuk ◴[] No.44605184[source]
That's just observing there is a difference, not explaining why that's a good thing.
replies(1): >>44606270 #
2. fpoling ◴[] No.44606270[source]
syscalls are expensive and their relative latency compared with the rest of code only grow especially in view of mitigations against cache-related and other other hardware bugs.