"so much RAM."
I am disappointed with the third and fifth paragraphs of this post, as they do not end with the phrase "so much RAM." Please re-write this post to be more redundant/repetitive.
"so much RAM."
This is a "classic" problem that has been beaten to death in the text books.
You seriously need to re-think and research the algorithm you are using. It
can be done without so much RAM.
Basically you are searching a large "tree". Like i said this problem has been
solved and analysed and re-hash and writen about more times then anyone
can count You do not need so much RAM.
In the worst case you can implement your own memory paging system and
move parts of the search tree in to RAM as required. The good thing is that
RAM access is 100% predictable so custom written paging can work well.
If you use asynchronus I/O you don't block while waiting on a the disk.
There is no need for so much RAM this has been done decades ago using
computers that were not able to address so much RAM
The reason you might need so much RAM is for some task were you can
not predict what memory is needed to by accessed next. For example a
DBMS can'r know what the next query will be. But this a a very predictable
"tree walk" and you should be able to swap in sub trees before they
are needed.
In fact if you have a fixed budget you would be best to spend it on CPU
power before you spend it on RAM.