Answer the question
In order to leave comments, you need to log in
How to arrange fast reading of random sections in a 400 GB file?
It is necessary to read blocks of bytes of a given size from the file as quickly as possible.
I created a 400GB file and wrote 4 billion records of 100 bytes into it.
Then I try to randomly get 100 bytes from anywhere in the file.
SSD 400 gb, 56gb ram, linux ubuntu, ext4. The code is minimal in java.
Used the RandomAccessFile class. But for seek each time it does it not from the current location but from the beginning of the file.
The result is 1000 random reads of blocks of 100 bytes in 7 seconds.
How can you speed up random reading?
Answer the question
In order to leave comments, you need to log in
The author should have pointed out right away that this is not a physical server, but an azure microsoft hypervisor .
It explains a lot... No, it explains everything!
And it would be better to remove the word SSD if you yourself did not hold this "SSD" in your hands (and no one held it in your hands, because it's just a virtual machine under a hypervisor).
But for seek, each time it does it not from the current location, but from the beginning of the file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question