in Education by
I am going to install Tomcat on linux with JVM Heap size as 2048m(2GB) to 2304m(2GB+256MB) by setting CATALINA_OPTS="-Xms2048m -Xmx2304m" in cataina.sh file and the Linux OS have 8GB of the RAM so i am making some points , please help with this Should tomcat consume directly 2GB from OS? If no to above ,then how much it should take? If memory is taken by the tomcat is less than 2GB then this 2GB memory allocated by os for this tomcat is only used for this only or some app can use this memory? and finally we are setting the this max and min memory , means OS allocates all that amount of the memory for tomcat? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The JVM will pre-allocate whatever memory you specify for -Xms. So, it will request and allocate 2GB of memory at startup. If it needs more memory later (up to -Xmx), the JVM will request more memory from the OS. But, do you know you need this much memory? The main driver of memory consumption will be your appication not Tomcat. Simple webapps with a few servlets or JSPs can easily run in less than 32MB of heap. You need to measure your application for performance / load to determine the optimal setting. A side note - the preferred method for setting JVM parameters is with the JAVA_OPTS setting in setenv.sh, not catalina.sh.

Related questions

0 votes
    If the retention policy is set to two days, then for the two days after a record is published, it is available for ... will be discarded to free up space. (1)True (2)False...
asked Jun 17, 2021 in Technology by JackTerrance
0 votes
    How can you differentiate procurement for stock vs. consumption?...
asked Mar 15, 2021 by JackTerrance
0 votes
    What do you mean by consumption-based planning (CBP)?...
asked Mar 14, 2021 in Technology by JackTerrance
+1 vote
    Which cloud offering focuses on the consumption of services?...
asked Oct 20, 2020 in Technology by JackTerrance
+1 vote
    Which cloud offering focuses on the consumption of services?...
asked Oct 20, 2020 in Technology by JackTerrance
0 votes
    I have a Hello-World application with one java class and one jsp. The JSP prints out some text ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    I have a Hello-World application with one java class and one jsp. The JSP prints out some text ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    We have recently moved to Tomcat 8.5.4 (from 8.5.3) and to Omnifaces 2.4 (from 2.3), ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    When I try the following lookup in my code: Context initCtx = new InitialContext(); Context envCtx = ( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 22, 2022 in Education by JackTerrance
0 votes
    what configuration needs to be tweaked, and where does it live, in order to increase the maximum allowed ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    what configuration needs to be tweaked, and where does it live, in order to increase the maximum allowed ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I'm porting a servlet from Tomcat 5.5 to OC4J 10.1.3.1. In Tomcat we set up a JDBCRealm ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    I am trying to override the tomcat session manager with an embedded tomcat. These are the steps preformed ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    I am building a plugin for a web application in java which is running on Tomcat and behind a apache ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I am building a plugin for a web application in java which is running on Tomcat and behind a apache ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 17, 2022 in Education by JackTerrance
...