Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 02-11-2007, 02:19 AM   #1
Samson
Member
 
Join Date: Apr 2002
Location: United Socialist States of America
Home MUD: SmaugMuds.org
Home MUD: Arthmoor MUD Hosting
Posts: 249
Samson is on a distinguished road
I'm not sure exactly how to figure this out, who to ask, or where to begin looking for this kind of problem. But here goes.

I recently upgraded both of my servers to dual core AMD64 CPUs. Obviously I am thrilled with the new speed and such. But it seems to have had an interesting side affect I wasn't counting on.

In the game_loop handlers that deal with idling descriptors, my code is just like any other Merc derivative. It adds one to the idle counter with each pulse as it runs the game loop. Immortals are all set to idle off the mud after 2 hours. Lately though, this has been drastically cut to somewhere in the neighborhood of 15 minutes.

The deeper implications of this should be clear. This would suggest that all of the handlers that game_loop stalls time for are firing off at greatly increased intervals. Zeno was able to verify this easily enough on his game which is also affected by this ( same server etc ). It appears as though everything has been accelerated to about 8x normal speed.

Is this something that is known and can be corrected? Or have I stumbled into one of those uncharted areas us bleeding edgers often end up in?

EDIT: After a make clean and reboot, the skew is down to twice normal speed.
Samson is offline   Reply With Quote
Old 02-12-2007, 01:49 PM   #2
shadowfyr
Senior Member
 
Join Date: Oct 2002
Posts: 310
shadowfyr will become famous soon enough
Sounds to me like, instead of using the system clock to determine when X time has passed, the coders of your driver got lazy and used execution loops. You would get the same screwball effect on games made for 386 processors, when run on pentiums, because the games didn't time their events by any accurate clock, they just added loops into the code, then adjusted those until they where the right "time".

How to fix it? Find the code that is being used to produce the heartbeat event and increase the loop delay (but be warned that you lose all benefit gained by the faster system doing this, since you can't make "shorter" event cycles that way), or... recode the damn thing to use the system clock to figure out when to generate a heartbeat, so its based on something rational, not the fiddly BS they appear to be using.

Mind you, its only a guess that this is the problem, having never looked at the code for the driver, but it seems very probable.
shadowfyr is offline   Reply With Quote
Old 02-17-2007, 09:58 AM   #3
Kylotan
Member
 
Join Date: Jun 2003
Location: Nottingham, UK
Home MUD: Abattoir (Smaug)
Home MUD: ex-Jellybean (Smaug)
Home MUD: ex-Dark Chambers (Merc)
Posts: 174
Kylotan is on a distinguished road
Send a message via ICQ to Kylotan Send a message via AIM to Kylotan Send a message via MSN to Kylotan Send a message via Yahoo to Kylotan
The application could be receiving signals that is cutting select() short. Or perhaps more likely, the calculation of the stall time is messed up on 64 bit processors, possibly down to sizeof(long) being twice as big as it typically was on the typical target machine for the average Diku.
Kylotan is offline   Reply With Quote
Old 02-17-2007, 11:11 PM   #4
Samson
Member
 
Join Date: Apr 2002
Location: United Socialist States of America
Home MUD: SmaugMuds.org
Home MUD: Arthmoor MUD Hosting
Posts: 249
Samson is on a distinguished road
Actually it turns out it's probably something hardware/OS related. There was lengthy discussion of the topic of select() here:

And I posted for some help with the issue of x86_64 Fedora here: which led me to some kernel tweakage to try and fix it. Not sure yet if it was effective.
Samson is offline   Reply With Quote
Reply


Thread Tools


game_loop(), select(), and dual core CPUs - Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing a vision statement/core values. Burr MUD Administration 1 08-20-2004 02:36 PM
poll() vs select() halkeye MUD Coding 1 02-05-2003 08:35 PM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 12:53 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022