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 
 
RAMDisk

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



Joined: 29 Nov 2006
Posts: 36

PostPosted: Mon Dec 18, 2006 16:25    Post subject: RAMDisk Reply with quote

I've been tinkering around with RAMDisks and solid state disks lately, and I was wondering - how much benefit would a RAMDisk (software or hardware) have on nwserver?

I mean yah, you can boot windows at the speed of light (well, okay about 4 seconds) from RAM, but would it really effect NWN's ability to run? Besides loading the module, server vault, and databases, is there much that makes it worth it to run nwserver on a solid state disk, of any sort?

Just curious
Back to top
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Mon Dec 18, 2006 23:24    Post subject: Reply with quote

RAM/Solid-state drives only give you a benefit if the 'data' you're trying to read is also often part of an I/O operation.
Yes, you get the one-off boost - like starting Windows, but then you just have dead RAM as most of the files are never accessed again. (and you have two copies - Main RAM, and drive RAM.)

Think of a RAM drive as poor-mans cache. A solid-state drive only the otherhand is curtaintly not a poor-mans toy Razz
(You'd need an 8Gb usb-key, give them 12 months Very Happy )

The nwserver wouldn't gain much from being on a RAM disk, however the database would...(if you could keep it small enough). Even the Bio/Obi campain database(s) would give decent performance.

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



Joined: 04 Nov 2005
Posts: 70

PostPosted: Mon Dec 18, 2006 23:46    Post subject: Reply with quote

If the database is small you might not get any benefit from running it in a RAM drive. DB engines typically cache data in ram and if the DB size is smaller than the data cache in the DB engine it's already in ram if it's been accessed once.

MySQL can be configured to have pretty much any size data cache you have ram to support.

Another possibility is useing MySQL's MEMORY engine, which exists solely in ram instead of a HD file. It's highly volatile though, a power failure or server crash and it's gone...

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



Joined: 23 Aug 2006
Posts: 37

PostPosted: Tue Dec 19, 2006 1:02    Post subject: Reply with quote

There is some debate as to whether nwserver is a disk IO bound application. From my personal experience, I suspect that it is. In which case, loading the several gigs of NWN data files into a RAMdisk should speed up the server tremendously. I have not tried this, but it would definitely answer the aforementioned question once and for all.
Back to top
View user's profile Send private message
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Tue Dec 19, 2006 1:46    Post subject: Reply with quote

Do you mean an actual RAM disk, or a flash drive?
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Tue Dec 19, 2006 20:01    Post subject: Reply with quote

I was thinking an actual PCI mounted RAMDisk (http://www.newegg.com/Product/Product.asp?Item=N82E16815168001), or a virtual RAMDisk, hosted by software of some sort. Either way it's backed up fairly well, so it would actually be a viable solution, assuming it was actually worthwhile. I assumed it wasn't (this sort of thing usualy works better for databases, and files that are accessed frequently) but it was worth asking. *shrug*
Back to top
View user's profile Send private message
chris421



Joined: 07 Apr 2005
Posts: 53

PostPosted: Thu Dec 28, 2006 3:20    Post subject: Reply with quote

NWN1, absolutely. I used to load my module and all HAKs into a RAMDisk before kicking off the server from there. Just make sure your Servervault is directed to physical disk.

But a RAMDisk for NWN2? No way. These modules are too freakin huge.

I'm implementing some tricks for storing and recalling common objects as BLOBs in MySQL, and pre-caching all 763 2DA files in table-type MEMORY as well.

Otherwise, better off buying a good RAID controller and some fast drives with as much cache on both as you can afford.
Back to top
View user's profile Send private message
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Thu Dec 28, 2006 5:15    Post subject: Reply with quote

Quote:
I'm implementing some tricks for storing and recalling common objects as BLOBs in MySQL, and pre-caching all 763 2DA files in table-type MEMORY as well.

I'd actually recommend running extensive performance tests against that. The reason is that the NWN2 engine itself caches 2da files; this is in addition to OS-level disk caching. You would essentially be adding a third level of cache, which may well run slower if it's implemented in NWscript.
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
chris421



Joined: 07 Apr 2005
Posts: 53

PostPosted: Thu Dec 28, 2006 18:33    Post subject: Reply with quote

For the 2DAs, I have. For the BLOBs, I speak from my testing under NWN1+NWNX2 only. Was planning on posting something a little more detailed tonight.

I got 5-8 sec for 100 random Get2DAString calls vs. 0.6 sec for the same result pulled from MySQL. Very happy with these results. Wink

All 763 2DAs were scrubbed and imported (filenames are now the table names). And the engine type for each table is MEMORY. Had to tweak the My.ini to allow for greater than 16mb temp tables.

More later.
Back to top
View user's profile Send private message
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Thu Dec 28, 2006 18:43    Post subject: Reply with quote

Quote:
I got 5-8 sec for 100 random Get2DAString calls vs. 0.6 sec for the same result pulled from MySQL. Very happy with these results.

Very nice -- might want to also look at the hashset plugin; I even faster results might be possible with it.
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
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