0

I just ran some application which maybe have memory leakage issues on my box with debian 6.01a installed. It consumed about 5GB of the total 8GB RAM and didn't release the RAM when it exited. So I rebooted my machine, to get my memory back. However, I found it didn't. When the machine started again, both the top command and the free command show that there is still 5GB RAM occupied. It's really unstandable to me, so is there anyone could explain why this happens?

Update: Finally, i found it was not a problem about the system's memory management. The reason why lots of RAM is consumed is that the app wrote lots of data - about 5GB - to the redis server, and that's why when the system started, about 5GB RAM was occupied. Sorry for this misleading question.

2 Answers 2

2

Please take a look at http://www.linuxatemyram.com/ before you determine that your system has a memory leak.

1
  • Thank you for your link. Finally I found it was redis that was eating my memory.
    – Lion
    May 29, 2011 at 3:28
0

You are probably measuring memory usage incorrectly (both before and after the reboot). You can work out where your memory has gone with:

$ cat /proc/meminfo

The output format is described in the kernel documentation. This will tell you if the memory usage is in user-space or in the kernel.

For future reference, a quick way to find out which user-space processes are using memory is to run top and then type M (capital-M) to order by RES.

2
  • Thank you for your link. Finally I found it was redis that was eating my memory.
    – Lion
    May 29, 2011 at 3:29
  • @Lion: No worries. I've added a tip on using top to help you track down memory usage in future.
    – Tom Shaw
    May 29, 2011 at 3:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .