Re: Running Clojure apps using less memory.

2016-03-28 Thread Jason Basanese
Thanks guys! Going through your various tips helped me get the memory usage down below the limit. Now things are running nicely. -- 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 p

Re: Running Clojure apps using less memory.

2016-03-28 Thread Josh Tilles
Hi Jason, I have a hunch that you have more Java processes running than you need and/or are aware of. For example, by running your Clojure app via lein run -m clojureweb.core/serve, you have two Java processes: one for Leiningen, and a separate one (started by Leiningen) for your app. It’s unli

Re: Running Clojure apps using less memory.

2016-03-28 Thread Nando Breiter
If you want to get more deeply into JVM memory tuning, *perhaps* jClarity's Censum tool can help: https://www.jclarity.com/censum/. It will run an analysis of your specific applications memory usage patterns and make suggestions how to configure the JVM for it. Aria Media Sagl +41 (0)76 303 4477

Re: Running Clojure apps using less memory.

2016-03-28 Thread Gary Trakhman
I always work in a single process, REPL and server, there's no need to separate them out generally. You might have better luck with the G1 collector, in addition to JVM tuning. The G1 has the useful property of giving memory back to the OS when a GC is performed. Use the command-line flag: -XX:+U

Re: Running Clojure apps using less memory.

2016-03-28 Thread Michael Willis
You can tune memory usage by passing parameters to the JVM: http://docs.oracle.com/cd/E19900-01/819-4742/abeik/index.html The sample leiningen project file has an example of how to pass parameters to the JVM: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L264 Hope tha