On Thursday, May 14, 2015 at 8:45:09 PM UTC-4, Lee wrote:
>
> Thanks Colin and also Alex and Andy.
>
> I'm trying to determine a reasonable way to do this without reading a book
> about it.
>
> It sounds like I should use ^:replace, -server, and also
> -XX:-TieredCompilation (is that right, the way I've changed + to -?), and
> also -XX:+AggressiveOpts. Does it make sense to use all of these together?
>
> And maybe I should get rid of "-XX:+UseG1GC", since I'm not really sure if
> that's a good thing.
>
> Assuming that none of those things use as big a chunk of RAM as is
> available, I guess I should keep my messy code for the memory options.
>
> So that would mean that overall I'd do the following to maximize
> performance on long-running, compute-intensive, memory-intensive runs:
>
> :jvm-opts ^:replace ~(let [mem-to-use
> (long (* (.getTotalPhysicalMemorySize
>
> (java.lang.management.ManagementFactory/getOperatingSystemMXBean))
> 0.8))]
> [(str "-Xmx" mem-to-use)
> (str "-Xms" mem-to-use)
> "-server"
> "-XX:-TieredCompilation"
> "-XX:+AggressiveOpts"])
>
> Seem reasonable?
>
Umm, the :replace metadata needs to be on the vector. Attaching it to the
let form won't do much of anything useful. So:
:jvm-opts ~(let [mem-to-use
(long (* (.getTotalPhysicalMemorySize
(java.lang.management.ManagementFactory/getOperatingSystemMXBean))
0.8))]
^:replace [(str "-Xmx" mem-to-use)
(str "-Xms" mem-to-use)
"-server"
"-XX:-TieredCompilation"
"-XX:+AggressiveOpts"])
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.