How to tune Primo 2.0 Memory Parameters for the best performance
I have settled on this process through my personal experience and the contributions of others who are now impossible to name. Selecting the correct memory parameters can make the difference between success and failure, when running Primo on a 64mb device. Using this same concept on a 128mb device, is probably not necessary, but it won’t hurt the device either. First of all, if you don’t set the memory parameters, Primo will, and it will automatically reserve 4000000 bytes for "other applications". If you only have 64 mb to start with you can’t afford to loose 2.5mb. Through trial and error, others have found that setting reserve_memory=1500000 saves Primo the most memory. If you set the parameter lower, Primo will trump your settings and automatically reserve 4000000.bytes for "other applications".
Next is "cache". We’ll set that to cache=2048, simply because setting it any higher does not cause any discernible improvement in Primo performance.
The next parameter, max_memory=, is where you can make the biggest improvement in your 64mb devices performance. The first step in this process is to run
resinfo.exe in place of Primo, to determine how much free memory is available. On my Insignia NS-NAV01, resinfo.exe shows 39.8MB of free memory available to run Primo. We need to convert that number to bytes for inclusion in the sys.txt, so we multiply the 39.8 by 1048576, for a total of 41,733,324.8 bytes of free memory. Next we subtract the cache(2048) and reserve_memory(1500000), and come up with ballpark total of 40,000,000 bytes for the maximum amount of memory alloted to Primo.
The resulting parameters for the sys.txt would be;
[debug]
max_memory=40000000
reserve_memory=1500000
cache=2048
Setting up the memory in this manner will, will help eliminate "out of memory" errors, and those situations where your device just quits navigating with no explaination. In my experience, setting max_memory=40000000 is about as low as you can go and have Primo 2.0 run with stability. Be warned that if you set max_memory higher than 40000000, but don’t have the memory, you will only cause errors. I have 3 different 64mb devices thet will successfully run 13,000km simulations, as a result of this memory tuning process. As usual, YMMV.