I have a moderately large data set, about 800 MB or so, which is basically a small pre-computed table that I need to speed up some computations by several orders of magnitude (to create this file, it took several computers using an optimized and multi-threaded algorithm. .. I really need this file).
Now that it has been calculated once, only 800 MB of data is read only.
I can not store it in my memory.
This is currently one large, huge 800 megabyte file, but splitting it into smaller files is not a problem if that can help.
I need to read about 32 bits of data here and there in this file a lot of time. Before that, I do not know where I will need to read this data: the reading is evenly distributed.
What would be the fastest way in Java to execute my random reads in such a file or files? Ideally, I should do these reads from several unrelated threads (but, if necessary, I could queue reads in one thread).
Is Java NIO a way to transition?
I am not familiar with the βmemory mapped fileβ: I think I do not want to display 800 MB in memory.
All I want is the fastest random reads I can get to access this 800 MB of disk data.
btw in case people are wondering that this is not at all the same as the question I asked recently:
Java: fast disk-based hash
source share