Can memory mapped file be loaded faster into RAM?

235 Views Asked by At

I have 256GB of RAM and 200GB file that I'm fully loading into RAM on windows 11. I'm using C# and .net core memory mapping and unsafe pointers. I map the big file to an address space and then access the addresses in a linear sequence to read from it from low address to high address, while I'm doing that windows OS is loading the pages to RAM. however this is super slow about 250MB/s, my SSD drive can do at least 2GB/s. After the first time load finishes, any subsequent memory scans are super fast coz all data is in RAM.

Is there any trick to speed up the loading process?

0

There are 0 best solutions below