in reply to write hash to disk after memory limit
Swapping is the very act of writing to disk after the physical memory limit has been reached, is it not? When choosing what chunks of memory to swap out, the operating system will usually pick those that have not been in recent use. Unless you can write a significantly smarter algorithm, I'd expect the performance to be worse if you try to swap manually.
Only if you can make better guesses on what chunks of data you won't be needing any time soon will you be able to outperform the memory manager. But then, if you knew you wouldn't be needing parts of the data in memory, you probably wouldn't have bothered placing it there to begin with, right?
If the data set was 10 times larger, maybe I'd spend some time trying to come up with a completely different approach. Today, for a 17 GB data structure I'd seriously consider just buying more RAM so I could get back to work.
The sad truth is, one day wasted on writing, testing and debugging clever code costs far more than a 16 GB stick these days.
Time flies when you don't know what you're doing
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: write hash to disk after memory limit
by BrowserUk (Patriarch) on Mar 13, 2015 at 22:34 UTC | |
by FloydATC (Deacon) on Mar 14, 2015 at 07:09 UTC | |
Re^2: write hash to disk after memory limit
by LanX (Saint) on Mar 14, 2015 at 00:24 UTC | |
by FloydATC (Deacon) on Mar 14, 2015 at 07:02 UTC | |
by LanX (Saint) on Mar 14, 2015 at 10:54 UTC | |
|