Re: Clojure/Luminus memory footprint

2014-01-10 Thread Mikera
An idle app isn't going to give you any useful benchmarks at all. The JVM is considerably faster and more scalable than either Ruby or Erlang when given a real application workload and maybe 2GB of RAM to play with (which you can certainly afford, if you are doing anything vaguely important on a

Re: Clojure/Luminus memory footprint

2014-01-09 Thread Sean Corfield
On Jan 9, 2014, at 8:18 PM, Gary Trakhman wrote: > From the other direction, tuning a super-fast GC occasionally is way more fun > than malloc/free! > > I just found that enabling G1 was a quick hit for me. When I run that many > clojure processes, some 700MB heaps mostly wasted at steady-stat

Re: Clojure/Luminus memory footprint

2014-01-09 Thread Gary Trakhman
>From the other direction, tuning a super-fast GC occasionally is way more fun than malloc/free! I just found that enabling G1 was a quick hit for me. When I run that many clojure processes, some 700MB heaps mostly wasted at steady-state tends to hurt. As far as I can tell, there's no performanc

Re: Clojure/Luminus memory footprint

2014-01-09 Thread Timothy Baldridge
Just be aware, that Erlang VM doesn't even come close to the performance of the JVM. For example, Erjang (Erlang on the JVM) runs up to 6000% faster than stock Erlang: http://codemesh.io/slides/kresten-krab-thorup.pdf So it's a trade-off like most things. The JVM takes a bit more memory from the O

Re: Clojure/Luminus memory footprint

2014-01-09 Thread Gary Trakhman
Elixir's pretty neat. Apologies for the jvm :-). On Thursday, January 9, 2014, gvim wrote: > After careful consideration I've concluded that, coming from a dynamic > scripting language background, I just don't have the time or inclination to > nurse-maid the JVM so Clojure isn't for me. Tuning GC

Re: Clojure/Luminus memory footprint

2014-01-09 Thread gvim
After careful consideration I've concluded that, coming from a dynamic scripting language background, I just don't have the time or inclination to nurse-maid the JVM so Clojure isn't for me. Tuning GC and memory allocation doesn't seem to be necessary with Elixir on the Erlang VM which borrows

Re: Clojure/Luminus memory footprint

2014-01-09 Thread Gary Trakhman
Yes, this is exactly the behavior I was expecting. 14Mb is your actual memory footprint, the rest is waste due to the JVMs aggressive memory retention policy. See my earlier comment about trying the G1 garbage collector and these: https://twitter.com/gtrakGT/status/402569842361790464 http://www.s

Re: Clojure/Luminus memory footprint

2014-01-09 Thread gvim
Gary Pressing "Perform GC" reduced the Used Heap figures to 14Mb and 13Mb but I now see these climbing to new heights while the app is completely idle. JVM and main are now both using 75Mb each and climbing. This does not inspire confidence for an app which is sitting idle. gvim On 09/01/2

Re: Clojure/Luminus memory footprint

2014-01-08 Thread Gary Trakhman
what happens to the heap if you manually trigger a GC via the button? On Thu, Jan 9, 2014 at 12:01 AM, gvim wrote: > Here's the date from `jvisualvm`: > > JVM: >char[] 19% >java.lang.object 15.5% >java.util.TreeMap$Entry 12% >java.io.ObjectStreamClass$WeakClassKey 11% >

Re: Clojure/Luminus memory footprint

2014-01-08 Thread gvim
Here's the date from `jvisualvm`: JVM: char[] 19% java.lang.object 15.5% java.util.TreeMap$Entry 12% java.io.ObjectStreamClass$WeakClassKey 11% byte[]11% int[] 6% main: char[] 24% byte[] 17% java.lang.object 14% java.util.TreeMap$Entry 10% java

Re: Clojure/Luminus memory footprint

2014-01-08 Thread Gary Trakhman
you're still missing some basics about java memory management. In another thread, I mentioned the java VM will take more memory than it needs, that is because it prioritizes throughput over footprint. There are knobs for all of that. It's not clear what's taking so much memory, but it's certainl