Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tomcat Memory Usage Exceeds Configured Limits on VIVO 1.14 #4025

Open
jesielviana opened this issue Nov 26, 2024 · 4 comments
Open

Tomcat Memory Usage Exceeds Configured Limits on VIVO 1.14 #4025

jesielviana opened this issue Nov 26, 2024 · 4 comments

Comments

@jesielviana
Copy link

I am experiencing an issue with memory management on a VIVO 1.14 installation running on Debian 11. Despite configuring CATALINA_OPTS according to the installation manual with the following settings:

export CATALINA_OPTS="-Xms512m -Xmx512m -XX:MaxPermSize=128m"

The Tomcat process is consuming significantly more memory than configured. Monitoring tools report the following usage:

  • VIRT: 97 GB
  • RES: 41 GB
  • SHR: 34 GB

This behavior suggests that the memory usage is not respecting the -Xmx setting defined in CATALINA_OPTS.

Additional Details:

OS: Debian 11
VIVO Version: 1.14
Java Version: OpenJDK 11
Tomcat Version: 9

Questions/Help Needed:

Are there additional configurations required for VIVO that override CATALINA_OPTS?
Is this a known issue, and are there recommended workarounds or fixes?
Could the excessive memory usage be caused by specific VIVO components or the application itself?

@chenejac
Copy link
Contributor

chenejac commented Dec 6, 2024

@jesielviana thanks for reporting this issue.

Can you provide more details which monitoring tools you used? It looks those numbers of virtual, resident and shared memory size are quite big. Maybe to try to check memory usage of tomcat through its manager application?

@jesielviana
Copy link
Author

Most of the memory is being used to load .dat files, for example: vivo/home/tdbContentModels/OSPG.dat
Print of pmap command:

Captura de tela de 2024-12-14 17-04-37

There are hundreds of lines like these.

@brianjlowe
Copy link
Member

brianjlowe commented Dec 15, 2024

Hi @jesielviana, these files are used by the the Jena TDB triple store. By default (on 64-bit machines) TDB uses memory mapped files; because this memory is separate from the Java heap space, the -Xmx parameter will not affect its size. TDB does have a mode that does its file caching inside the heap but VIVO would need to be modified slightly to set the tdb.file_mode parameter accordingly. There are also related parameters for setting the size of the cache. See the "File access - 'mapped' and 'direct' modes" and related info here: https://jena.apache.org/documentation/tdb/store-parameters.html .

The Jena page mentions that the default mapped mode "flex[es] the amount of memory for file system cache to balance demands from other programmes on the same hardware." Are you finding otherwise? Is the Tomcat process hogging memory needed for other processes? If not, letting the available memory be used for TDB's cache should lead to the best performance of the triple store.

@jesielviana
Copy link
Author

jesielviana commented Dec 16, 2024

Got it, in that case I'll change the tdb.file_mode parameter to “direct”, I think that's the best setting for our context.
Thank you @brianjlowe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants