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 
 
A question on system resources

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Technical support
View previous topic :: View next topic  
Author Message
Daeftan



Joined: 09 Feb 2007
Posts: 3

PostPosted: Fri Feb 09, 2007 20:37    Post subject: A question on system resources Reply with quote

There have been some great posts on read and write times, but I am interested in how the use of imbedded SQL commands use server resources when compared with the internal DB or logging.

In my particular application, I do not care how long it takes for data to be written to the DB/log/file since I do not intend to use it for any realtime purpose within the game. Nonetheless, the easiest option for me is to run NWNX4 and have it transmit data directly to a hosted mySQL server; however, if it comes at a large expensive of game server resources I am reluctant to do it. A more messy option is to have the game server log to its own DB or file and then periodically pass the file off server and parse it into the DB.

Does anyone have any helpful thoughts about this?
Back to top
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Sat Feb 10, 2007 0:37    Post subject: Re: A question on system resources Reply with quote

Daeftan wrote:
There have been some great posts on read and write times, but I am interested in how the use of imbedded SQL commands use server resources when compared with the internal DB or logging.

In my particular application, I do not care how long it takes for data to be written to the DB/log/file since I do not intend to use it for any realtime purpose within the game. Nonetheless, the easiest option for me is to run NWNX4 and have it transmit data directly to a hosted mySQL server; however, if it comes at a large expensive of game server resources I am reluctant to do it. A more messy option is to have the game server log to its own DB or file and then periodically pass the file off server and parse it into the DB.

Does anyone have any helpful thoughts about this?


You don't have to sarcrifice server resources to host MySQL. For the purposes of storing NWN1/2 data you can use the mytiny.ini configuration. you only give up 64Mb for the cache and about 24Mb for the engine [been a while since I read up on the internals]. But you can run it in less. You can get the footprint under 32Mb by tweaking the configuration, now out of a Gb that's nothing. You can do this as NWN1/2 would break if you retrieved enough data to fill even this small cache. (*even object data is retrieved 1 object at a time)

As to CPU - set the MySQL and the NWServer affinities to different CPU's.

And rounding out the trio - I/O. It makes no difference here I/O will be your bottle neck, but NWServer has very little I/O while it is running (lots on startup) - MySQL will take care of I/O only when it's needed.

Just because you have a database, doesn't mean you need the biggest database configuration. eg I run my SQLExpess for NWN in under 24Mb, the SQLServer engine needs about 16Mb of that. This won't change for NWN2 (when I get it working). There is about a Gb of data stored in the database.

Summary: If you tune your database to your applications needs (in this case NWServer/NWNX combo) the DB should have minimal impact on overall performance.

Cheers
Gryphyn
Back to top
View user's profile Send private message
Grumalg



Joined: 04 Nov 2005
Posts: 70

PostPosted: Sat Feb 10, 2007 15:41    Post subject: Reply with quote

Gryphon's advice is correct and excellent for having a very light ram footprint. This approach will be useful to those who want to run more than one instance of nw server on a single machine.

But if ram isn't an issue to you, you can get better performance with larger caches set up in MySQL. Especially when the DB engine runs for long periods.

If your data and index caches can hold the entire data and indexes for your DB it will typically already have data/index present in cache and thus run at ram speeds and access the HD rarely. Even when writing to the DB, it will write to the cache and return to you and do the actually HD write when it feels it has spare time (which will be most of the time at the light loads a PW represents to MySQL).

If the DB engine is rarely shut down and the computer rarely rebooted you will be essentially running the DB in a ramdisk after it's been running a while. Data/index space in the caches is reused by flushing things that haven't been used for the longest time when caches fill up. Thus, when the caches are big enough, nothing ever gets flushed from them. It does have to rebuild the contents of the caches from the HD over time as things are first referenced each time the DB engine is restarted though...

I suspect that many people useing NWN2/NWNX4 will be wanting 3gb or more ram just so they can get to the 2gb process limit in NWN2 and still have room for the OS. Since the OS doesn't chew a gb, that will leave a goodly amount of space for big caches if you want to use them.

--- Grumalg ---
Back to top
View user's profile Send private message
Daeftan



Joined: 09 Feb 2007
Posts: 3

PostPosted: Sat Feb 10, 2007 20:35    Post subject: Reply with quote

Thanks guys. Very useful comments.

Speaking of I/O - it is my impression that this is the major bottle neck in a semi-full to full server. I feel like I can appreciate this even in my home test network where I run one NWN2 server and then two game clients on different machines. After the server load, the processor demands of the server seem low, while the network traffic seems high.

Does any one have hard numbers on the data traffic of the server-to-client as the number of players/DMs scale up?
Back to top
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Sun Feb 11, 2007 0:23    Post subject: Reply with quote

Daeftan wrote:

Speaking of I/O - it is my impression that this is the major bottle neck in a semi-full to full server. I feel like I can appreciate this even in my home test network where I run one NWN2 server and then two game clients on different machines. After the server load, the processor demands of the server seem low, while the network traffic seems high.

Does any one have hard numbers on the data traffic of the server-to-client as the number of players/DMs scale up?


To get I/O problems with NWN1/2 you'd really need to go out of your way to get another application to take most of the I/O bandwidth (a file-copy or some such). Yes, it has some issues on startup, but that's to be expected when you process 2-3Gb of resources.

Cheers
Gryphyn
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> 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