Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (-1) | Shanky.com
"Patch" for subbill CPU usage problem

 
Post new topic   Reply to topic Printable version
 View previous topic  Player Database is Offline (LAN Server) Post :: Post Setting a virtual host  View next topic  
Author Message
numpf
Newbie


Joined: Feb 17 2004
Posts: 24
Offline

PostPosted: Tue Feb 17, 2004 5:46 pm    Post subject: "Patch" for subbill CPU usage problem Reply to topic Reply with quote

When you run subbill you can see that it updates a ticker every iteration. This is expensive and likely what causes your CPU usage to max out at 100%, divided between subbill.exe and CSRSS.EXE (MGB you can eat a dick for the all-caps warning I just got from this stupid board when i typed that).

The solution I've seen listed on this board is to manually lower the subbill.exe process priority. I remember having problems with this, aside from the inconvenience of manually setting the priority. I loaded subbill into IDA and discovered that the lone sleep call was given a param of 0. From what I understand from ek about thread scheduling, this would normally be fine except the interation is a hog with the console update. So I changed the parameter to sleep to 1. CPU usage gone.

I make no claims as to whether this is a good idea... I used this hack long ago, and I _think_ I remember it working well for me, but I could be wrong. If someone cares enough they can do a thorough disassembly to see if this hack harms anything. If it provably does _not_ harm anything, someone might consider using this modified subbill in the standard server.zip download on this site.

You'll need a hex editor for this. The byte is at 0B53h in subbill.exe:
Code: Show/Hide

00000b50h: 00 00 6A 00 FF 15 CC 01 42 00 8B 74 24 10 83
                    ^^ change to 01, like so:

00000b50h: 00 00 6A 01 FF 15 CC 01 42 00 8B 74 24 10 83


-numpf
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Feb 17, 2004 7:30 pm    Post subject: Reply to topic Reply with quote

numpf wrote:
(MGB you can eat a dick for the all-caps warning I just got from this stupid board when i typed that)
Right.

In Subbill.ini:
Misc:LowPriority=1
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Tue Feb 17, 2004 7:45 pm    Post subject: Reply to topic Reply with quote

I think Sleep(1) is prefereble to low-priority...given that subbill is a complete design abortion.
Back to top
View users profile Send private message Add User to Ignore List
numpf
Newbie


Joined: Feb 17 2004
Posts: 24
Offline

PostPosted: Tue Feb 17, 2004 8:19 pm    Post subject: Reply to topic Reply with quote

Cyan~Fire wrote:

Misc:LowPriority=1
I addressed this option in my post. Read?

To test, I just ran subbill with that. 100% CPU usage. While it doesn't seem to affect other apps when running like this, there's the possibility/likelyhood that it will be starved for CPU time. As I say, it's at least worth testing.

-numpf
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Feb 17, 2004 9:30 pm    Post subject: Reply to topic Reply with quote

Yeah, it's possible it could run out of CPU time, but then I'd say use SSB2 icon_razz.gif

And in your post, you talked about manually lowering the priority (I'm assuming you mean changing through task manager, since you say it was inconvenient). In my post, I talked about changing an INI setting, which isn't all that inconvenient.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Thu Feb 19, 2004 12:57 am    Post subject: Reply to topic Reply with quote

So, has the jury come up with a verdict::

Yes it does help/more efficient, or no ?
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> General Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can 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
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 96 page(s) served in previous 5 minutes.

phpBB Created this page in 0.221444 seconds : 30 queries executed (84.3%): GZIP compression disabled