the program is good. running fairly well but i saw the code and realised the 350 bytes associated with it.
maybe you can look into https://github.com/allegro/bigcache
and see if can reduce what you have written to something less gc intensive (you did your own gc() inside your code which seems to be highly CPU intensive given data cache of 16GB RAM of around 1 million entries... that's very "slow" at times with huge GC processing i think)
any ways to look into the code and speed it up taking GC into consideration and reducing the 350bytes further?