The python program I created is limited to IO. Most of the time (more than 90%) is spent in one cycle, which is repeated ~ 10,000 times. In this cycle, ~ 100 KB of data is generated and written to a temporary file; it is then read by another program and statistics about this collected data. This is the only way to transfer data to the second program.
Because of this, which is the main bottleneck, I thought that moving the location of the temporary file from my main hard drive to (~ 40 MB) RAMdisk (inside more than 2 GB of free memory) would significantly increase the I / O speed for this file and thus reduce lead time. However, I got the following results (each averaged over 20 runs):
- Test data 1: Without RAMdisk - 72.7 s, with RAMdisk - 78.6s
- Test 2 data: without RAMdisk - 223.0s, with RAMdisk - 235.1s
It would seem that RAMdisk is slower than my hard drive.
What could be the reason for this?
Is there any other alternative to using RAMdisk to get a faster IO file?
performance file ramdisk
Mark bell
source share