View Single Post
Old 10-13-2007, 09:50 PM   #2 (permalink)
Courageous
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

Quote:
Originally Posted by osi_layer8 View Post
For those who are not updating with the SVNs, here is an article to fix the cpu usage issue that occures on multi core/cpu machines:

Age of Valor :: View topic - Fixing CPU hog issue in RunUO2 RC1 with dual cpu/core

Even if you are on single cpu I would recommend doing this change to avoid future headaches. Not fixed, this causes your server to support little to no players as it eats up the whole cpu (its equivalent to 100% cpu usage on single core)

The fix is very easy to do, in theory, your changing a 0 with a 1. That's it.
Found that "bug" a long time ago. Agree it's an easy and harmless fix. On my system, I believe I set the sleep interval to some fractional less than millisecond thing and it still drops CPU utilization to nil.

Like this:

Code:
                TimeSpan multiCoreSleep = new TimeSpan( 10000 );
                TimeSpan singleCoreSleep = new TimeSpan( 1000000 );

                while ( !m_Closing ) {
                    Thread.Sleep( m_MultiProcessor ? multiCoreSleep : singleCoreSleep );
Joe.
Courageous is offline   Reply With Quote