Page 1 of 1
.net Updates [done]
Posted: Sat Oct 13, 2007 12:14 am
by Red Squirrel
Doing .net update and other maintenance to see if it fixes the cpu hogging issue. Should not be down for more then 1 hour.
Archived topic from AOV, old topic ID:1431, old post ID:8969
.net Updates [done]
Posted: Sat Oct 13, 2007 12:30 am
by Red Squirrel
Did not fix it.
This will be VERY hard, since theres no way to debug this. Its only doing it on live.
Sorry about this, I know we'll probably loose players over this one but please bear with me while I try to figure this out.
Archived topic from AOV, old topic ID:1431, old post ID:8970
.net Updates [done]
Posted: Sat Oct 13, 2007 12:33 am
by sliptongue69
I still don't know what lag you're talking about.
Archived topic from AOV, old topic ID:1431, old post ID:8971
.net Updates [done]
Posted: Sat Oct 13, 2007 12:36 am
by Red Squirrel
When you run, it spikes, its like playing over a VNC connection on dialup. The server is basically running as if there was a constant [global going on. Theres some kind of process within runuo thats hogging the cpu. It only does it on live which I dont understand. I'm testing now with a 2nd instance of runuo. Even when its sitting at an error, its using 50% of the cpu.
It seems the lag is not as bad now, but its still not right that runuo is using that much cpu. As soon as theres any activity going on, it will have to queue cpu instructions and thats where its going to lag really bad.
Archived topic from AOV, old topic ID:1431, old post ID:8972
.net Updates [done]
Posted: Sat Oct 13, 2007 10:57 am
by Dumples
Some other things I can think of would be recent additions like peerless stuff and all the timers for the keys and how the locations check for appropriate keys? Maybe custom AI stuff being faster and doing more checks for range and whether to heal or attack and whatever on the live server cause some extra load?
I've never used RunUO on a multi-core or multi-processor computer to know if that causes any issues, but is there anything like an updated zlib.dll file that would help or anything?
Archived topic from AOV, old topic ID:1431, old post ID:8975
.net Updates [done]
Posted: Sat Oct 13, 2007 11:25 am
by dprantl
1) I think it's strange that this started happening at exactly the time you moved to the new server.
2) Remember the time where there were problems with that integer that was different on AMD / Intel CPUs? Maybe the same issue here?
3) I was doing a couple champ spawns last night and didn't notice any lag at all. In fact, all the world saves were <2 seconds long.
Archived topic from AOV, old topic ID:1431, old post ID:8977
.net Updates [done]
Posted: Sat Oct 13, 2007 12:29 pm
by Red Squirrel
Yeah I'm afraid it may be an AMD/intel thing again, maybe one thread is going bezerk in a loop and needs a delay.
I ruled out items and mobs, so its not peerless keys, area timers (like harrower pull or tentacle area damage), its not network related either, as I even disabled the network completely as a test, no luck.
Today I'll put a pause in the main() function before each line to see at which part of the loading process it starts.
Archived topic from AOV, old topic ID:1431, old post ID:8978
.net Updates [done]
Posted: Sat Oct 13, 2007 2:48 pm
by Red Squirrel
FOUND IT!
Right in main.cs (in core) the main() function has a loop which does all the work and "ticks" for the various processes. Well I found this:
Code: Select all
Thread.Sleep( m_MultiProcessor ? 0 : 1 );
So yeah, its only a problem if you're running on a multi cpu machine, since it will infinitely loop with NO delay at all. This is a very bad programming practice. Whenever you have a loop like that, there should always be a very short delay otherwise the loop just hogs the cpu, not to mention calling up all those thread ticks too fast. Need to give it time to "breathe", if you know what I mean.
I'll be doing a reboot shortly to put in this new change.
So yeah, I fixed it. By changing a 0 with a 1.
Archived topic from AOV, old topic ID:1431, old post ID:8984