I am writing a database-style thing in C (i.e., about 500,000 records will be stored and run). I'm going to run it in a memory-limited environment (VPS), so I don't want to use balloon memory. I'm not going to process huge amounts of data - maybe up to 200 MB, but I want the amount of memory to remain in the 30 MB area (pulling these numbers out of the air).
My instinct does my own page processing (real databases do this), but I got advice saying that I should just highlight all this and let the OS do the VM swap for me. My numbers will never grow above this order. What is the best choice in this case?
Assuming a second choice, at what point would it be wise for the program to execute its own paging? Obviously, RDBMsses that can handle gigabytes should do this, but there should be a point on the scale on which the question stands.
Thank!
source
share