5 ms·
Another easy solution I didn't see mentioned is to create swap space on Linux. This obviously isn't the fastest solution, but setting up 128GB of swap space let
by zneveu 7y ago
Another easy solution I didn't see mentioned is to create swap space on Linux. This obviously isn't the fastest solution, but setting up 128GB of swap space let's me mindlessly load most datasets into memory without a single code change.
- yummypaint 7y agoDo you have a sense of how the performance would compare to chunking? My naive expectation is that loading data from disk to swapped memory involves writing that data to disk (even if it will only be read).
- wongarsu 7y agoChunking can speed up processing even if the dataset fits into memory because you are interleaving disk reads and computation and the OS is likely to prefetch the next chunk into the read cache while you're still busy computing. On other problems chunking doesn't work at all and just mmaping or dedicating giant amounts of swap are better strategies. It depends on the problem at hand
- olavgg 7y agoAdding a 280GB Optane as swap is very efficient and cheap. It is still a lot slower than RAM though. But much much faster than NVME ssd's
- p1esk 7y agoAre you talking about Optane NVDIMM or NVME?
- Rafuino 7y agoPlus, swap performance is being improved bit by bit, so it's not as much of a dirty word as it was before. https://lwn.net/Articles/717707/ https://lwn.net/Articles/717707/
- oxplot 7y agoThis! It's simple, performant depending on application and costs zero in extra development.
- edoo 7y agoUsing mmap with the right flags should let you load and process huge files as well as if they were in ram.