Investigating Java's Memory Mapped File API
Requires Java 1.8+
Designed to be built using Maven 3.x, such as mvn package
The scripts directory contains utilities for executing the Java programs.
Run 50 processes which map the specified file, /tmp/memoryMappedFile to memory. Then read random chunks of the file between 4096 and 8192 bytes every 100 ms.
./memoryMapping.sh 50 /tmp/memoryMappedFile 4096 8192 100
This script generates a script to kill the generated processes called killProcesses.sh
Generate a file called file.txt with a size of 1500 MiB.
/generateFile.sh file.txt 1500
Load random bytes with length 4294967296 (4GiB) to the specified size and will read the memory every 1000 ms.
./memoryLoader.sh 4294967296 1000