I do it like this:

in my .bashrc

export JVM_OPTS="-XX:+UseG1GC"
export LEIN_JVM_OPTS="-XX:+UseG1GC"


You can verify that it's working by checking jvisualvm's view of the
jvm-opts on the relevant processes.  Running it system-wide has given me
reduced memory-pressure on my lappie with no downside.


On Fri, Feb 7, 2014 at 11:29 AM, Lee Spector <lspec...@hampshire.edu> wrote:

>
> Does anyone know what to put in :jvm-opts in project.clj to use the G1
> garbage collector? I see a lot about how G1 works and how to configure it
> in web search results, but not this little nugget of info.
>
> Also, if anyone has any advice about GC for my use case I'd love to hear
> it. My use case is: generating lots and lots of garbage in long-running,
> CPU-intensive, multicore processes. I want to minimize overall runtime and
> don't much care about responsiveness at all.
>
> Thanks,
>
>  -Lee
>
> --
> 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.
>

-- 
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.

Reply via email to