Sign in to follow this  
Keldun

Constant Cpu Spikes And Graphics Freeze.

Recommended Posts

My machine has: Intel Core i3 M 380 @ 2.53GHz × 4, NVidia GeForce 315M, 3,7 GiB RAM.

The system i Ubuntu Pangolin and uses normally 10% CPU and 1,1 GiB RAM.

Wurm is using moderate settings and running at +/- 30 fps using 150-200% CPU, 800 MiB RAM. and less than 1KiB/s Network.

Normally, that is. but then Wurm repeatedly (with distances of 5-30s) does something and I get a Network burst of anywhere up to 120 KiB followed by a CPU Burst of 400% and Wurm completely stops drawing any frames. for a full second or more. I basically go from 30 fps to 0 fps and back to 30 fps.

Now comes the important part: Wurm does the same even when I turn the World Render Off. There is litterally nothing to draw besides the gui, but Wurm can't do it.

This is practically shouting classic Multithreading lockup. Rendering is a read only process. there is nothing that needs to be thread save.

And it would be nice if that sudden load could be spread more evenly, it's also lugging down the entire System.

Share this post


Link to post
Share on other sites

I assume he means 100% of all of his CPU's, or 400% of one. Usually we just call this "100%".

Share this post


Link to post
Share on other sites

sry for asking that, it seems that's how it is on his OS, anyway that's totaly retarded and if i were him i'd convert the values to normal true math values.

Share this post


Link to post
Share on other sites

Linux (or rather the monitoring program top) displays CPU usage normalized to one core. A single threaded process with 100% utilizes one core completly. The same with 4 threads is displayed as 400% and this is useful metric because having a single threaded process running full throttle on a 8 core system would only display it at 12.5% even though the process is at its max capacity.

Edited by ago

Share this post


Link to post
Share on other sites

Linux (or rather the monitoring program top) displays CPU usage normalized to one core. A single threaded process with 100% utilizes one core completly. The same with 4 threads is displayed as 400% and this is useful metric because having a single threaded process running full throttle on a 8 core system would only display it at 12.5% even though the process is at its max capacity.

guess ppl should call it CoreUsage not CPU usage then for the sake of logic , we all know CPU is just 1 and it can have as many cores as possible,100% cpu should mean all cores at 100% ,anyway i'll drop the discussion as it's clear this should be on linux/top forums and not wurmonline forum:).

i just brought it up so is not that confusing for others like me that never used linux .

Share this post


Link to post
Share on other sites

I had a similar thing on my 3770k. What I did to solve it was set the model loading threads to 1 and priority to low. I was a little surprised to be honest that model loading could make it lurch so badly at times.

I do run wurm off a SSD though, so it doesn't really get that caught up trying to load models - they still load amazingly fast despite the 1 thread count and low priority. If you're using a mechanical hard drive for it though, it might not work for you.

Share this post


Link to post
Share on other sites

I have testing that model loader out a bit and yes setting it to 1 low does increase performance, 1 minimum is too little though.

I also found out out that disabling pbuffer increases performance for me as well.

However these two options only improve general performance, so the cpu spikes are a bit less severe, they still happen just the same though.

The thing is the cpu spikes happen even when I turn Wurms graphic renderer completely off and just show the gui. So it seems the source of the problem is not graphics related, Wurm is doing something else that prevents it from doing graphics.

The situation seems to be worse when there is high load on the server (many players) it was particularly bad today when everyone was loading the new update. So I suspect it has something to with latency and network response.

It almost seems like my Wurm is desperately shouting at the server anwser me please! please answer! answer ! respond! respond! respond! and refusing to do anything else until it get's that response.

Edited by Keldun

Share this post


Link to post
Share on other sites

I found the culprit: It's the amount of data present in my local.

It is definitely not the graphics, because the problem persists even when I use the no_world_render opion.

My card (Nvidia 315M) can handle Wurm with a difference in framerates of maybe 30-50% in normal situations well enough and they are taxing at best maybe 20% of my total CPU Power (difference between high graphics and no_world_render)

It doesn't seem to be networjk related after all either. I found that correlation because obviously a data stream from the network will change local data and trigger the problem that way, but the CPU spikes also happen at times when there is no special network activity.

But now comes the interesting part: I recently went through the GD Tunnel and the entire way through, my CPU usage was flatlining. In the areas at both ends it saw some wavy action and when I was passing through littered deeds it was peaking like hell.

So the conclusion is, my Wurm has some trouble with data handling. It's doing it very inefficiently in short extreme pulses that cripple my entire system and prevent the graphics from drawing any more frames.

It's not only the loading of new local data btw, even when standing completely still in a littered deed it kept peeking, there was pretty much nothing to do for the game except keep track of less than 10 mobs moving.

Share this post


Link to post
Share on other sites

At least I found something that helps:

This is an Nvidia Optimus Card, and it seems that Linux needed some very serious CPU when moving the frames from the nvidia cart where it's rendered to the intel card where the screen is attached. That is why the CPU spikes froze my frames. it wasn't that Wurm was unable to draw them it was that my PC was unable to transfer them. Now the Bumblebee driver got and addition called Primus that greatly improves that transfer performance.

Don't get me wrong though, Wurm is still producing those CPU spikes with high data load. It's just that I managed to lessen their impact somewhat, now I get less total freezes.

Edited by Keldun

Share this post


Link to post
Share on other sites

That sounds wrong, garbage collection is a low priority action, it shouldn't cripple the cpu.

Share this post


Link to post
Share on other sites

A full GC does stop all Java treads and effectivly locks the program for a short time.

Share this post


Link to post
Share on other sites

OK, read about it, seems the full high priority GC kicks in when the low priority concurrent GC can't keep up anymore.

Might be the Wurm devs need to do some optimisation there.

Edit: Rofl, ok this is cracking me up, excerpt from the Wurm jnlp:

<java initial-heap-size="134217728" max-heap-size="838860800" href="http://java.sun.com/...ts/autodl/j2se" version="1.6+"/>

This means Wurm is always starting with an 800mb heap...

I remeber trying to increase the heap previously, but it didn't seem to have an affect. Apparently javaws prefers the max-heap-size parameter over the -Xmx option.

The -Xincgc option (incremental Garbage Collection) seems to take hold though. It prevents the lockup at cost of some general performance.

Edited by Keldun

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