We might have a memory leak, but I don't think so. We can be up for weeks and I don't see the amount of memory used by the server get signficantly higher than after a reboot.
Most games have some problems with memory over time. Even big MMOs will reboot their servers on a periodic basis. Although SK does crash occasionally, we are pretty stable. It's not unknown for the game to be up for weeks at a time. That's the biggest reason why the game starts to lag on a tick.
To explain briefly, when you update an area, the game has to get all of the items and NPCs from the area from main memory and feed it into the processor's smaller cache memory. When the game first starts up, all the NPCs and objects for an area will tend to be close together in memory, so most of them will be in the same memory page and the cache will only need to be changed a few times during the update. After the game has been up for a long time, most NPCs and objects that exist in the area are in completely different memory segments, so this generates many more page flips. If you are really unlucky, potentially once for every object and NPC being updated. This takes way more time to process.
The only easy solution is just to reboot more often.
|