Most active commenters
  • epistasis(5)
  • fukka42(3)

←back to thread

526 points swills | 20 comments | | HN request time: 0.519s | source | bottom
1. rezonant ◴[] No.45688230[source]
But is /dev/null web scale?
replies(3): >>45688273 #>>45688300 #>>45688765 #
2. epistasis ◴[] No.45688273[source]
Yes, /dev/null can even power sites like zombo.com
replies(1): >>45688321 #
3. pasteldream ◴[] No.45688300[source]
reference for the unaware: https://youtube.com/watch?v=b2F-DItXtZs
4. bottled_poe ◴[] No.45688321[source]
What’s the I/O throughput of /dev/null ?
replies(2): >>45688365 #>>45688374 #
5. epistasis ◴[] No.45688365{3}[source]
Single 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

replies(2): >>45688467 #>>45688477 #
6. CaptainOfCoit ◴[] No.45688374{3}[source]
You start dealing with Heisen-throughput at that point, it goes as high as you can measure.
7. fukka42 ◴[] No.45688467{4}[source]
I'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.
replies(2): >>45688575 #>>45688592 #
8. dinkelberg ◴[] No.45688477{4}[source]
How did you measure this? Do you know that /dev/null is the limiting factor, or could it be the data source that is limiting?
9. epistasis ◴[] No.45688575{5}[source]
My 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.
replies(1): >>45688906 #
10. rezonant ◴[] No.45688592{5}[source]
What's the best hardware for running a /dev/null instance for production?
replies(2): >>45688994 #>>45689263 #
11. butteredpecan ◴[] No.45688765[source]
https://devnull-as-a-service.com/
12. fukka42 ◴[] No.45688906{6}[source]
Interestingly 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.
replies(1): >>45689193 #
13. epistasis ◴[] No.45688994{6}[source]
I 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...)
replies(1): >>45689660 #
14. 1718627440 ◴[] No.45689193{7}[source]
> I guess Unix pipes are slow.

Or string concatenation, or pipeviewer.

replies(2): >>45689287 #>>45690060 #
15. __turbobrew__ ◴[] No.45689263{6}[source]
A single resistor at ground voltage.
replies(1): >>45690063 #
16. fukka42 ◴[] No.45689287{8}[source]
yes 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

17. wowczarek ◴[] No.45689660{7}[source]
> Except for Windows...

copy c:\file nul

It's been there since DOS or more likely CP/M :)

replies(1): >>45690314 #
18. eru ◴[] No.45690060{8}[source]
Compare https://codegolf.stackexchange.com/questions/199528/fastest-...
19. eru ◴[] No.45690063{7}[source]
That doesn't support expected features like 'stat /dev/null'.
20. epistasis ◴[] No.45690314{8}[source]
Still need an adapter library though! Fortunately there are about 7 competing implementations on npm and most of them only have 5-6 transitive dependencies.