View previous topic :: View next topic |
Author |
Message |
Ne0nx3r0
Joined: 29 Nov 2006 Posts: 36
|
Posted: Mon Dec 18, 2006 16:25 Post subject: RAMDisk |
|
|
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 |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Mon Dec 18, 2006 23:24 Post subject: |
|
|
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
(You'd need an 8Gb usb-key, give them 12 months )
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 |
|
|
Grumalg
Joined: 04 Nov 2005 Posts: 70
|
Posted: Mon Dec 18, 2006 23:46 Post subject: |
|
|
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 |
|
|
chaoslink
Joined: 23 Aug 2006 Posts: 37
|
Posted: Tue Dec 19, 2006 1:02 Post subject: |
|
|
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 |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Tue Dec 19, 2006 1:46 Post subject: |
|
|
Do you mean an actual RAM disk, or a flash drive? _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Ne0nx3r0
Joined: 29 Nov 2006 Posts: 36
|
Posted: Tue Dec 19, 2006 20:01 Post subject: |
|
|
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 |
|
|
chris421
Joined: 07 Apr 2005 Posts: 53
|
Posted: Thu Dec 28, 2006 3:20 Post subject: |
|
|
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 |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Thu Dec 28, 2006 5:15 Post subject: |
|
|
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 |
|
|
chris421
Joined: 07 Apr 2005 Posts: 53
|
Posted: Thu Dec 28, 2006 18:33 Post subject: |
|
|
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.
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 |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Thu Dec 28, 2006 18:43 Post subject: |
|
|
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 |
|
|
|