The root of the problem is that the files are on the same drive and, unlike your dual-core processor, your hard drive can only do one thing at a time.
If you read two files at the same time, the disk heads will move from one file to another and vice versa. Given that your hard drive can read each file after about 40 seconds, it now has the additional overhead of moving the head of the disk between three separate files while reading.
The fastest way to read multiple files from one hard drive is to do everything in one stream and read them one by one. Thus, the head moves only once to read the file (at the very beginning), and not several times to read.
To optimize this process, you need to either change your logic (do you really need to read the entire contents of all three files?). Or buy a faster hard drive / put 3 files on three different hard drives and use threading / use raid.
source share