View Full Version : Memory leaks - Now way over the top
Znurre
11-02-2008, 09:16 PM
Algaros fight today... everything was fine until a big green army came.
My game totally froze, and when I had waited for 10 minutes and the game did not display one more frame and my harddisk activity was constant I tried to switch to vt1 and run free -m > free.log
After a kernel panic, I checked the content... it's devastating
Znurre:/home/Znurre # cat /root/free.log
total used free shared buffers cached
Mem: 1002 992 10 0 0 4
-/+ buffers/cache: 987 15
Swap: 1027 1027 0 I was running only KDE, Mumble and Regnum.
KDE usually takes around 300MB of RAM, and I guess Mumble takes at most 100MB, if even that.
This is very, very bad.
It means that Regnum was using around 1.5 - 1.7GB of RAM at this moment.
padreigh
11-03-2008, 07:31 PM
Maybe they should adjust theire PC-Requirements to:
2GB Ram (at least) 4GB for mostly unhindered Gameplay
.
.
.
or fix leaks :D
Znurre
11-03-2008, 07:39 PM
Strange thing is that I investigated a bit into this problem today, using bash and ps I captured the memory usage of the Regnum process each 10:th second and created a graph.
The result was very stable...
Memory usage around 600-800MB, depending on the situation.
I really cannot explain this sudden spike I had, but I will continue to capture my memory usage while playing to see if I can locate a source for the problems.
Froste
11-03-2008, 08:54 PM
Determining memory usage with ps or top is very tricky, as you know, you can't really make an accurate assumption about it. From a cold boot, the memory will start out low, and the kernel will then allocate memory to whatever needs it, the memory usage doesn't really go down that much even if you quit a process, the kernel only reallocates 'dead' memory when it's needed.
Mikan
11-04-2008, 09:30 AM
After small fights or wars my 2GB of RAM is always full, and I only run KDE and a few background applications like IRC. I go from 500MB used to around 2GB used + 500MB of swap used.
Regnum is full of memory leaks but they only seem to happen during fights. I think the biggest leaks exist in the polygon processing engine, and particle effects produce the most polygons.
Try running in safe mode for a day and I bet the memory usage will drop dramatically.
Regards,
Rockwolf_
11-04-2008, 01:48 PM
Determining memory usage with ps or top is very tricky, as you know, you can't really make an accurate assumption about it. From a cold boot, the memory will start out low, and the kernel will then allocate memory to whatever needs it, the memory usage doesn't really go down that much even if you quit a process, the kernel only reallocates 'dead' memory when it's needed.
True, but both Katiechan and Znurre have SWAP memory in use, and especially for Katiechan who has 2GB of RAM, 500MB is too much. It seems suspicious enough to me.
For me, the game uses almost 2GB of RAM after a while of playing, but this at high resolution with high details.
I am, however, using Arch Linux with no DE installed, so nothing else is really consuming memory.
I have no SWAP usage, so for me it would not really be possible to tell for sure that there is a problem, other than the fact that more memory is being used after a while of playing.
Mikan
11-04-2008, 02:28 PM
Determining memory usage with ps or top is very tricky, as you know, you can't really make an accurate assumption about it. From a cold boot, the memory will start out low, and the kernel will then allocate memory to whatever needs it, the memory usage doesn't really go down that much even if you quit a process, the kernel only reallocates 'dead' memory when it's needed.
I know what you're talking about, as this is one of my fields of study. However, it's important to note that when considering things like the ever-expanding disk cache, the kernel will not use swap. It only uses swap space when 1) Memory has been maxed out, and 2) The disk cache and other buffers have been reduced to a minimum size to make more room for applications.
In other words, when there is swap space in use, Regnum is the program that is consuming all of the memory, not the kernel, as it only allocates memory for those services when an application (such as Regnum) does not need them, which is disproved by the fact that swap is activated.
Regnum is a gigantic memory hog - no doubt about it. :)
Regards,
Znurre
11-04-2008, 02:34 PM
Try running in safe mode for a day and I bet the memory usage will drop dramatically.I have tried this - but it reduces playability, and that's something I am not ready to sacrifice either.
I think I've already tried everything to optimize the memory consumption of Regnum, and found a good balance between memory usage and graphics.
The reason I started this thread was to showcase this huge abnormality in the memory usage, which maybe got been introduced with the last patch.
It's not a constant problem, it was just a big "spike".
Everything was running smooth and suddenly everything froze.
Angelwinged_Devil
11-04-2008, 02:38 PM
memory leak, oh yeah, but it seems to have gotten worse with the last update, I've become an fps freak so I have alt+i open all the time, also try to notice what happens if you go into windowed mode and then switch to another application, check cpu% and fps :p, it didn't do this before the update.
Znurre
11-11-2008, 06:31 AM
I managed to reproduce this yesterday.
While attacking the gate at Trelle I had to minimize the window for about 10 minutes to check up some things in Firefox.
When I was done, I restored the window and found myself dead outside the gate with several Alsius players moving in and out from the fort.
Everything was rather smooth, I would say ~20 fps.
I presses ressurect button and suddenly I found myself standing at Trelle save, with 0 frames and I could not do anything.
This time I was faster than the last time, which enabled me to run both a free -m and a ps aux.
These are the results of free -m:
total used free shared buffers cached
Mem: 1002 993 9 0 0 6
-/+ buffers/cache: 987 15
Swap: 1027 1027 0
ps aux reported that Regnum was using 1.3GB memory.
At this moment I was running Firefox, KDE, Amarok, Kopete and Regnum.
Froste
11-11-2008, 09:35 AM
I think this sounds like some form of swap issue more than a ram problem -- I have 1G ram, but only a 211M swap (it's more of a token, really), and my computer never uses the swap at all, even when playing regnum, with one exception: a week or two back the regnum client stopped responding and did a DoS attack on my computer, I managed to jump out into console after much persistence and waiting, and noticed that the swapping had gone haywire, once I killed the regnum process the DoS stopped and my system was freed up.
But if we went by your logic, then I should be noticing this behaviour far more often since I have way less swap than you, however clearly I don't so the conclusion must be that there's some portion of regnum in your ram goes crazy if it gets put in the swap, and systems with more swap space would swap more, and thus be at a higher risk of it occurring. But this means that it's not general ram usage by regnum, but rather some specific routine that befucks things.
Anyway, it's all speculation obviously.
Miraculix
11-11-2008, 10:18 AM
I have been experiencing memory leaks that flood ram and swap, freeze up my PC and make me reboot to get it back. Those have been almost completely gone since a couple of patches, but they are still there. Definitely not as often as before though is what's sure, it's much better now on my system.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.