Hi. We are running into frequent “out of memory” errors when running a pretty basic program on Rio1. Looking at top in linux, the main process is using 236MB of 250MB memory, and the rest is used by several smaller processes. Is this a common issue with Rio1? Has anyone come up with a workaround?
I was thinking to enable swap so that it can use a bit more memory, since there is quite a bit of available disk space. Is it legal to enable swap, and has anyone been able to do it? The disks and partitions seem to be very oddly configured on the Rio, I am getting an error when running “swapon” that it cannot find the device for the swap file.
Thanks!
Java Garbage Collection — FIRST Robotics Competition documentation has the memory limitation mitigations documented with the current recommended practices. Notably, while it’s on the list, a swap file isn’t the first thing recommended.
3 Likes
Thanks! We will try these suggestions. I am curious though if anyone is actually using swap on USB and how it performs. On Rio1 it’s USB 2.0 which I would guess is pretty slow for swap.
To answer another one of your questions: Yes, I have heard this is a common issue. Might be good to report back here what worked best for you. Would be good for other teams dealing with this. Good luck!
We have tried this solution and it worked extremely well, went from barely being able to even deploy a wpilib java project to running full robot code with AdvantageKit and more
Thanks for all your suggestions. I followed the recommendations and it seems a bit better though still very slow.