Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

migrated from stackoverflow.com May 29 '11 at 2:32

This question came from our site for professional and enthusiast programmers.

2 Answers

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

share|improve this answer
    
Thank you for your link. Finally I found it was redis that was eating my memory. –  Lion May 29 '11 at 3:28
add comment

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.

share|improve this answer
    
Thank you for your link. Finally I found it was redis that was eating my memory. –  Lion May 29 '11 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 '11 at 3:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.