PDA

View Full Version : Memory leak?


SlEEpVValker
08-09-2004, 14:09
I checked my server lately and saw that RAM usage was nearly 100% and the machine was already swapping.
After a reboot and looking at top I saw memory usage increase by 8k every 7 seconds.

The server is run by Debian Woody - 2.4 kernel
ServerVersion: 2.0.20.1

------------------------ AFTER REBOOT ----------------------------------
Mem: 512960k total, 81968k used, 430992k free, 3720k buffers
Swap: 2587108k total, 0k used, 2587108k free, 39732k cached
--------------------------------------------------------------------------

-----------------------AFTER 20 MINUTES RUNNING -----------------------
Mem: 512960k total, 153012k used, 359948k free, 7220k buffers
Swap: 2587108k total, 0k used, 2587108k free, 57696k cached
--------------------------------------------------------------------------

After about an hour (only ts2 running after reboot) the mem usage looks like this:
Mem: 512960K total, 104448K used, 408512K free, 14928K buffers


The 8kB seem always to be requested for buffers ...

Any suggestions?

Brain
08-09-2004, 17:02
"mem total" - "mem free" - "swap cached" - "mem buffers" is what your programs actually use up.
That means "after reboot" programs use up 38.5MB mem.
After 20 minutes it would be 88MB.

Saying it's "only TS2" is easy, but are you sure?
If there was a memory leak that means the TS2 server processes would continually hog up more and more mem until RAM and swap are full. Then the kernel terminates them.
The last running period of my TS2 server was from the day 2.0.20.1 came out to a month ago when I migrated to a more powerful machine. I didn't observe any unusual memory consumption, neither was the TS2 server terminated.
It was running on 2.4.26 and an Athlon XP1700+ with 256MB RAM.

SlEEpVValker
08-09-2004, 18:47
I saw this the first time two weeks ago - this is my test server with different software installed ... uninstalled ... installed ... uninstalled

This morning I had time to do some tests and stopped all running services one by one and checked back if this behaviour stopped.
At some point I decided to simply do fresh OS install because I had to take care of customers, too.

I installed a fresh Debian Woody from ftp and all I did after this point was installing lynx, ssh and ts2.
Instantly after starting the ts2 server that "8k fun" began - so there are 2 possibilities:
1.) my ts2 install
2.) my ts2 db

I don't know if this means "itīs surely ts2" from your point of view - from mine it does.

greetz
SW

Brain
08-09-2004, 18:55
It depends what a "fresh install" is from your point of view. If it includes Apache and a MySQL server then you should expect great variations in memory usage because of MySQLs query cache and Apache processes forking and terminating.

BTW, I'm using Debian Woody as well.

SlEEpVValker
08-09-2004, 18:59
A "fresh install" is "no extra software" - in Debian terms "basic system installed"
The only thing running is the local MTA (exim ... now itīs 3.5 or the like).

On the old install there was Apache 1.3 , MySQL, ut2k4 server, TO server ... ... ...


The System is up now 9:35 ... ts2 is running about 5:35

Mem: 512960K total, 112916K used, 400044K free, 20256K buffers
Swap: 489972K total, 0K used, 489972K free, 74000K cached