Live data from Hacker News

lsr: ls with io_uring

rockorager.dev

151–160 of 177 posts

Re: lsr: ls with io_uring

#151

Kind of fascinating that slashing syscalls by ~35x (versus the `ls -la` benchmark) is "only" worth a 2x speedup

These syscalls are mostly through VDSO, so not very costly

The only VDSO-capable calls are clock_gettime, getcpu, getrandom, gettimeofday, and time. (Other architectures have some more, mostly related to signals and CPU cache flushing.)

Re: lsr: ls with io_uring

#152
A little offtop, but do you know a number in usecs that io_uring can save on enterprise grade servers, with 10G NICs, for socket latency overheads vs LD_PRELOAD when hardware supports that? Let's say it's Mellanox 4 or 5. My understanding is that each gives around 10us savings, maybe less. Based on some benchmarking, which was not focused on any of those explicitly but had some imprecise experiments. It also looks like they do not add up. Do you have a number based on real experience?

Re: lsr: ls with io_uring

#153
post #68

Earlier quoted context omitted.

POSIX adopting NFS' "readdirplus" operation (getdents + stat) could negate some of the benefit towards io_uring, too.

but then someone wants statx...

Yeah. To be clear I don't think Linux or Posix will ever adopt readdirplus as an API.

Re: lsr: ls with io_uring

#154

Earlier quoted context omitted.

Curious: Why? Is it not a good fit for what ripgrep does? Isn't the sort of "streaming" "line at a time" I/O that ripgrep does a good fit for async io?

For many workloads, ripgrep spends the vast majority of its time searching through files. But more practically, it would be a terror to implement. ripgrep is built on top of platform specific standard file system APIs. io_uring would mean a whole heap of code to work with a different syscall pattern in addition to the existing code pattern for non-Linux targets. So to even figure out whether it would be worth doing t…

I believe that io_uring does not support getdents (despite multiple patch series being proposed). So you'd get async stat(), if you need them, but nothing else.

Re: lsr: ls with io_uring

#155

Earlier quoted context omitted.

For many workloads, ripgrep spends the vast majority of its time searching through files. But more practically, it would be a terror to implement. ripgrep is built on top of platform specific standard file system APIs. io_uring would mean a whole heap of code to work with a different syscall pattern in addition to the existing code pattern for non-Linux targets. So to even figure out whether it would be worth doing t…

I believe that io_uring does not support getdents (despite multiple patch series being proposed). So you'd get async stat(), if you need them, but nothing else.

[deleted]

Re: lsr: ls with io_uring

#156
post #9

I wonder how it performs against an NFS server with lots of files, especially one over a kinda-crappy connection. Putting an unreliable network service behind blocking POSIX syscalls is one of the main reasons NFS is a terrible design choice (as can be seen by anyone who's tried to ctrl+c any app that's reading from a broken NFS folder), but I wonder if io_uring mitigates the bad parts somewhat.

I run several machines at home with NFS $HOME and I usually don't notice. I'd say with a good network and as long as you're not stress-testing difficult cases like parallel writes to the same data from multiple machines, the average usability of NFS is actually very good.

I did have a hell of a difficult time once with intermittent failures from a poorly seated network cable.

Re: lsr: ls with io_uring

#157

It's a shame to see uutils doing so poorly here. I feel like they're our best hope for an organization to drive this sort of core modernization forward, but 2x slower than GNU isn't a good start.

I mean not only that but they're also licensed differently. I'd prefer strong copyleft for the most fundamental building blocks. Other than that it's a decently interesting project.

Re: lsr: ls with io_uring

#158

Earlier quoted context omitted.

> The designers of NFS chose to make a distributed system emulate a highly consistent and available system (a hard drive), which was (and is) a reasonable tradeoff I don't agree that it was a reasonable tradeoff. Making an unreliable system emulate a reliable one is the very thing I find to be a bad idea. I don't think this is unique to NFS, it applies to any network filesystem you try to present as if it's a local o…

> Making an unreliable system emulate a reliable one is the very thing I find to be a bad idea. It's the only idea though. We don't know how to make reliable systems, other than by cobbling together a lot of unreliable ones and hoping the emergent behaviour is more reliable than that of the parts.

> other than by cobbling together a lot of unreliable ones and hoping the emergent behaviour

No, there's math to calculate that without having to rely on hope.

Re: lsr: ls with io_uring

#159
post #87
post #51

Earlier quoted context omitted.

you give process direct access to a piece of kernel memory. its a reason why there is separation. thats all.

...don't you supply the memory in the submission queue? or do you mean the queues themselves?

The memory for the submission queue is mmapd into user space. Easiest implementation to read is the Zig stdlib:

https://github.com/ziglang/zig/blob/69cf40da600224734d39c6f6...

Re: lsr: ls with io_uring

#160
Why doesn't it scale ? I'm really interested in n=100.000 and n=1.000.000.

eza could catch up with lsr. Why is n=1.000 so slow with lsr ? Does io_uring add so much overhead ?

Post reply on HN