Crazy idea about precaching
ghaban
Join Date: 2004-02-16 Member: 26595Members
Hi, im one of those guys with extremely long precaching load times.(this differs from server to server but up to 10 min, probably due to my slow hdd ). Im running 32bit win7 with 4 gb ram, and have noticed that running ns2 maxes out to about 1.3 gb memory.
So i dont really need to go through all specs to tell you its not a great gaming machine, but i have 'decent' performance in-game, its just the precaching that takes for ever.
What i was thinking is that i have at least 1 gb spare mem, which i was thinking to allocate for a ram disk where im going to put the files which are precached, so im mostly just wondering about what files are actually loaded in this step? Does anyone know? Is it possible to get a list of that or find out through the console by some command?
EDIT: Just to clarify - I'm just interested in the precaching phase, the other stages might be slow, but it's not unbearable. In other words the map and a lot of other things should already be loaded before the precaching phase.
G
So i dont really need to go through all specs to tell you its not a great gaming machine, but i have 'decent' performance in-game, its just the precaching that takes for ever.
What i was thinking is that i have at least 1 gb spare mem, which i was thinking to allocate for a ram disk where im going to put the files which are precached, so im mostly just wondering about what files are actually loaded in this step? Does anyone know? Is it possible to get a list of that or find out through the console by some command?
EDIT: Just to clarify - I'm just interested in the precaching phase, the other stages might be slow, but it's not unbearable. In other words the map and a lot of other things should already be loaded before the precaching phase.
G
Comments
I will post my findings here later on.
(Also maybe it wasnt the best place to put the thread? so any mod can feel free to move it if there is a better place to put it)
G
I had 4gb ram (same as you) so i decided to put some NS2 files on RAM disk.
To find out what files/folders had the most performance impact i used Mark Russinovich Process Monitor.
Filter by NS2.exe process name, join a game and then examine 'File System Activity' tree.
I moved some NS2 files on 2 GB ram disk and it helped alot to decrease loading times.
But at the end i decided to upgrade my notebook to 16 gb ram and just copied all NS2 and cache folders to 9gb ram disk. And now i dont remember what files/folders i moved on my 2gb ram disk.
The only thing i can suggest you to start with is to is to move ...\AppData\Roaming\Natural Selection 2\cache folder to ram disk.
To 'move' files i used junction.exe util, again from Mark Russinovich.
Precaching from hdd > 240 seconds
Precaching from ram disk ~ 10 seconds and even faster then from some ssds.
So ram disk is a good idea, especially if you can't upgrade your hdd to ssd.
If you disable it entirely for yourself and start your own server, you will see how long it takes purely based on your HD speed to access files, instead of how long it takes to check hash files.
For me its the difference between 30-50 seconds and 10 seconds... and i'm already on an SSD.
Also.. why 32 bit? 0.o... there's pretty much no reason anymore to hold onto 32 bit OS, even if you work on embedded applications/software development.(worst case scenario dual boot it)
And NS2 loves 64 bit..
The precaching times are very different, but surely the precaching is what takes the longest time for me, im not kidding when i say i clocked it on 8 min when connecting to servers with certain mods. Usually it takes the longest on servers with player badges and nsl mod on it, servers without mods seems to be 'fine'.
EDIT
*fine meaning i can live with it
Also: just measuring loadtimes i can see that the female rine model takes me 28 seconds to load in the precaching phase
The reason is that there are so many small files loaded that my flash drive is faster(2x speedup maybe havent checked exactly and havent put everything on the flashdrive yet, just folders i thought were important),
(latency should be higher but finding a file should be faster on the flash drive).
Conclusion: Bundle the files a lot more should improve the precaching a lot for us with slow hdds ?? Most of it are loaded everytime anyway.
Edit: Now the 'initializing game' phase i longer than the precaching phase, but i still havent tested with the mods on the flash drive.
Could you help me (or point me to a tutorial) how I can optimize the ConsistencyConfig.json for my server?
A little tweak, so that people can join faster.
So I installed Link Shell Extension and it works like a charm. I created a symbolic link of the whole "Natural Selection 2" folder in %APPDATA%/Roaming.
Gonna test it later if that gives me any speedup.
Have you tried to rename the original folder before trying to make a link to it with junction/mklink ?
Let's say you have your NS2 folder on \Natural Selection 2 and want to 'move' it to RAM/Flash drive E. So the new destination will be E:\Natural Selection 2
So you'll need to copy NS2 folder from D to E and rename/delete old NS2 folder on D drive.
Had to search for this one
@Ghosthree3 did an awesome job of already singling out the best consistency checking for server owners here
Scroll up or look around on that page for more options as well.
Well I got symlinks of Roaming and the models on my RamDisk R:\ now. I still need to delete the original?
That's hard to really do as you need to know how mods basically work.
I'll just give you the ConsistencyConfig.json i use atm.
https://gist.github.com/BrightPaul/26ca9bab503ef821f8af
Basically i only check files i'm aware of which were used in the past or could basically be used for cheats etc.
But be aware that this check allows ppl to use alot client mods like custom marine/weapon models. So if you don't want to allow these, you have to set all models back onto the check list.