<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>setting JVM heap size in 64bit JVM</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=14823288" />
  <subtitle>setting JVM heap size in 64bit JVM</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=14823288</id>
  <updated>2026-06-15T03:52:09Z</updated>
  <dc:date>2026-06-15T03:52:09Z</dc:date>
  <entry>
    <title>RE: setting JVM heap size in 64bit JVM</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14906456" />
    <author>
      <name>Sreeraj AV</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14906456</id>
    <updated>2012-07-18T07:19:04Z</updated>
    <published>2012-07-18T07:19:04Z</published>
    <summary type="html">Thanks Mika.. &lt;br /&gt;&lt;br /&gt;&lt;div class="quote-title"&gt;Mika Koivisto:&lt;/div&gt;&lt;blockquote&gt;Heap is not absolute amount of memory your java process will take. There&amp;#39;s several factors and I&amp;#39;ve quite recently explained them in my blog post: &lt;a href="http://javaguru.fi/blog/-/blogs/why-is-my-java-process-taking-more-memory-than-i-gave-it-"&gt;Why is my java process taking more memory than I gave it?&lt;/a&gt;&lt;/blockquote&gt;</summary>
    <dc:creator>Sreeraj AV</dc:creator>
    <dc:date>2012-07-18T07:19:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: setting JVM heap size in 64bit JVM</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14849398" />
    <author>
      <name>Linus Sphinx</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14849398</id>
    <updated>2012-07-13T15:56:06Z</updated>
    <published>2012-07-13T15:56:06Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div class="quote-title"&gt;Mika Koivisto:&lt;/div&gt;&lt;blockquote&gt;The maximum heap certainly isn't 4GB on a 64bit system. You can increase it well beyond that but doing so may adversely affect the performance of the application because of longer full garbage collection times.&lt;/blockquote&gt;&lt;br&gt;Must have been thinking 32 bit, thank you. GC is also tunable.&lt;br&gt;&lt;pre&gt;&lt;code&gt;-XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=20 -XX: ParallelGCThreads=8
