EDIT: I just increased memory allocation to 2 GB and viewed system monitor while running the script, turns out that memory usage is spiking from 500 MB to 1.6 GB just from loading a 200 MB file, so it sort of was a problem of not having enough memory. Cache is working now with enough room so sort of solved the problem.
I'm using Ubuntu 14.04 in Virtual Box and it's allocated 1.5 GB memory and 20 GB hard drive. When I load a file of ~75 MB using a python script the computer is reading from hard drive the first time I run the script which takes a few seconds, but when I run it again the file is still cached so it runs almost instantly with no hard drive usage. But then when I try to run the same script on a file that is ~200 MB, it goes through the load phase and then runs, but when I run it again it goes through the load phase all over again, with the same hard drive usage. Is there any way I can get it to store the file in cache, or is there some other problem going on?
Thanks to anyone who can help!