How to modify the jvm parameter of tomcat itself?

you can modify the jvm parameters of an application in catalina.sh by declaring JAVA_OPTS, at the beginning of tomcat. Here are two places I do not quite understand, ask the bosses to advise:
1. If you set the jvm maximum heap memory limit to 2G here, do all war in the tomcat share 2G, or can each war have 2G independently?
2.tomcat itself is a program running on jvm, so how to adjust its own jvm parameters?

Jul.06,2021

generally speaking, tomcat and the applications running in it are in the same JVM


1. Share
2. Share

like the first one

are all in the same container

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36f28-34404.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36f28-34404.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?