Live data from Hacker News

I/O is no longer the bottleneck? (2022)

stoppels.ch

121–130 of 133 posts

Re: I/O is no longer the bottleneck? (2022)

#121

What metrics does saturating memory bandwidth manifest as? ...iowait? 100% system CPU? How does one isolate memory as the bottleneck specifically?

In process monitoring you just see 100% "cpu" use with the processor cores running in their low-medium frequency range and no real thermal issues (fans aren't spinning up). You can use perf indicators to specifically look at whether memory bandwidth is the issue.

Re: I/O is no longer the bottleneck? (2022)

#122
post #40

Earlier quoted context omitted.

Any code that's reading/writing to SSD needs to use multiple cores. The SSD is faster than a single CPU core.

That doesn’t sound right. A single core should more than fast enough to saturate IOPs (particularly with iouring) unless you’re doing something insane like a lot of small writes. A write of 16mib or 32mob should still be about 1 ssd iop - more CPUs shouldn’t help(and in fact should be slower if you have 2 16mib IOPs vs 1 32mib iop)

Do you want to process that data, or just let it hang out in memory?

Re: I/O is no longer the bottleneck? (2022)

#123

Increasingly the performance limit for modern CPUs is the amount of data you can feed through a single core: basically memcpy() speed. On most x86 cores the limit is around 6 GB/s and about 20 GB/s for Apple M chips. When you see advertised numbers like '200 GB/s' that is total memory bandwidth, or all cores combined. For individual cores, the limit will still be around 6 GB/s. This means even if you write a perfect…

Pardon the ignorance, but is there a reason, or reasons, that netstrings/bencode is not included in the list of formats against which Lite^3 is tested

Re: I/O is no longer the bottleneck? (2022)

#124
post #117
post #95

Earlier quoted context omitted.

What non-ancient LCD's have response times that high. Even e-ink/e-paper displays are better than that!

TVs can do a bunch of filtering which adds long latency based on the setting about the type of content (sorry, can't remember the exact term ATM).

That is true, but the worst offenders are about 300ms, and out of the 515 rtings have tested, only 5 have a worst case more than 200ms. A typical 'bad' LCD would be somewhere closer to 50-100ms usually.

https://www.rtings.com/tv/tests/inputs/input-lag

Re: I/O is no longer the bottleneck? (2022)

#125
post #31

Earlier quoted context omitted.

I assume these must be really expensive? Otherwise it seems like a great way to improve throughput on low concurrency tasks.

bus wires. you can route only so many of them on a motherboard. it's why GPUs have their memory chips in a circle around the GPU chip.

Wouldn't this be the limiting factor moreso for overall throughput, not per core? I believe with Zen 4 for instance it goes through a central memory controller.

Re: I/O is no longer the bottleneck? (2022)

#126
post #31

Earlier quoted context omitted.

I assume these must be really expensive? Otherwise it seems like a great way to improve throughput on low concurrency tasks.

At least in older CPUs the caches were SRAM (static RAM). It is complicated but requires no refreshing. DRAM is basically just a capacitor per bit and capacitors leak so you constantly have to refresh the entire memory space. When the CPU sends a request to RAM, the memory controller might be too busy refreshing the soon to decay parts to actually respond right away. And if I recall correctly when you read from DRAM…

Wouldn't this bound the overall memory bandwidth, not the per core bandwidth? I've sort of assumed that just providing more line fill buffers wouldn't be sufficient, and that the number of LFB is chosen in tandem with a number of other things, but I'm not sure what the other things are (that is, just increasing the # of LFB might not be meaningful without also increasing XYZ).

Re: I/O is no longer the bottleneck? (2022)

#127
post #125

Earlier quoted context omitted.

bus wires. you can route only so many of them on a motherboard. it's why GPUs have their memory chips in a circle around the GPU chip.

Wouldn't this be the limiting factor moreso for overall throughput, not per core? I believe with Zen 4 for instance it goes through a central memory controller.

sure, but you can have more memory controllers (I/O dies), like threadripper

Re: I/O is no longer the bottleneck? (2022)

#128
post #126

Earlier quoted context omitted.

At least in older CPUs the caches were SRAM (static RAM). It is complicated but requires no refreshing. DRAM is basically just a capacitor per bit and capacitors leak so you constantly have to refresh the entire memory space. When the CPU sends a request to RAM, the memory controller might be too busy refreshing the soon to decay parts to actually respond right away. And if I recall correctly when you read from DRAM…

Wouldn't this bound the overall memory bandwidth, not the per core bandwidth? I've sort of assumed that just providing more line fill buffers wouldn't be sufficient, and that the number of LFB is chosen in tandem with a number of other things, but I'm not sure what the other things are (that is, just increasing the # of LFB might not be meaningful without also increasing XYZ).

I can’t speak to that. Last time I looked at this stuff was when I was taking an electrical engineering class and we were talking about constructing RAM out of flip flops.

Re: I/O is no longer the bottleneck? (2022)

#129
post #76
post #62

Earlier quoted context omitted.

Yes, I know mmap already sort of allows this (and has for well over a decade). To elaborate: when I want to, say, parse a megabytes-sized file, I don't muck about with mmap(), I just read() into a buffer; it's simple and it's fast enough even though I'm just wasting microseconds waiting for bytes on one fast chip to get copied into another slightly faster chip (and then copied into CPU cache). If I'm dealing with a l…

This has me thinking, it could be a fun project to prototype a convenient file interface based on pointers as a C library. I imagine it's possible to get something close to what you want in terms of interface (not sure about performance). I suspect in some cases it will be more convenient and in other cases it will be less convenient to use. The write interface isn't so bad for some use cases like appending to logs.…

You can do something like that, but you still need to be able to tell your OS when you want to sync what writes to disk.

Re: I/O is no longer the bottleneck? (2022)

#130
post #129
post #76

Earlier quoted context omitted.

This has me thinking, it could be a fun project to prototype a convenient file interface based on pointers as a C library. I imagine it's possible to get something close to what you want in terms of interface (not sure about performance). I suspect in some cases it will be more convenient and in other cases it will be less convenient to use. The write interface isn't so bad for some use cases like appending to logs.…

You can do something like that, but you still need to be able to tell your OS when you want to sync what writes to disk.

Yes the situation sounds similar to regular files to me. Iiuc mmap can implicitly sync to files, but it is only guaranteed after unmapped (akin to closing a file) or an explicit call to msync (akin to fflush).
Post reply on HN