.net Updates [done]

Stay up to date with shard happenings
Locked
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

.net Updates [done]

Post 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
Honk if you love Jesus, text if you want to meet Him!
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

.net Updates [done]

Post 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
Honk if you love Jesus, text if you want to meet Him!
sliptongue69
Posts: 829
Joined: Sat Aug 18, 2007 7:46 pm

.net Updates [done]

Post 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
Stupid fucking idiot in red shirted ass...
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

.net Updates [done]

Post 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
Honk if you love Jesus, text if you want to meet Him!
User avatar
Dumples
Posts: 484
Joined: Fri Jan 05, 2007 4:57 pm

.net Updates [done]

Post 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
Image
dprantl
Posts: 1048
Joined: Wed Feb 07, 2007 11:41 pm

.net Updates [done]

Post 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
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

.net Updates [done]

Post 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
Honk if you love Jesus, text if you want to meet Him!
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

.net Updates [done]

Post 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
Honk if you love Jesus, text if you want to meet Him!
Locked