Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Thu Nov 04, 2010 8:35 am   

[3.31] Why does CMUD turn into a CPU hog when speedwalking?
 
Something I just noticed and am curious about. Why does speedwalking such as .5n spike my CPU usage roughly 50%. I couldn't test in the untitled session, so I had to create a new session to some random mud. Once you do that set your delay between commands to 5 or 10 seconds and enter a speedwalk on the command line without being connected to the mud .5n for example. For me on this vista machine CMUD jumps from 0 to 44-51 percent usage with no other triggers in the new session or even connected to the MUD.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Nov 04, 2010 8:08 pm   
 
Doesn't do this for me here. Have no idea since I'd normally blame this on scripts or something. It doesn't even sound like you are using the mapper. Might try rebooting your computer or something simple like that. But in a new session for me here doing .5n doesn't take any CPU time at all.
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Thu Nov 04, 2010 9:05 pm   
 
No scripts running and mapper is not in use. This is a fresh clean package on some random mud which I'm not even connected to just using in offline mode (this happens when connected too of course). I had rebooted when I tested before making the post, and I just rebooted again to double check and it still does the same thing. You can see in the screen shot where CPU usage jumps from next to nothing to 50% give or take a couple from when the speed walk is first entered.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Nov 05, 2010 5:00 pm   
 
All I can suggest is deleting your CMUD files and reinstalling. You have changed your session defaults somewhere because your session window is showing the timestamp column on the left, which is not enabled by default. That doesn't cause any CPU spike itself, but it tells me that you are not running a clean installation, which makes it hard to compare here.

I just tried the above test on 3 different computers with clean installs using one of the preinstalled session icons, and none of them showed any CPU spike like this, including our Vista system. So I don't really know what else to suggest. But it's possible one of the preinstalled packages, like English Directions or English Keypad have gotten corrupted or something. But it's definitely specific to just your computer.
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Fri Nov 05, 2010 6:58 pm   
 
Yeah I went to session > scrollback in the preferences window and clicked show timestamps, to show that the issue was happening while there was a delay between commands set. I'll try a fresh install and see if that fixes it... post back in a few.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Fri Nov 05, 2010 7:51 pm   
 
I had zmapper installed for evaluation so I trashed that on the chance that was a problem. Did a complete uninstall of CMUD and all settings related to it then reinstalled. Rebooted the PC, and opened one of the preinstalled sessions offline, went to the scripting tab in the Preferences menu and set the delay to 4000. I then typed .5e on the command line and took the screen shot after 4 of the 5 commands had been sent. The problem is still there any other suggestions?
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Fri Nov 05, 2010 10:22 pm   
 
Zugg wrote:
All I can suggest is deleting your CMUD files and reinstalling. You have changed your session defaults somewhere because your session window is showing the timestamp column on the left, which is not enabled by default. That doesn't cause any CPU spike itself, but it tells me that you are not running a clean installation, which makes it hard to compare here.

I just tried the above test on 3 different computers with clean installs using one of the preinstalled session icons, and none of them showed any CPU spike like this, including our Vista system. So I don't really know what else to suggest. But it's possible one of the preinstalled packages, like English Directions or English Keypad have gotten corrupted or something. But it's definitely specific to just your computer.


I stand by the fact that there is a problem in CMUD somewhere. To verify this I just got back from purchasing a new power supply for my old XP laptop. I get home and uninstall all old references to CMUD on the laptop, hook up my router and send the cmud installer from the desktop to the laptop, install 3.31 on the laptop, create a new session with total rubbish for connection info, connect to it offline, and set the delay between sending commands to 4 seconds. I open the task manager up and go over to the performance tab. Clicking back on CMUD I type .5e into the command line and hit enter. Guess what... instant 50% cpu usage. So yeah, it's not just specific to one computer. I can go visit my little sister later tonight and try to install 3.31 on her vista PC as well and I would almost be willing to bet a free license renewal against a full price copy of CMUD in 11 months that I get the same result.

The problem may be related to some process that is common on the two of my PC's that will be the next step I take in tracking this down. It is defiantly across vista and xp and is not specific to just one PC.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Nov 06, 2010 4:35 am   
 
I was able to recreate this. The key is the 4 second delay between commands. It's normally 5 milliseconds. When you stick with the default there is no spike. I suspect the spike comes from the monitoring for precise passage of 4 seconds.
_________________
Asati di tempari!
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Sat Nov 06, 2010 9:32 am   
 
Shocked Thanks for reading the first post and trying to reproduce Tech. I think the bug could possibly be in the delay too. When you do a fresh install of CMUD, then load any session for the first time, in Preferences>scripting>general scripting the delay between sending lines is set to 0. Entering just a few directions through a speedwalk has no impact on CPU usage with this setting. You need to set the delay between sending lines to something larger than 0. The delay doesn't have to be as large as 4000ms though, I can get the 50 percent CPU spike from CMUD with a delay of 500ms. If you put together a map and have a delay set, then speedwalk by clicking on a room on the map you should see the spike as well. As long as there is a delay set. This is actually an old bug that I am surprised no one has ever found. I saw the exact same thing happening in zMUD 7.21 earlier when testing out of curiosity.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Nov 08, 2010 5:53 pm   
 
Bah, sorry I missed this part:
Quote:
went to the scripting tab in the Preferences menu and set the delay to 4000.

I didn't read that part in the original post for some reason.

Yes, the send delay will cause the CPU spike because of how CMUD is handling the delay. In order to prevent *anything* from running or triggering during the send delay, CMUD sits in a loop during that time. It's not optimized like the #WAIT command and does not use threads. So this isn't really a bug, it's just how the send delay is implemented. And yes, it's been the same as in zMUD.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Nov 08, 2010 11:17 pm   
 
Interesting. When I looked into this a bit more, I found a way to prevent it from using 100% CPU during the Send Delay. But in the process, I also found a pretty serious bug that if you try to exit CMUD while in the middle of a speedwalk with the SendDelay enabled, CMUD will hang.

Both should be fixed in the next update.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net