5 ms·
What’s the I/O throughput of /dev/null ?
by bottled_poe 1y ago
What’s the I/O throughput of /dev/null ?
- CaptainOfCoit 1y agoYou start dealing with Heisen-throughput at that point, it goes as high as you can measure.
- epistasis 1y agoSingle client, I'm getting ~5GB/s, both on an 8-year-old intel server, and on my M1 ARM chip. However with a single server, it doesn't perfectly linearly scale with multiple clients. I'm getting 1 client: 5GB/s 2 clients: 8GB/s 3 client: 8.7GB/s
- fukka42 1y agoI'm easily reaching 30GB/s with a single client: dd if=/dev/zero of=/dev/null bs=1M status=progress A second dd process hits the same speed.
- epistasis 1y agoMy artisanal architecture design uses writes with a few characters and uses unix pipes: yes | pv > /dev/null I hope that in my next rewrite I can advance to larger block sizes.
- fukka42 1y agoInterestingly I tried this as well and was disappointed with the results: yes $(printf %1024s | tr " " "y") | pv > /dev/null About the same throughput as letting yes output a single character. I guess Unix pipes are slow.
- 1718627440 1y ago> I guess Unix pipes are slow. Or string concatenation, or pipeviewer.
- fukka42 1y agoyes doesn't do string concatenation, at least not in the loop that matters. It just prepares a buffer of bytes once and writes it to stdout repeatedly. https://github.com/coreutils/coreutils/blob/master/src/yes.c https://github.com/coreutils/coreutils/blob/master/src/yes.c
- eru 1y agoCompare https://codegolf.stackexchange.com/questions/199528/fastest-yes-in-the-west https://codegolf.stackexchange.com/questions/199528/fastest-...
- rezonant 1y agoWhat's the best hardware for running a /dev/null instance for production?
- epistasis 1y agoI usually do a kubernetes cluster on top of VMs. But sometimes when I really want to scale the standard cloud server less platforms all support /dev/null out of the box. (Except for Windows...)
- wowczarek 1y ago> Except for Windows... copy c:\file nul It's been there since DOS or more likely CP/M :)
- __turbobrew__ 1y agoA single resistor at ground voltage.
- eru 1y agoThat doesn't support expected features like 'stat /dev/null'.
- dinkelberg 1y agoHow did you measure this? Do you know that /dev/null is the limiting factor, or could it be the data source that is limiting?