mirror of https://github.com/sbt/sbt.git
Suggest using alternate gc implementation
Running publishLocal in the zinc project can cause gc thrashing with the default parallelgc collector using jdk8 on my laptop. If I switch to G1GC, it does not thrash even if I leave the heap the same size.
This commit is contained in:
parent
4e3d351e71
commit
f23aecfdbf
|
|
@ -38,7 +38,8 @@ class GCMonitor(logger: Logger) extends AutoCloseable {
|
|||
if ((total > window.toMillis * ratio) && (lastWarned.get + window).isOverdue) {
|
||||
lastWarned.set(Deadline.now)
|
||||
val msg = s"${total / 1000.0} seconds of the last $window were spent in garbage " +
|
||||
"collection. You may want to increase the project heap size for better performance."
|
||||
"collection. You may want to increase the project heap size using `-Xmx` or try " +
|
||||
"a different gc algorithm, e.g. `-XX:+UseG1GC`, for better performance."
|
||||
logger.warn(msg)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue