3 ms·
Looking at the memory column, it looks to me like Java benchmark uses a large heap to avoid deallocations for most of requests. This means less but larger garba
by oriolid 5y ago
Looking at the memory column, it looks to me like Java benchmark uses a large heap to avoid deallocations for most of requests. This means less but larger garbage collections and reduces average time while increasing 99% where the GC shows up.
A long time ago I had to implement a real time service with Java. The best solution was to use whopping 16 megabytes of heap so that it would do a full GC multiple times per second but each of the GCs lasted less than a millisecond.
- cutemonster 5y agoWas there a theoretical upper bound for how long collecting those 16 MB could take?
- oriolid 5y agoNo idea. It was much faster than the service really needed to be, so we just set the heap to 128M in production and never heard about any latency problems.
- Tsarbomb 5y agoJust curious, did you experiment with different GCs?
- oriolid 5y agoAt the time CMS was the only option.