0

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!

  • Please put your solution in an answer so you can mark this as resolved. :) – wjandrea Jul 1 '16 at 19:25
0

Turns out that I didn't have free memory after all, the 200 MB file was somehow taking up 1.1 GB of space. I fixed it by increased the memory allowance for my virtual machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.