3 ms·
Ram on a different machine via ethernet has lower latency than spinning disks in the same machine.
by j-pb 3y ago
Ram on a different machine via ethernet has lower latency than spinning disks in the same machine.
- Cthulhu_ 3y agoYou're reaching. Modern filesystems cache disk access in memory, and modern hardware doesn't use spinny disks for applications.
- yawaramin 3y agoAlso, SQLite has a configurable local page cache which it maintains directly in your application's process. There's a very likelihood that you're just hitting that in-memory cache directly, let me emphasize, in your own process. In-process memory cache hit is faster than separate-process memory cache hit over ethernet.
- bravetraveler 3y agoWe're actually to a point where storage bandwidth can exceed memory! NVMe arrays are weird, can be better to just rip it from the drives if you need bandwidth over latency Even then, with how easy the memory cache is to invalidate... I'm not sure even that's worthwhile. The caching isn't some Paragon of performance - there's only so much it can do, when looking at it funny invalidates it.
- merpnderp 3y agoWe've spent ridiculous amounts of money on faster disk and network and we're still at around 30ms for our average server ping to the DB.
- icedchai 3y agoWhat do you consider a DB "server ping" ? Network ping? Or connect and "select 1"? Something else?
- MagicMoonlight 3y agoWhy would you use memory on a different machine when you could just run them both on the same machine?
- gpderetta 3y agoYes, the net can be very fast. Of course when you start adding IP, TCP, SSL, HTTP, json serialization, chatty protocols, less than stellar implementation languages... suddenly [1] the network is the bottleneck. [1] for very small values of suddenly.