I got lots of "java.lang.OutOfMemoryError: GC overhead limit exceeded
" exceptions ,and after a short investigation added the following
flags (JVM 1.6.0_17):
-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:
+CMSIncrementalPacing
These flags seems to solve the problem, but I am interested in your
experience and best practices regarding JVM flags in clojure.
I know it really depends on the type of the application, but it seems
to me that the gc is working really hard under Clojure (I cannot prove
it, this is just an impression)
Gabi
-SS
-Xincgc : enable incremental garbage collector. Works great when
there's more than 1 CPU
-Xms4000m -Xmx4000m : set both min and max heap size to the same
amount (4 Gb in this case). Prevents dynamic heap resizing, which at
high loads may result in unexpected out of memory errors and long
pauses.
Albert
--
http://albert.rierol.net
This may not be useful, but have you tried running the Clojure new
branch? Rich implemented fine-grained locals clearing on the new
branch, and it helps avoid holding onto unused data accidentally.
http://groups.google.com/group/clojure/browse_thread/thread/14baed8f26097515/583cd8375a0d446d
Seth
-XX:+DoEscapeAnalysis
On Jan 7, 4:20 am, Gabi <bugspy...@gmail.com> wrote:
After trying all your suggestions, here is the combination that worked
best for me (in the order of their impact solving the problem):
JVM_FLAGS="-server \
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode \
-XX:+UseCompressedOops \
-XX:+DoEscapeAnalysis \
-XX:+UseBiasedLocking \
-XX:PermSize=64M \
-XX:MaxPermSize=256M \
-Xmx2g"
Now my app consumes ~500M of resident memory, but at least does not
crash and performance does not deteriorate.
BTW, I also tried the 'new' branch suggested . Didn't see any
noticeable effect.
On Jan 8, 4:40 am, Seth <seth.schroe...@gmail.com> wrote:
> Hi Gabi,
>
> This may not be useful, but have you tried running the Clojure new
> branch? Rich implemented fine-grained locals clearing on the new
> branch, and it helps avoid holding onto unused data accidentally.
>
> http://groups.google.com/group/clojure/browse_thread/thread/14baed8f2...
>
> Seth