Issue
We're developing a device that's basically a raspberry pi that reads file data, processes it, and streams data out of a USB device at a given frame rate.
Due to the nature of the features we're using, we can't totally eliminate garbage allocation, and our GC pauses for even minor, young generation GC are causing frame skips.
Right now we're using HotSpot JVM, but my understanding is that it's better suited to large heap sizes, our memory needs rarely go over 256mb, so I'm wondering if there's a better VM with garbage collection that can give us pauses less than 15ms on a Raspberry Pi?
Solution
Ultimately, we've decided that we're fighting uphill making the application do something it really wasn't built for, or at least, it's not worth the development resources to continue along that path.
Our current solution is to leave the application as it is, and live with the reality of garbage collection pauses so we don't hamstring future development of our application with a crazy amount of optimization. Let Java do what it was designed to do.
To stop pauses that are causing frame skips, we have instead opted to create a second, tiny buffer application, managed by our primary application via IPC.
Answered By - user3689186