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 modern machine).
Note that the JVM (+ Java libraries) is doing some very important stuff with the memory that it uses: - Pre-allocating working memory, so that it can respond faster - Compiling (via JIT) classes to optimised native code, so that your code runs fast - Caching / interning things (e.g. commonly used Strings, or Clojure keywords). This takes some memory in the first instance, but pays off in the long term - Delaying garbage collection until the most efficient time. This "laziness" is better for overall throughput, and if you aren't using the memory for anything else it is a smart thing for the JVM to do (if you do need all the memory suddenly, it will of course clear the garbage and let you use it as a priority). The fact that the JVM does this and uses some memory to do so should inspire lots of confidence. That's what a good VM is *supposed* to do. If you're running on a highly constrained embedded device, then everything is different of course. But in that case you should probably be looking at something closer to C rather than a VM-based language. On Friday, 10 January 2014 01:33:35 UTC, g vim wrote: > > 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/2014 06:27, Gary Trakhman wrote: > > what happens to the heap if you manually trigger a GC via the button? > > > > > > On Thu, Jan 9, 2014 at 12:01 AM, gvim <gvi...@gmail.com <javascript:> > > <mailto:gvi...@gmail.com <javascript:>>> 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% > > byte[] 11% > > int[] 6% > > > > main: > > char[] 24% > > byte[] 17% > > java.lang.object 14% > > java.util.TreeMap$Entry 10% > > java.io.ObjectStreamClass$__WeakClassKey 10% > > int[] 6% > > > > > > Heap size: 366Mb > > Used heap: 85Mb > > > > gvim > > > > > > > > On 09/01/2014 04:32, Gary Trakhman wrote: > > > > 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 certainly not luminus or clojure. Use jvisualVM to > > find out > > for sure instead of comparing apples to oranges. > > > > > > On Wed, Jan 8, 2014 at 4:24 PM, gvim <gvi...@gmail.com<javascript:> > > <mailto:gvi...@gmail.com <javascript:>> > > <mailto:gvi...@gmail.com <javascript:> > > <mailto:gvi...@gmail.com<javascript:>>>> > wrote: > > > > On OS X Mountain Lion I just compared the memory footprint > of 3 > > out-of-the-box web apps in these frameworks: > > > > Clojure/Luminus: 152Mb (JVM) + 186Mb (main) = 338Mb > > > > Ruby/Rails: 62Mb > > > > Elixir (Erlang)/Weber: 32Mb > > > > I was rather shocked, to say the least. Not to troll, it > > has made me > > think again about deploying Clojure web apps on hosting > > platforms > > with modest amounts RAM. I'm sure the figures for all 3 > would > > increase significantly once the web apps are fleshed out > > but that > > probably applies equally to all 3 frameworks. > > > > gvim > > > > > > -- > > -- > > You received this message because you are subscribed to the > > Google > > Groups "Clojure" group. > > To post to this group, send email to > > clo...@googlegroups.com <javascript:> <mailto: > clo...@googlegroups.com <javascript:>> > > <mailto:clo...@googlegroups. <javascript:>__com > > <mailto:clo...@googlegroups.com <javascript:>>> > > > > Note that posts from new members are moderated - please be > > patient > > with your first post. > > To unsubscribe from this group, send email to > > clojure+unsubscribe@__googlegr__oups.com > > <http://googlegroups.com> > > <mailto:clojure%2Bunsubscribe@ <javascript:>__ > googlegroups.com > > <mailto:clojure%252bunsubscr...@googlegroups.com <javascript:>>> > > > > > For more options, visit this group at > > http://groups.google.com/____group/clojure?hl=en > > <http://groups.google.com/__group/clojure?hl=en> > > > > <http://groups.google.com/__group/clojure?hl=en > > <http://groups.google.com/group/clojure?hl=en>> > > --- You received this message because you are subscribed to > the > > Google Groups "Clojure" group. > > To unsubscribe from this group and stop receiving emails > > from it, > > send an email to clojure+unsubscribe@__googlegr__oups.com > > <http://googlegroups.com> > > <mailto:clojure%2Bunsubscribe@ <javascript:>__ > googlegroups.com > > <mailto:clojure%252bunsubscr...@googlegroups.com <javascript:>>>. > > > For more options, visit > > https://groups.google.com/____groups/opt_out > > <https://groups.google.com/__groups/opt_out> > > <https://groups.google.com/__groups/opt_out > > <https://groups.google.com/groups/opt_out>>. > > > > > > > > -- > > -- > > You received this message because you are subscribed to the > Google > > Groups "Clojure" group. > > To post to this group, send email to > > clo...@googlegroups.com<javascript:> > > <mailto:clo...@googlegroups.com <javascript:>> > > Note that posts from new members are moderated - please be > > patient with > > your first post. > > To unsubscribe from this group, send email to > > clojure+unsubscribe@__googlegroups.com > > <mailto:clojure%2b...@googlegroups.com <javascript:>> > > For more options, visit this group at > > http://groups.google.com/__group/clojure?hl=en > > <http://groups.google.com/group/clojure?hl=en> > > --- > > You received this message because you are subscribed to the > Google > > Groups "Clojure" group. > > To unsubscribe from this group and stop receiving emails from > > it, send > > an email to clojure+unsubscribe@__googlegroups.com > > <mailto:clojure%2b...@googlegroups.com <javascript:>>. > > For more options, visit > > https://groups.google.com/__groups/opt_out > > <https://groups.google.com/groups/opt_out>. > > > > > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to > > clo...@googlegroups.com<javascript:> > > <mailto:clo...@googlegroups.com <javascript:>> > > Note that posts from new members are moderated - please be patient > > with your first post. > > To unsubscribe from this group, send email to > > clojure+unsubscribe@__googlegroups.com > > <mailto:clojure%2b...@googlegroups.com <javascript:>> > > For more options, visit this group at > > http://groups.google.com/__group/clojure?hl=en > > <http://groups.google.com/group/clojure?hl=en> > > --- You received this message because you are subscribed to the > > Google Groups "Clojure" group. > > To unsubscribe from this group and stop receiving emails from it, > > send an email to clojure+unsubscribe@__googlegroups.com > > <mailto:clojure%2b...@googlegroups.com <javascript:>>. > > For more options, visit https://groups.google.com/__groups/opt_out > > <https://groups.google.com/groups/opt_out>. > > > > > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clo...@googlegroups.com<javascript:> > > Note that posts from new members are moderated - please be patient with > > your first post. > > To unsubscribe from this group, send email to > > clojure+u...@googlegroups.com <javascript:> > > For more options, visit this group at > > http://groups.google.com/group/clojure?hl=en > > --- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to clojure+u...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.