&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Linus Sphinx</dc:creator>
    <dc:date>2012-07-13T15:56:06Z</dc:date>
  </entry>
  <entry>
    <title>RE: setting JVM heap size in 64bit JVM</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14841523" />
    <author>
      <name>Sagar A Vyas</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14841523</id>
    <updated>2012-07-13T07:39:54Z</updated>
    <published>2012-07-13T07:39:54Z</published>
    <summary type="html">Hi Mika,&lt;br /&gt;&lt;br /&gt;Good Sharing,&lt;br /&gt;@Sreeraj : you can follow given formula.&lt;br /&gt;&lt;strong&gt;(-Xmx) + (-XX:MaxPermSize) + numberofthreads * (-Xss) + Other mem&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Sagar Vyas</summary>
    <dc:creator>Sagar A Vyas</dc:creator>
    <dc:date>2012-07-13T07:39:54Z</dc:date>
  </entry>
  <entry>
    <title>RE: setting JVM heap size in 64bit JVM</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14834430" />
    <author>
      <name>Mika Koivisto</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14834430</id>
    <updated>2012-07-12T21:07:55Z</updated>
    <published>2012-07-12T21:07:55Z</published>
    <summary type="html">The maximum heap certainly isn&amp;#39;t 4GB on a 64bit system. You can increase it well beyond that but doing so may adversely affect the performance of the application because of longer full garbage collection times.</summary>
    <dc:creator>Mika Koivisto</dc:creator>
    <dc:date>2012-07-12T21:07:55Z</dc:date>
  </entry>
  <entry>
    <title>RE: setting JVM heap size in 64bit JVM</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14834391" />
    <author>
      <name>Mika Koivisto</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14834391</id>
    <updated>2012-07-12T21:04:08Z</updated>
    <published>2012-07-12T21:04:08Z</published>
    <summary type="html">Heap is not absolute amount of memory your java process will take. There&amp;#39;s several factors and I&amp;#39;ve quite recently explained them in my blog post: &lt;a href="http://javaguru.fi/blog/-/blogs/why-is-my-java-process-taking-more-memory-than-i-gave-it-"&gt;Why is my java process taking more memory than I gave it?&lt;/a&gt;</summary>
    <dc:creator>Mika Koivisto</dc:creator>
    <dc:date>2012-07-12T21:04:08Z</dc:date>
  </entry>
  <entry>
    <title>RE: setting JVM heap size</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14832395" />
    <author>
      <name>Linus Sphinx</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14832395</id>
    <updated>2012-07-12T18:24:20Z</updated>
    <published>2012-07-12T18:24:20Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I use apache bench or http_load if non-ssl to simulate a bunch of users banging on the site while monitoring the memory usage in jvisualvm remotely and adjust accordingly til I get the behavior desired. &lt;br&gt;Given your hardware I'd assume you'll need some resources for other apps like backup etc. and recommend for a starting point a setenv.sh of;&lt;br&gt;&lt;pre&gt;&lt;code&gt;JAVA_OPTS="$JAVA_OPTS -XX:NewSize=700m -XX:MaxNewSize=700m -Xms2560m -Xmx2560m -XX:MaxPermSize=512m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=20 -XX: ParallelGCThreads=8"
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;concatenate this to the above string to enable JMX;&lt;br&gt;&lt;pre&gt;&lt;code&gt; -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=33100
&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Linus Sphinx</dc:creator>
    <dc:date>2012-07-12T18:24:20Z</dc:date>
  </entry>
  <entry>
    <title>RE: setting JVM heap size</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14827633" />
    <author>
      <name>Sreeraj AV</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14827633</id>
    <updated>2012-07-12T13:55:32Z</updated>
    <published>2012-07-12T13:55:32Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Chintan Akhani:&lt;/div&gt;&lt;blockquote&gt;As you have 6 GB memory allocated for liferay instance only, so you can increase heap size upto  4 GB.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks for your reply. How you are telling 4GB? is there any procedure or best practices  to determine the heap size value? Can you please explain..</summary>
    <dc:creator>Sreeraj AV</dc:creator>
    <dc:date>2012-07-12T13:55:32Z</dc:date>
  </entry>
  <entry>
    <title>RE: setting JVM heap size</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14824457" />
    <author>
      <name>Chintan Akhani</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14824457</id>
    <updated>2012-07-12T11:46:12Z</updated>
    <published>2012-07-12T11:46:12Z</published>
    <summary type="html">As you have 6 GB memory allocated for liferay instance only, so you can increase heap size upto  4 GB.</summary>
    <dc:creator>Chintan Akhani</dc:creator>
    <dc:date>2012-07-12T11:46:12Z</dc:date>
  </entry>
  <entry>
    <title>RE: setting JVM heap size</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14823509" />
    <author>
      <name>Sagar A Vyas</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14823509</id>
    <updated>2012-07-12T10:14:53Z</updated>
    <published>2012-07-12T10:14:53Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Sreeraj AV:&lt;/div&gt;&lt;blockquote&gt;Below is the system details. This server is dedicated to Liferay portal. I need to change the JVM heap size. Can anyone please tell me what is the optimal heap size i can provide for this particular JVM? &lt;br /&gt;&lt;br /&gt;Processor:      Intel(R) Xeon(R) CPU      E5645  @ 2.40GHz  , dual core- 64bit&lt;br /&gt;Memory    :       6GB&lt;br /&gt;OS             :       Linux   64bit&lt;br /&gt;Java           :      java version &amp;#34;1.6.0_21-ea&amp;#34;   64bit&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Hi Sreeraj,&lt;br /&gt;&lt;br /&gt;You can edit setenv.sh located in &lt;strong&gt;&amp;#34;tomcat-New\tomcat-6.0.32\bin&amp;#34;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;-Xmx1024m -XX:MaxPermSize=256m&amp;#34; change it to -Xmx1024m -XX:MaxPermSize=512m&amp;#34;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Hope this help.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Sagar Vyas</summary>
    <dc:creator>Sagar A Vyas</dc:creator>
    <dc:date>2012-07-12T10:14:53Z</dc:date>
  </entry>
  <entry>
    <title>setting JVM heap size in 64bit JVM</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14823287" />
    <author>
      <name>Sreeraj AV</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14823287</id>
    <updated>2012-07-12T09:55:50Z</updated>
    <published>2012-07-12T09:55:50Z</published>
    <summary type="html">Below is the system details. This server is dedicated to Liferay portal. I need to change the JVM heap size. Can anyone please tell me what is the optimal heap size i can provide for this particular JVM? &lt;br /&gt;&lt;br /&gt;Processor:      Intel(R) Xeon(R) CPU      E5645  @ 2.40GHz  , dual core- 64bit&lt;br /&gt;Memory    :       6GB&lt;br /&gt;OS             :       Linux   64bit&lt;br /&gt;Java           :      java version &amp;#34;1.6.0_21-ea&amp;#34;   64bit</summary>
    <dc:creator>Sreeraj AV</dc:creator>
    <dc:date>2012-07-12T09:55:50Z</dc:date>
  </entry>
</feed>
