3 ms·
This was a constant source of problems with any Java app I've ever used. Why can't heap be dynamically sized in cooperation with the OS JVM is running on? I i
by necovek 5y ago
This was a constant source of problems with any Java app I've ever used. Why can't heap be dynamically sized in cooperation with the OS JVM is running on?
I imagine it's some early backwards-compatibility JVM restriction, but it is so annoying.
- mcculley 5y agoFree memory is wasted memory. Applications that cache data have to do it on the heap. Yes, there should be a way for the system to coordinate usage of cache/free memory and coordinate with a VM’s GC. Until we have that, big apps will exhibit the aforementioned memory footprint.
- necovek 5y agoI am not talking of the netflix case from the OP, but rather of the general case where you are likely to have multiple services on a single host. Just imagine if a couple of them were Java-based: you'd have to do figure out how much is the maximum needed for each of those and sum it up and ensure the server has that much memory even if they are unlikely to all need it at the same time: if we are talking about waste, that's wasteful to me. Even in a more modern setting with containers, you'd have similar issues.
- xmodem 5y agoJava can be tuned to release freed memory to the OS: https://www.geekyhacker.com/2019/01/04/jvm-does-not-release-memory/ https://www.geekyhacker.com/2019/01/04/jvm-does-not-release-...