3 ms·
Just because it's on the internet it doesn't mean it's true. You might be confused how a CPU, memory, and I/O are interconnected. First, for an application to
by halayli 5y ago
Just because it's on the internet it doesn't mean it's true.
You might be confused how a CPU, memory, and I/O are interconnected. First, for an application to access data in memory, all it need to do is issue a MOV with indirect addressing. It might trigger a minor page fault which gets handled quickly by the OS. For an application to read data from disk, it must submit a request to the disk controller through the OS. I am ignoring a lot of details but that's all you need to reconsider the information in the links you shared.
Keep in mind that reading from memory is in the nanoseconds, while reading from NVME is in microseconds.
- jgod 5y agoDoesn't matter if either way, with network overhead from talking to your application from another machine, it's measured in milliseconds.
- halayli 5y agoOf course it matters. You probably haven't written low latency server daemons. A busy memcached might be serving 20k to 100k requests a second, it's not serving 1 user only. 100k requests all being translated to memory vs disk reads will have a huge performance impact.
- ec109685 5y agoMany caches including Memcached support batch gets as well as pipelining, so network latency won’t dominate.