Sign in to follow this  
Keldun

Wurm Client Is Limiting Java Heap Size Too Much.

Recommended Posts

The last while I had some serious problem with CPU load spikes and lockups in Wurm:

http://forum.wurmonl...l__+cpu +spikes

I found some stuff to improve things on my end, but there is one issue with Wurm itself that I wanted to bring to attention:

The Wurm client jnlp file is limiting Java heap size to 800MB. This is probably an older value that has never been updated to current requirements, like multistory.

When the local area gets cluttered, the heap is simply not big enough to hold all the data and the Java Garbage collection is running into a wall, jumping into full mode, which locks up the program until it's done.

The problem could easily be alleviated by increasing heap size, but unfortunattely the jnlp <max-heap-size> parameter seems to take precedence over the ecternal javaws -Xmx option. Can't manually edit the jnlp file either, because there is a signature check.

The incremental Garbage Collection option -Xincgc seems to work in preventing the lockups though. However a larger heap would probably improve performance.

Edit: you can't have the heap size in the jnlp set too high in case of older machines though. Best would be a setting in the launcher that would start the game with a custom heap size. That way the user can adjust to his system. You could also use an automatic option by default that scales to maybe 50% system ram.

Edited by Keldun
  • Like 4

Share this post


Link to post
Share on other sites

yes, please increase heapsize. I have 16 gb ram and wurm starts to slow down at only 1.5gb ram usage.

today I even had a crash due to the limited heap size.

Share this post


Link to post
Share on other sites

You can start the javaws with the following parameters to control the heap size

javaws -J-Xmx2000M http://www.wurmonline.com/client/wurmclient.jnlp

This won't work well with 32bit Java though since this is limited to about 1.2-1.4GB of maximum memory

Share this post


Link to post
Share on other sites

As I said above: It does not matter that you ask for Xmx2000M, because the wurmclient.jnlp will set it back down to 800.

Edited by Keldun

Share this post


Link to post
Share on other sites

JConsole memory info on the process

With -J-Xmx1000:


Time: 2013-03-25 05:31:27
Used: 216.784 kbytes
Committed: 323.608 kbytes
Max: 1.020.736 kbytes
GC time: 2,262 seconds on ParNew (285 collections)
0,214 seconds on ConcurrentMarkSweep (38 collections)

Without:


Time: 2013-03-25 05:35:24
Used: 19.039 kbytes
Committed: 129.472 kbytes
Max: 815.936 kbytes
GC time: 0,058 seconds on ParNew (4 collections)
0,014 seconds on ConcurrentMarkSweep (1 collections)

Edited by ago
  • Like 1

Share this post


Link to post
Share on other sites

BUMP! seems almost a year passed and nothing changed about the  800 MB limit plz make a slider and let us choose our cache size or detect available memory and use a % of it


Share this post


Link to post
Share on other sites

heap.png


 


 


This shows crossing the Independence server once at the highest possible settings, then standing still in one spot again for four minutes. Since the initial issues after the 1.0 release were resolved a larger heap size simply isn't needed anymore.


Textures don't live in the heap, it takes as much memory as needed for those.

Share this post


Link to post
Share on other sites

BUMP! seems almost a year passed and nothing changed about the  800 MB limit plz make a slider and let us choose our cache size or detect available memory and use a % of it

When the launcher is showing the max memory has already been set and can't be changed anymore. If you really need to change the defaults you can do so with the -J-Xmx option.

Share this post


Link to post
Share on other sites

i still keep hitting the GC and even with my SSD it get to 1 fps doing that when i load the game it already take 1.2gb ram and after some time cap at 1.5gb


 


got xmx 2g and already better


Edited by Durolith

Share this post


Link to post
Share on other sites

What numbers are the 1.2gb and 1.5gb? Virtual mem, resident mem, java heap?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this