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 
 
CPU usage

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support
View previous topic :: View next topic  
Author Message
Aradan Kir



Joined: 23 Aug 2011
Posts: 8

PostPosted: Fri Mar 04, 2016 17:28    Post subject: CPU usage Reply with quote

Have a question about CPU usage on a Windows PC running NWN server through NWNX. The CPU idles around 20% ish when NWN server is first loaded, but when players log in it jumps up to & remains at around 80%. It stays at around 80% even when the players log out & stays there until the module is restarted.

Now it doesn't make the game laggy & the only known issue that I've noticed is causing the DMFI Sound Wand to sometimes have a large delay before a sound is played (sometimes it's never played at all).

I've checked the profiler & all the scripts that either have a high execution time or numerous calls are all in the module's script cache list. I've also tested the module running on a separate PC (albeit a much better spec machine) with 2 players logging in, and CPU didn't exceed 20% (and the DMFI Sound Wand plays instantly).

The server PC has 2gb ram & 2Ghz Athlon processor.

Any suggestions?
_________________
http://www.silver-spire.com
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sat Mar 05, 2016 6:53    Post subject: Reply with quote

which window version? dedicated server or normal player installation?

try various Client CPU Affinity setting in nwnplayer.ini
Quote:
Client CPU Affinity=0
Specifies the CPU the game client will use on a multi-core computer. Cores are numbered from 0 to the number of cores minus 1. As of patch 1.69, a value of '-1' is treated as '0' and a value of '-2' indicates that the game should use the default affinity (if any) provided by the operating system. (Added in patch 1.67.)

Try compatibility mode XP SP2/SP3 if you aren't running on XP.

Try disable NWNX completely if you are using NWNX to verify its not caused by NWNX.

Also remove the script cache, since 1.69 its contraproductive - that probably won't solve your issue but might help a little.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Mon Mar 07, 2016 12:01    Post subject: Reply with quote

When players login, it creates 'ripples' in your module that increase the cpu usage.
Eg: If you have a loop that loops through players - then the footprint this leaves will be increased per player.

Also, if the players start exploring, the areas they are entering will then trigger their onEnter scripts, and their heartbeats will be given higher priority.
If NPC's are left spawned in those areas, the priority of the areas will remain higher than the other areas which have none.


Theoretically though, unless you are hitting 100% cpu usage, then your 80% usage shouldn't be affecting the sound wand.
Slow or sluggish behaviour due to cpu load would be represented by your cpu maxing out at 100% and then you experience lag.

If you are hitting 80%, that means you still have 20% of your cpu spare.
I've also noticed DMFI things are in some cases not instant - Eg: Buff Wand.


One thing you might want to do is use task manager to see if your server has 1 or 2 cores assigned to it.
I would then manually set it to 1.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support 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