<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TripleA optimized JVM switches]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Since I got an 'out of memory error' playing Greyhawk Wars, I looked into the vmoptions file and did some testing.<br />
For your information, the best conf I got for Greyhawk Wars (and probably others) is the following:</p>
<p dir="auto">-XX:InitialHeapSize=6G<br />
-XX:MaxHeapSize=6G<br />
-XX:MetaspaceSize=64M<br />
-XX:MaxMetaspaceSize=64M<br />
-XX:+UseParNewGC<br />
-XX:+UseConcMarkSweepGC<br />
-XX:+CMSClassUnloadingEnabled<br />
-XX:+CMSParallelRemarkEnabled<br />
-XX:+CMSParallelInitialMarkEnabled<br />
-XX:NewRatio=2</p>
<p dir="auto">You are supposed to use the latest oracle (HotSpot) 1.8 JRE, and need at least 8 GB memory. With this conf, throughput stays over 98% and max pause is below 1 second.<br />
G1 is not good because of Humongous allocations and to-space exhaustion, CMS seems to be the best compromise.</p>
]]></description><link>https://forums.triplea-game.org/topic/552/triplea-optimized-jvm-switches</link><generator>RSS for Node</generator><lastBuildDate>Sun, 17 May 2026 19:04:47 GMT</lastBuildDate><atom:link href="https://forums.triplea-game.org/topic/552.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 01 Feb 2018 19:11:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TripleA optimized JVM switches on Mon, 05 Feb 2018 21:20:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ayoross" aria-label="Profile: ayoross">@<bdi>ayoross</bdi></a> Well I opened a PR a day ago that tries to cleanup the code: <a href="https://github.com/triplea-game/triplea/pull/2950" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/triplea-game/triplea/pull/2950</a><br />
However we're running into the exact same issue you just described. (By we I mean <a class="plugin-mentions-user plugin-mentions-a" href="/user/ssoloff" aria-label="Profile: ssoloff">@<bdi>ssoloff</bdi></a> and myself.)<br />
We're currently assuming it has something to do with concurrency issues.<br />
However in case we get everything working it does currently not look like the memory footprint is going down.<br />
Looks like this requires much more changes than a small algorithm <img src="https://forums.triplea-game.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f615.png?v=b936044300b" class="not-responsive emoji emoji-android emoji--confused" style="height:23px;width:auto;vertical-align:middle" title=":/" alt="😕" /></p>
]]></description><link>https://forums.triplea-game.org/post/6609</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6609</guid><dc:creator><![CDATA[RoiEX]]></dc:creator><pubDate>Mon, 05 Feb 2018 21:20:44 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Mon, 05 Feb 2018 21:37:37 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I tried the 1.9.0.0.7395 release, unfortunately the game crashes after 1 or 2 minutes on a functional error like "Possible Infinite Loop: Wrong number of casualties selected: ...".<br />
I does not work long enough to be sure, but it still looked like the memory usage was significantly smaller. You should perhaps consider reusing this code after some cleanup.<br />
With this code, the G1 collector should probably work fine ^^</p>
<p dir="auto"><img src="https://image.ibb.co/ep0PQc/Triple_A_7395_8304.png" alt="" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forums.triplea-game.org/post/6608</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6608</guid><dc:creator><![CDATA[Ayoross]]></dc:creator><pubDate>Mon, 05 Feb 2018 21:37:37 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Mon, 05 Feb 2018 20:36:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ayoross" aria-label="Profile: ayoross">@<bdi>ayoross</bdi></a> I agree.<br />
You might want to point out people might experience issues in the future or see a scary warning when launching from the command line (not sure when this warning is logged, or if JVM warnings are being swallowed)</p>
]]></description><link>https://forums.triplea-game.org/post/6607</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6607</guid><dc:creator><![CDATA[RoiEX]]></dc:creator><pubDate>Mon, 05 Feb 2018 20:36:24 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Mon, 05 Feb 2018 20:22:39 GMT]]></title><description><![CDATA[<p dir="auto">I think CMS is widely used and will still work some more time. Anyway, G1 is supposed to replace it sooner or later but the "battle calculator" creates huge objects, causing humongous allocations, which can be quite harmful. I tried with 6 MB regions, they still happen. All java apps using large objects are not good candidates for G1 migration, especially when the CMS works fine. I have the same problem using apache jmeter on HTTP content. That's only my opinion, of course.</p>
<p dir="auto">Note also this :<br />
"This JEP does not specify the major release in which support for CMS will be dropped. The decision of when to do that will be informed by the extent to which the G1 collector proves to be a suitable replacement for CMS. In the meantime, CMS users are encouraged to migrate to the G1 collector (-XX:+UseG1GC)"</p>
]]></description><link>https://forums.triplea-game.org/post/6606</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6606</guid><dc:creator><![CDATA[Ayoross]]></dc:creator><pubDate>Mon, 05 Feb 2018 20:22:39 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Fri, 02 Feb 2018 14:51:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/redrum" aria-label="Profile: redrum">@<bdi>redrum</bdi></a> My comment was for everybody interested ^^<br />
Found a release with this change: <a href="https://github.com/triplea-game/triplea/releases/tag/1.9.0.0.7395" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/triplea-game/triplea/releases/tag/1.9.0.0.7395</a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ayoross" aria-label="Profile: Ayoross">@<bdi>Ayoross</bdi></a> Regarding CMS. Keep in mind that CMS is considered to be deprecated as of Java 9 per <a href="http://openjdk.java.net/jeps/291" target="_blank" rel="noopener noreferrer nofollow ugc">JEP 291</a>, it will still work, but warn users when invoked from the command line.</p>
]]></description><link>https://forums.triplea-game.org/post/6491</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6491</guid><dc:creator><![CDATA[RoiEX]]></dc:creator><pubDate>Fri, 02 Feb 2018 14:51:34 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Fri, 02 Feb 2018 00:34:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ayoross" aria-label="Profile: ayoross">@<bdi>ayoross</bdi></a> I'm guessing <a class="plugin-mentions-user plugin-mentions-a" href="/user/roiex" aria-label="Profile: RoiEX">@<bdi>RoiEX</bdi></a> comment was meant for me but you can find all releases here: <a href="https://github.com/triplea-game/triplea/releases" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/triplea-game/triplea/releases</a></p>
]]></description><link>https://forums.triplea-game.org/post/6480</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6480</guid><dc:creator><![CDATA[redrum]]></dc:creator><pubDate>Fri, 02 Feb 2018 00:34:45 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 23:13:55 GMT]]></title><description><![CDATA[<p dir="auto">... only if I could find the corresponding jar file. I have no java dev environment <img src="https://forums.triplea-game.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=b936044300b" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forums.triplea-game.org/post/6476</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6476</guid><dc:creator><![CDATA[Ayoross]]></dc:creator><pubDate>Thu, 01 Feb 2018 23:13:55 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 22:53:10 GMT]]></title><description><![CDATA[<p dir="auto">Found it.<br />
You might want to do your benchmarking with a version between when <a href="https://github.com/triplea-game/triplea/pull/2540" target="_blank" rel="noopener noreferrer nofollow ugc">#2540</a> and <a href="https://github.com/triplea-game/triplea/pull/2617" target="_blank" rel="noopener noreferrer nofollow ugc">#2617</a> were merged to see if that reduces the usage by a noticeable amount.</p>
]]></description><link>https://forums.triplea-game.org/post/6475</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6475</guid><dc:creator><![CDATA[RoiEX]]></dc:creator><pubDate>Thu, 01 Feb 2018 22:53:10 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 22:46:07 GMT]]></title><description><![CDATA[<p dir="auto">I recall <a class="plugin-mentions-user plugin-mentions-a" href="/user/lafayette" aria-label="Profile: LaFayette">@<bdi>LaFayette</bdi></a> submitted a PR which reworked a lot of the OddsCalculator code, but the changes got reverted, because of unintentional uneccessary network usage, that slowed down the OddsCalculator by a lot when playing a networked game.<br />
Might be worth to revisit that.</p>
]]></description><link>https://forums.triplea-game.org/post/6474</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6474</guid><dc:creator><![CDATA[RoiEX]]></dc:creator><pubDate>Thu, 01 Feb 2018 22:46:07 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 23:34:10 GMT]]></title><description><![CDATA[<p dir="auto">I don't think there's a leak, I didn't see the tenured space usage growing endlessly in a 2-hours long game.<br />
However it would be a good idea to decrease the memory footprint of the hard AI.</p>
<p dir="auto"><img src="https://image.ibb.co/nrKetm/Triple_A_6_GBheap_CMS.png" alt="6GB heap with CMS" class=" img-fluid img-markdown" /></p>
<p dir="auto">Concerning the fast AI, as far as I know (few tests), there's no issue with a 1 GB heap, but the creator of GW recommends the use of the hard AI.</p>
<p dir="auto">Note also that a more simple map would probably require less resources, all my testing was based on GW.</p>
]]></description><link>https://forums.triplea-game.org/post/6472</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6472</guid><dc:creator><![CDATA[Ayoross]]></dc:creator><pubDate>Thu, 01 Feb 2018 23:34:10 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 22:02:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/roiex" aria-label="Profile: roiex">@<bdi>roiex</bdi></a> Yeah, I have a feeling we have a memory leak somewhere. My gut says its something to do with the battle calc as I've noticed my memory going up over time if I play a long session on a complex map. It seems to be true for the AI which uses the calc as well.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ayoross" aria-label="Profile: Ayoross">@<bdi>Ayoross</bdi></a> An interesting test would be trying the Fast AI instead of Hard AI as the main difference between them is the Fast AI doesn't use the battle calc.</p>
]]></description><link>https://forums.triplea-game.org/post/6470</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6470</guid><dc:creator><![CDATA[redrum]]></dc:creator><pubDate>Thu, 01 Feb 2018 22:02:19 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 21:58:39 GMT]]></title><description><![CDATA[<p dir="auto">Interesting. The last time I ran into an OutOfMemoryError this was due to a (by myself) poorly implemented breadth-first-search.<br />
Might be worth to look at the code to check if some uneccessary object creations can be avoided.</p>
]]></description><link>https://forums.triplea-game.org/post/6469</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6469</guid><dc:creator><![CDATA[RoiEX]]></dc:creator><pubDate>Thu, 01 Feb 2018 21:58:39 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 20:24:04 GMT]]></title><description><![CDATA[<p dir="auto">Another game that relies heavily on conditions and triggers is "Blue Vs Gray". Don't let the graphics fool you this is a well made game (very under rated). Just it bogs way down if guests join while in lobby.</p>
]]></description><link>https://forums.triplea-game.org/post/6461</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6461</guid><dc:creator><![CDATA[General_Zod]]></dc:creator><pubDate>Thu, 01 Feb 2018 20:24:04 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 22:59:14 GMT]]></title><description><![CDATA[<p dir="auto">With a 2 GB heap you will have to wait longer to reach the point where the throughput collapses (and eventually an OOM event happens). When playing a full AI Greyhawk Wars game, there's always at least 1 GB of tenured space used, leaving few space for the rest.<br />
Furthermore, if the young gen size is below 2 GB, you will have very frequent minor GC events, badly affecting the throughput.</p>
<p dir="auto">I used the adaptive mode of the old gc (UseAdaptiveSizePolicy) to find the right heap size value with a throughput target of 98% (GCTimeRatio=49).</p>
<p dir="auto">I'm sorry I discarded all the gc logs I used for testing at different heap size/algorithm, and I do not make any savegame (full AI). I would recommend setting the heap to 4 GB minimum, with a 2 GB eden space (NewSize=MaxNewSize=2G) and enabling CMS (UseParNewGC, UseConcMarkSweepGC).</p>
]]></description><link>https://forums.triplea-game.org/post/6457</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6457</guid><dc:creator><![CDATA[Ayoross]]></dc:creator><pubDate>Thu, 01 Feb 2018 22:59:14 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 19:17:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ayoross" aria-label="Profile: ayoross">@<bdi>ayoross</bdi></a> Yeah, the AI utilizes the battle calculator which makes copies of the entire game data but I tend to set it to 2G heap and don't seem to have issues. Do you have any example save games that seem slow or get OOM if you set it to 2G? I'm thinking of changing the default to 2G but if there is reason to set it higher we could consider that.</p>
]]></description><link>https://forums.triplea-game.org/post/6456</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6456</guid><dc:creator><![CDATA[redrum]]></dc:creator><pubDate>Thu, 01 Feb 2018 19:17:34 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 19:15:07 GMT]]></title><description><![CDATA[<p dir="auto">It seems the hard AI uses a lot of memory, 1 GB is clearly not enough.</p>
]]></description><link>https://forums.triplea-game.org/post/6455</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6455</guid><dc:creator><![CDATA[Ayoross]]></dc:creator><pubDate>Thu, 01 Feb 2018 19:15:07 GMT</pubDate></item><item><title><![CDATA[Reply to TripleA optimized JVM switches on Thu, 01 Feb 2018 19:13:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ayoross" aria-label="Profile: ayoross">@<bdi>ayoross</bdi></a> Wow, that's a lot of memory... I think the default is 1G heap. Surprised you needed to set it that high.</p>
]]></description><link>https://forums.triplea-game.org/post/6454</link><guid isPermaLink="true">https://forums.triplea-game.org/post/6454</guid><dc:creator><![CDATA[redrum]]></dc:creator><pubDate>Thu, 01 Feb 2018 19:13:16 GMT</pubDate></item></channel></rss>