Cache Size
Beatrix Willius
bwillius at gmx.de
Sat Jan 4 01:17:45 CST 2014
While implementing Valentina Server for my app I saw that the cache size can be edited manually. I think the last time a had a look at this was a couple of years ago. Set the cache size to 40 MB and was finished.
Is the text below from the wiki still current? This hasn’t been changed since 2010. Even my 2 year old MacBook has 4 GB of RAM. Some customers of mine have machines with 20 GB. My databases can easily get a size of larger than 10 GB. What’s the recommendation for the cache size?
Why has the cache size set to be a fixed value in 2014? Shouldn’t this be handled dynamically?
http://www.valentina-db.com/docs/dokuwiki/v5/doku.php?id=valentina:performance:cache
Database Cache
Valentina database uses cache to reduce disk input/output operations.
When Valentina engine starts it allocates fixed sized piece of RAM to keep here the most hot and last used disk pages. The more size of cache, the more file pages it can keep.
We have upper limit of cache size also. It should not exceed the half of available RAM on start of Valentina engine. Let your computer have 1GB of RAM. Let your OS and other system utilities eat 500Mb. So on start of Valentina it get 500MB of RAM, and maximal size of cache in such conditions should not be bigger of 250Mb. Second part of available RAM will be used to keep runtime things, such as joins, bitsets, RAM tmp tables, … Usually size of cache in 20-100MB is quite enough.
It needs keep in mind that modern MacOS X, Linux and Windows can swap out any RAM information to disk. In this case we get disk IO operation to WRITE and later to READ. The bigger is your cache, the more chances to get this, especially if on computer exists other active applications, which may require dynamically big allocations.
Mit freundlichen Grüßen/Regards
Trixi Willius
http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals
More information about the Valentina
mailing list