Bug or Brilliant Optimisation?
Soul_Rider
Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
It's got to be a bug.. surely...
Ok, so I run my GorgeCraft server on my machine, and watch the Mem usage creep up to 380mb. (Less than half of vanilla NS2). After a period of letting the server load up properly and settle down, the mem usage of the server drops down to 21mb. I thought this may be an idle mode to save server resources, so I joined the server expecting memory usage to rocket, except it didn't. Waiting in the ready room, and my mem usage of the server only went up to 30mb. I joined and started building stuff, and the memory usage slowly crept up. Despite building 5 hives, a few harvesters and cysts, and the obvious infestation that creates, my server mem usage went up to a massive 45mb.
Is this a bug in reporting on the servers, or have the optimisations I have made really caused this difference? The game runs fine, everything works, but the mem usage of the server is non-existent. If this is correct, then great, you can run a gorgecraft server on a very old box, but I have a feeling there is more to this than meets the eye...
To test I started a default NS2 server instance. Initial mem usage is 780mb. After waiting an hour the mem usage is 780mb :P No server resource saving here...
What is going on?
Played some more and added a screenshot to show usages and me actually in-game at the time...
<img src="http://img.photobucket.com/albums/v260/Soulrefuge/gcserverissue.png" border="0" class="linked-image" />
Additionally, despite having no players, on the NS2 server, and despite the GorgeCraft server being up for over 30 mins longer than the NS2 server, GC has used less CPU time than vanilla NS2.
A similar thing happened to my Proving Grounds mod on our server. We run a Combat mod server and a Proving Grounds server from the same box. This is from a few builds ago....
<img src="http://img.photobucket.com/albums/v260/Soulrefuge/servermemusage.jpg" border="0" class="linked-image" />
So what is this? Have I made stunning optimisations? Why does the mem usage drop about 15mins after loading? Is this a mis-reporting bug? Why does it happen to a varying degree in all my optimised mods?
If this mem usage is correct, then I am delighted, but I just can't help getting the feeling there is something else at work here.....
Ok, so I run my GorgeCraft server on my machine, and watch the Mem usage creep up to 380mb. (Less than half of vanilla NS2). After a period of letting the server load up properly and settle down, the mem usage of the server drops down to 21mb. I thought this may be an idle mode to save server resources, so I joined the server expecting memory usage to rocket, except it didn't. Waiting in the ready room, and my mem usage of the server only went up to 30mb. I joined and started building stuff, and the memory usage slowly crept up. Despite building 5 hives, a few harvesters and cysts, and the obvious infestation that creates, my server mem usage went up to a massive 45mb.
Is this a bug in reporting on the servers, or have the optimisations I have made really caused this difference? The game runs fine, everything works, but the mem usage of the server is non-existent. If this is correct, then great, you can run a gorgecraft server on a very old box, but I have a feeling there is more to this than meets the eye...
To test I started a default NS2 server instance. Initial mem usage is 780mb. After waiting an hour the mem usage is 780mb :P No server resource saving here...
What is going on?
Played some more and added a screenshot to show usages and me actually in-game at the time...
<img src="http://img.photobucket.com/albums/v260/Soulrefuge/gcserverissue.png" border="0" class="linked-image" />
Additionally, despite having no players, on the NS2 server, and despite the GorgeCraft server being up for over 30 mins longer than the NS2 server, GC has used less CPU time than vanilla NS2.
A similar thing happened to my Proving Grounds mod on our server. We run a Combat mod server and a Proving Grounds server from the same box. This is from a few builds ago....
<img src="http://img.photobucket.com/albums/v260/Soulrefuge/servermemusage.jpg" border="0" class="linked-image" />
So what is this? Have I made stunning optimisations? Why does the mem usage drop about 15mins after loading? Is this a mis-reporting bug? Why does it happen to a varying degree in all my optimised mods?
If this mem usage is correct, then I am delighted, but I just can't help getting the feeling there is something else at work here.....
Comments
The memory usage for scripts can fluctuate due to garbage collection (the garbage collector will wait until a certain amount of memory is used up and then it will free any unused memory). I'm not sure if that's the reason you see the drop over time, but it could be related.
I do use a tiny subset of models for all of my mods. Proving Grounds is essentially a Fighting only mod with no buildings and GorgeCraft only loads the 15 models that can be built by the Gorge.
It's good to know the core engine runs so well and efficiently :)
To update the hitbox. It's not necessarily needed if you have very basic hitboxes, but since the game uses extremely detailed ones the animation state needs to be correct (e.g. to be able to hit the leg of a skulk).