logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
40% Load on an Empty Server

 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Bonesly



Joined: 20 Jan 2009
Posts: 2

PostPosted: Tue Jan 20, 2009 3:28    Post subject: 40% Load on an Empty Server Reply with quote

I did a search of the forum here for "QueryPerformanceCounter" but got nothing, so apologies if it's here and I couldn't find it.

Assuming it's not here, could someone verify that this is still a valid patch of the nwserver.exe process under NWN1 v1.69?

Quote:
Papillion: My patch won't help you with Linux servers... simply because Linux isn't using the (one some chipsets) buggy QueryPerformanceCounter function in the first place. What the patch does is very simple: It makes the server think QueryPerformanceCounter isn't available (thus the MOV AL,0 commmand) and therefore it uses GetTickCount instead.

There are still some Windows folks where the patch does not help - they seem to have the same unkown problem the Linux folks have when their module idles at 50%.

...

Open the nwserver.exe file with a binary editor and search for the following hexadecimal byte sequence:
83 EC 08 53 56 57 8D 44 24 0C 50 8B F1 FF 15

Following this sequence, you will find the following three bytes:
83 F8 01

Change these three bytes to:
B0 00 90


I've been running on a Core2Duo with WinXP Pro SP3 since Jul-2007 and it's probably had the issue of running around 40-45% empty all along, but I didn't notice it 'til I had a broken GetFirst/GetNext loop that failed to trigger a TMI (load went to 100%). I fixed the loop and then noticed it was still running at 40-45%. Profiled the mod and saw nothing running as intended (no players logged in, just sitting empty on a test port). Took the exact same module to my old machine, a Pentium IV with WinXP Pro SP3, and it idles at 0%. No idea what's different other than the processor (yes I've got the affinity set to a single core) and the Core2 system uses Windows Firewall vs ZoneAlarm. Hoping the patch above is still valid, and if so, will give that a try, but I'd sure like to know QueryPerformanceCounter to fail that this patch would be needed.

Regards,
~Bonesly
Back to top
View user's profile Send private message Visit poster's website
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Tue Jan 20, 2009 8:02    Post subject: Reply with quote

Still looks valid to me. Give it a shot.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Bonesly



Joined: 20 Jan 2009
Posts: 2

PostPosted: Wed Jan 21, 2009 8:25    Post subject: Reply with quote

Turns out I have an Intel DX38BT motherboard that had an older BIOS, v1251 from 16-Oct-2007. Updated that to v1893 of 9-Oct-2008 (latest on Intel's site), but that had no effect. I was hoping that it would fix the issue noted on MSDN about QueryPerformanceCounter not always working on multi-core systems with a buggy BIOS or HAL.

I tried the patch above next, but it actually made things worse... CPU-1 was maxed out right at 50% instead of hovering around 40-45. Guess I'm one of those unlucky few that the patch doesn't help under WinXP with a dual-core system. Sad

Thanks for the response though!

Regards,
~Bonesly
Back to top
View user's profile Send private message Visit poster's website
Kosmous



Joined: 10 Jan 2005
Posts: 44

PostPosted: Sat Feb 28, 2009 5:58    Post subject: Reply with quote

Not sure if this is the same problem but I've noticed the same kind of behavior that's specific to the module. On the same module with 3k+ prefab areas (nothing inside except area triggers and wps and no HB scripts running) and without those areas. Without the areas, it runs at virtually 0%, with them, it goes to the 40-45% you're describing. I don't really know why this is happening since my areas shouldn't be taking up any processing power when idle but it seems to.
Back to top
View user's profile Send private message
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Thu Mar 26, 2009 15:41    Post subject: Reply with quote

Having the same sort of problem here, running the same module on two different machines, both Dual core intel based. First core (running the OS) is running at 0-1%, second core (running NWN) is running at slightly above 80% with the module sitting idle and no one on.

Tested using some older versions of the mod going back several years with the same result.

Both are running NWNX2 on Windows 2003, NWN v1.69, MySQL DB

The newer one is running a 45nm Core2 Duo processor.

Tried the patch above, and like Bonesly, CPU1 pegged at 100% and stayed there.

Loaded a very small Module that made no use of NWNX or the DB, and CPU1 stayed at 0-1%

Profiler doesn't seem to show anything outrageous.

I'm testing now on my test server, ripping stuff out of the module until I find out what makes it go away.

Has anyone else found a solution for this?
Back to top
View user's profile Send private message
Kosmous



Joined: 10 Jan 2005
Posts: 44

PostPosted: Fri Mar 27, 2009 8:59    Post subject: Reply with quote

Perhaps this is a problem caused by a problem handling over a certain number of module resources (not just areas). Maybe if you try to limit the number of areas as well as blueprints and preplaced objects, the CPU problem will go away.
Back to top
View user's profile Send private message
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Wed May 19, 2010 15:38    Post subject: Reply with quote

Eventually resolved this with a new motherboard.

It seems the first two I tried, something wasn't happy with.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion All times are GMT + 2 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group