Hi Joshua.
Garbage Collection in the JVM happens automatically and can be
controlled by the switches that we use to start the JVM (in this case
DSpace). It is a very complex and individual process. What I mean by
this is that what works well on one installation will not necessarily
work on another installation.
JVM tuning (which includes GC tuning) depends on the version of Java
that you are using. There are many tutorials available on this subject,
but all of them say the same basic thing. You have to start tuning,
test, tweak, test, tweak, test ........... It is a long and repetitive
process.
The go-to answer is to give the JVM more memory, and although this will
generally work, it is not the right thing to do. You should set up some
form of monitoring (we use the JMX plugin on Zabbix to monitor many JVM
metrics), but things like PSI-Probe are very useful for troubleshooting.
I have found the following configuration to work well with DSpace 6.3
running on Java 8:
CATALINA_OPTS=-server \
-Xms4096m \
-Xmx4096m \
-XX:+UseG1GC \
-XX:MaxGCPauseMillis=500 \
-Djava.awt.headless=true \
-Dfile.encoding=UTF-8 \
I believe that it is much better to use CATALINA_OPTS as opposed to
JAVA_OPTS as this separates the server configuration (tomcat) from the
CLI configuration (used for cron jobs and other command line interface
tools).
This configuration tells tomcat to use 4GB of heap memory (this implies
that you should have at least 8 GB of memory in your server), and to use
the G1GC garbage collector with a target of a 500 millisecond pause for
garbage collections. Although this works well for me, it may not work
for you at all, but I believe that it could be a good starting point for
you.
Hope this helps.
Kind Regards.
Shaun.
On 2020/11/13 14:42, Joshua Kim wrote:
Hi,
I am Joshua Kim from University of Delaware. I am new to DSpace. We
have had some issue in garbage collection in Tomcat. How would any of
you manage garbage collection regularly? Restart Tomcat every week or
something else?
--
All messages to this mailing list should adhere to the DuraSpace Code
of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google
Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dspace-tech/b819fe31-f334-456e-9575-d5077c4d7a56n%40googlegroups.com
<https://groups.google.com/d/msgid/dspace-tech/b819fe31-f334-456e-9575-d5077c4d7a56n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
All messages to this mailing list should adhere to the DuraSpace Code of
Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dspace-tech/063a5f75-74a0-6cac-6abe-140ae7d7e686%40teqcle.co.za.