Tuning Garbage Collection in Apache Tomcat Announcing the arrival of Valued Associate #679:...

Can two people see the same photon?

What order were files/directories output in dir?

Was Kant an Intuitionist about mathematical objects?

Universal covering space of the real projective line?

Would color changing eyes affect vision?

What are the main differences between the original Stargate SG-1 and the Final Cut edition?

Simple Http Server

Co-worker has annoying ringtone

In musical terms, what properties are varied by the human voice to produce different words / syllables?

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

How to write capital alpha?

What initially awakened the Balrog?

How to ask rejected full-time candidates to apply to teach individual courses?

How were pictures turned from film to a big picture in a picture frame before digital scanning?

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

Nose gear failure in single prop aircraft: belly landing or nose-gear up landing?

GDP with Intermediate Production

Does the Black Tentacles spell do damage twice at the start of turn to an already restrained creature?

Putting class ranking in CV, but against dept guidelines

My mentor says to set image to Fine instead of RAW — how is this different from JPG?

Test print coming out spongy

Moving a wrapfig vertically to encroach partially on a subsection title

I can't produce songs

Caught masturbating at work



Tuning Garbage Collection in Apache Tomcat



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Come Celebrate our 10 Year Anniversary!reloadable = true tomcatUnusual Apache->Tomcat caching issueApache 2.2 with TomcatTomcat hangs when enabling tomcat-users.xmlCannot shutdown Tomcat - transport Errortomcat, jvm, monitoring, restartingReplacing Apache instance with Tomcat 6Amazon EC2 - Free memoryApache tomcat is not restartingConnections pending Apache + Tomcat Setup





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have the following parameters in tomcat6.conf



JAVA_OPTS="-server -Xmx6144m -Xms3072m -XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=999 -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname= -Djava.rmi.server.useLocalHostname=false" 


but at peak time I see the following regularly,



ERROR memory-watcher - used 87.73865761212004%, max 6403194880 reaping at priority CRITICAL


is there any parameter I can use to to tune tomcat performance or GC ?










share|improve this question
















bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















    0















    I have the following parameters in tomcat6.conf



    JAVA_OPTS="-server -Xmx6144m -Xms3072m -XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=999 -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname= -Djava.rmi.server.useLocalHostname=false" 


    but at peak time I see the following regularly,



    ERROR memory-watcher - used 87.73865761212004%, max 6403194880 reaping at priority CRITICAL


    is there any parameter I can use to to tune tomcat performance or GC ?










    share|improve this question
















    bumped to the homepage by Community 7 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I have the following parameters in tomcat6.conf



      JAVA_OPTS="-server -Xmx6144m -Xms3072m -XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=999 -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname= -Djava.rmi.server.useLocalHostname=false" 


      but at peak time I see the following regularly,



      ERROR memory-watcher - used 87.73865761212004%, max 6403194880 reaping at priority CRITICAL


      is there any parameter I can use to to tune tomcat performance or GC ?










      share|improve this question
















      I have the following parameters in tomcat6.conf



      JAVA_OPTS="-server -Xmx6144m -Xms3072m -XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=999 -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname= -Djava.rmi.server.useLocalHostname=false" 


      but at peak time I see the following regularly,



      ERROR memory-watcher - used 87.73865761212004%, max 6403194880 reaping at priority CRITICAL


      is there any parameter I can use to to tune tomcat performance or GC ?







      tomcat6






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 15 '13 at 22:00







      arashsami

















      asked Jul 11 '13 at 11:21









      arashsamiarashsami

      136




      136





      bumped to the homepage by Community 7 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 7 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          The "-Xms3072m" and "-Xmx6144m" bits are where you're configuring your starting heap size and your max heap, respectively.



          This is distinct from the "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" bits, where you set up the generation memory (where the JVM stores classes, rather than the heap where it stores objects). One thing I notice here is that the sizes are different. Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection.



          You might also want to try "-XX:+UseParallelGC" instead of "-XX:+UseConcMarkSweepGC"...Usually if I have problems with one, then I have better luck with the other.






          share|improve this answer
























          • Thanks for this, you know where you said "Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection." Do you means the size of "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" should be the same ?

            – arashsami
            Jul 11 '13 at 17:03











          • I think he means make your minimum and maximum heap sizes the same e.g. "-Xms6144m -Xmx6144m".

            – Fred Clausen
            Jul 12 '13 at 7:09











          • OMG NO! If someone tells you this a good idea, then they 1) they are probably wrong or 2) there are whole lot of qualifications of when this is a good idea which you've forgotten about

            – symcbean
            Dec 28 '17 at 14:22











          • Arguably, if setting max and min heap sizes identically avoids some kind of problem you should really fix that problem instead.

            – Spooler
            Feb 28 '18 at 23:40












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f522498%2ftuning-garbage-collection-in-apache-tomcat%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          The "-Xms3072m" and "-Xmx6144m" bits are where you're configuring your starting heap size and your max heap, respectively.



          This is distinct from the "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" bits, where you set up the generation memory (where the JVM stores classes, rather than the heap where it stores objects). One thing I notice here is that the sizes are different. Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection.



          You might also want to try "-XX:+UseParallelGC" instead of "-XX:+UseConcMarkSweepGC"...Usually if I have problems with one, then I have better luck with the other.






          share|improve this answer
























          • Thanks for this, you know where you said "Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection." Do you means the size of "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" should be the same ?

            – arashsami
            Jul 11 '13 at 17:03











          • I think he means make your minimum and maximum heap sizes the same e.g. "-Xms6144m -Xmx6144m".

            – Fred Clausen
            Jul 12 '13 at 7:09











          • OMG NO! If someone tells you this a good idea, then they 1) they are probably wrong or 2) there are whole lot of qualifications of when this is a good idea which you've forgotten about

            – symcbean
            Dec 28 '17 at 14:22











          • Arguably, if setting max and min heap sizes identically avoids some kind of problem you should really fix that problem instead.

            – Spooler
            Feb 28 '18 at 23:40
















          0














          The "-Xms3072m" and "-Xmx6144m" bits are where you're configuring your starting heap size and your max heap, respectively.



          This is distinct from the "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" bits, where you set up the generation memory (where the JVM stores classes, rather than the heap where it stores objects). One thing I notice here is that the sizes are different. Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection.



          You might also want to try "-XX:+UseParallelGC" instead of "-XX:+UseConcMarkSweepGC"...Usually if I have problems with one, then I have better luck with the other.






          share|improve this answer
























          • Thanks for this, you know where you said "Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection." Do you means the size of "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" should be the same ?

            – arashsami
            Jul 11 '13 at 17:03











          • I think he means make your minimum and maximum heap sizes the same e.g. "-Xms6144m -Xmx6144m".

            – Fred Clausen
            Jul 12 '13 at 7:09











          • OMG NO! If someone tells you this a good idea, then they 1) they are probably wrong or 2) there are whole lot of qualifications of when this is a good idea which you've forgotten about

            – symcbean
            Dec 28 '17 at 14:22











          • Arguably, if setting max and min heap sizes identically avoids some kind of problem you should really fix that problem instead.

            – Spooler
            Feb 28 '18 at 23:40














          0












          0








          0







          The "-Xms3072m" and "-Xmx6144m" bits are where you're configuring your starting heap size and your max heap, respectively.



          This is distinct from the "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" bits, where you set up the generation memory (where the JVM stores classes, rather than the heap where it stores objects). One thing I notice here is that the sizes are different. Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection.



          You might also want to try "-XX:+UseParallelGC" instead of "-XX:+UseConcMarkSweepGC"...Usually if I have problems with one, then I have better luck with the other.






          share|improve this answer













          The "-Xms3072m" and "-Xmx6144m" bits are where you're configuring your starting heap size and your max heap, respectively.



          This is distinct from the "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" bits, where you set up the generation memory (where the JVM stores classes, rather than the heap where it stores objects). One thing I notice here is that the sizes are different. Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection.



          You might also want to try "-XX:+UseParallelGC" instead of "-XX:+UseConcMarkSweepGC"...Usually if I have problems with one, then I have better luck with the other.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 11 '13 at 11:51









          SatanicpuppySatanicpuppy

          5,53811217




          5,53811217













          • Thanks for this, you know where you said "Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection." Do you means the size of "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" should be the same ?

            – arashsami
            Jul 11 '13 at 17:03











          • I think he means make your minimum and maximum heap sizes the same e.g. "-Xms6144m -Xmx6144m".

            – Fred Clausen
            Jul 12 '13 at 7:09











          • OMG NO! If someone tells you this a good idea, then they 1) they are probably wrong or 2) there are whole lot of qualifications of when this is a good idea which you've forgotten about

            – symcbean
            Dec 28 '17 at 14:22











          • Arguably, if setting max and min heap sizes identically avoids some kind of problem you should really fix that problem instead.

            – Spooler
            Feb 28 '18 at 23:40



















          • Thanks for this, you know where you said "Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection." Do you means the size of "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" should be the same ?

            – arashsami
            Jul 11 '13 at 17:03











          • I think he means make your minimum and maximum heap sizes the same e.g. "-Xms6144m -Xmx6144m".

            – Fred Clausen
            Jul 12 '13 at 7:09











          • OMG NO! If someone tells you this a good idea, then they 1) they are probably wrong or 2) there are whole lot of qualifications of when this is a good idea which you've forgotten about

            – symcbean
            Dec 28 '17 at 14:22











          • Arguably, if setting max and min heap sizes identically avoids some kind of problem you should really fix that problem instead.

            – Spooler
            Feb 28 '18 at 23:40

















          Thanks for this, you know where you said "Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection." Do you means the size of "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" should be the same ?

          – arashsami
          Jul 11 '13 at 17:03





          Thanks for this, you know where you said "Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection." Do you means the size of "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" should be the same ?

          – arashsami
          Jul 11 '13 at 17:03













          I think he means make your minimum and maximum heap sizes the same e.g. "-Xms6144m -Xmx6144m".

          – Fred Clausen
          Jul 12 '13 at 7:09





          I think he means make your minimum and maximum heap sizes the same e.g. "-Xms6144m -Xmx6144m".

          – Fred Clausen
          Jul 12 '13 at 7:09













          OMG NO! If someone tells you this a good idea, then they 1) they are probably wrong or 2) there are whole lot of qualifications of when this is a good idea which you've forgotten about

          – symcbean
          Dec 28 '17 at 14:22





          OMG NO! If someone tells you this a good idea, then they 1) they are probably wrong or 2) there are whole lot of qualifications of when this is a good idea which you've forgotten about

          – symcbean
          Dec 28 '17 at 14:22













          Arguably, if setting max and min heap sizes identically avoids some kind of problem you should really fix that problem instead.

          – Spooler
          Feb 28 '18 at 23:40





          Arguably, if setting max and min heap sizes identically avoids some kind of problem you should really fix that problem instead.

          – Spooler
          Feb 28 '18 at 23:40


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f522498%2ftuning-garbage-collection-in-apache-tomcat%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Українські прізвища Зміст Історичні відомості |...