News for hackers. Stuff that matters.
Re:Go’s march to low-latency GC by nvarsj on Wednesday July 06, 2016 @07:51AM (#12042461)
A significant drawback of the hotspot JVM is the amount of memory required for even simple apps. At least 64Mi for the most simple, and typically much higher. A typical web app with a 1000 request threads will use something like 1.5Gi of memory (512Mi heap, 1Gi for thread stacks, classes, etc).

Golang apps tend to happily run with less than 100Mi, so are well suited as daemon processes that don't get in the way.

However if you need to support a large amount of dynamic state (> 1Gi), the hotspot GC is very difficult to beat.

Re:Go’s march to low-latency GC by sievebrain on Wednesday July 06, 2016 @01:07PM (#12044434)
Memory usage in Java can be misleading. Some versions of the JVM will happily take ALL your free RAM if it thinks it's sitting there unused because there's a RAM/CPU tradeoff in garbage collected systems: the less frequently you GC the less CPU time you burn and the faster the app runs.

If your machine actually does have gobs of free RAM, it therefore makes sense for Java to use all of it.

If your machine has gobs of free RAM you were planning on using for something else after your Java app started, well, that's something the JVM couldn't know. Some versions (on Windows?) monitor free memory and adjust down its own usage if you seem to be consuming the headroom, but on other platforms, you just have to tell Java it's got a limit and can't go beyond it.

Re:Go’s march to low-latency GC by 102030485868 on Wednesday July 06, 2016 @11:24PM (#12047317)
Unless you specifically tell the JVM otherwise using the -Xmx flag.

See: https://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrd...