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 
 
nwserver CPU usage when using NWNX

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



Joined: 23 Mar 2005
Posts: 2

PostPosted: Wed Mar 23, 2005 3:58    Post subject: nwserver CPU usage when using NWNX Reply with quote

I've been developing my PW module using NWNX for database access. I'm running the module on Linux (Fedora Core 2), with MySQL as the database. I've been disturbed for some time by the fact that I'm seeing the nwserver process taking 40% of the CPU with no one on the server.

I'm really getting worried now, as I started temporarily hosting a module for someone else while they look for a permanent server. That module does not use NWNX, and only utilizes 3% of the CPU with no players, and 40% to 50% with 30 players.

I got ahold of another module that uses NWNX, test loaded it on my server, and it too used about 40% of the CPU with no players. So it seems that it's the NWNX component that's causing the CPU load.

I'm wondering if any of you have noticed similar behavior, or have any advice for me. I'm starting to worry that I will not be able to actually host my module if I ever do finish it...so I may need to rethink the NWNX/database use...or perhaps it's better optimized on Windows and I should switch to running on Windows instead of Linux.

Just another little bit of information....I did load my module on an NWNX setup on Windows in order to test it with the Profiler module. I didn't see anything in the Profiler output that looked out of place, or that would cause the CPU usage.
Back to top
View user's profile Send private message Send e-mail
redils



Joined: 13 Jan 2005
Posts: 27

PostPosted: Wed Mar 23, 2005 11:58    Post subject: Reply with quote

I think the problem come from the number of placeables, not from nwnx. Nwnx doesn't use any ressources when there's no player (perhaps a little bit if you've a big script on the OnHeartBeat of your module. But try to test ur mod when removing a certain number of placeables.
Back to top
View user's profile Send private message
Frostbite



Joined: 23 Mar 2005
Posts: 2

PostPosted: Wed Mar 23, 2005 15:39    Post subject: Reply with quote

Believe me, the non-NWNX module that I'm temporarily hosting is much larger (by about 20 meg) than mine, and has many more placeables. I've been very careful in the design of my module as far as placeable count, and positioning, as I know they can cause problems with pathfinding....and that's the only way I can think of that placeable could cause CPU load like that when no players are on a server...from the NPCs trying to walk around the placeables. But, I have very few active NPCs in my module at this point. If you know something else about how placeables could cause this, please let me know.

My module has a very small heartbeat script, and it shouldn't even be calling the majority of the code in it since there are no players on the server; it's all incapsulated in a check for if it's got a valid PC. And again, I know that the non-NWNX module that I'm hosting has a lot more going on in it's heartbeat.

I've really about all I can think of to isolate the problem down to having NWNX running, and not. I suppose I could replace the use of NWNX with using the BioDB and compare how those two modules run (exact same module, one using NWNX and one using BioDB). If no one else here has any ideas, I guess I'll give that a try, but I was counting on NWNX for the LetoScript module to do my subraces.
Back to top
View user's profile Send private message Send e-mail
NoMercy



Joined: 03 Jan 2005
Posts: 123
Location: UK

PostPosted: Wed Mar 23, 2005 19:36    Post subject: Reply with quote

Personally, I think the CPU time taken up by NWN has more to do with how many processors you sacrifice to the machine god than anything else, but mabie I'm a cynic :)
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1059
Location: Germany

PostPosted: Wed Mar 23, 2005 23:26    Post subject: Reply with quote

If you do not use the *exact* same module, you can not compare CPU utilization. I know that nwserver acts quite strange sometimes, the number of placeables definitely is a factor, while the module size does not always correspond to CPU usage. In fact, bigger modules tend to run on less CPU utilization with no players on.

NWNX is not the culprit in this case.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Qlippoth



Joined: 10 Oct 2011
Posts: 8

PostPosted: Mon Oct 10, 2011 3:10    Post subject: Reply with quote

I'm probably adding to a long dead thread, but I'm seeing this same behavior in Windows. The server is fine with just NWN, but launch the server with NWNX and the CPU goes to 30%. I wonder if there is something with the memory mangement or SQL calls that is causing this strange behavior?

- Qlippoth
Back to top
View user's profile Send private message
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Mon Oct 10, 2011 13:25    Post subject: Reply with quote

Ensure that you are running only one database program.

I've seen this sort of thing where SQL2005 express was installed to get the libraries required for a Windows plugin, but NWNX was set to use MySQL, and SQL2005 was left running.
Back to top
View user's profile Send private message
Ravine



Joined: 26 Jul 2006
Posts: 105

PostPosted: Mon Oct 10, 2011 14:29    Post subject: Reply with quote

Hmm, on linux, i always had the so called "50% CPU bug" (and still has). Used to be, Papillon had a patch for that (according to the Omnibus).
And it's not nwnx, that's for sure.
Back to top
View user's profile Send private message
Lokey



Joined: 02 Jan 2005
Posts: 158

PostPosted: Thu Oct 13, 2011 3:26    Post subject: Reply with quote

Part of it's module design, there's many failure points. Need specifics.
_________________
Neversummer PW NWNx powered mayhem Wink
Back to top
View user's profile Send private message
pdwalker



Joined: 09 Aug 2005
Posts: 22

PostPosted: Thu Jul 25, 2013 18:09    Post subject: Reply with quote

Yeah, it's definitely module related.

I was seeing the same behaviour with module, but not with others.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux 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