Server Help

General Questions - "Patch" for subbill CPU usage problem

numpf - Tue Feb 17, 2004 5:46 pm
Post subject: "Patch" for subbill CPU usage problem
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
Cyan~Fire - Tue Feb 17, 2004 7:30 pm
Post subject:
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
Mr Ekted - Tue Feb 17, 2004 7:45 pm
Post subject:
I think Sleep(1) is prefereble to low-priority...given that subbill is a complete design abortion.
numpf - Tue Feb 17, 2004 8:19 pm
Post subject:
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
Cyan~Fire - Tue Feb 17, 2004 9:30 pm
Post subject:
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.
CypherJF - Thu Feb 19, 2004 12:57 am
Post subject:
So, has the jury come up with a verdict::

Yes it does help/more efficient, or no ?
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group