Hi friends, we have memory leak in our linux system, even without our app. found this from "top" command, the "free memory" keeps on shrinking. Now i sort the "top" by memory usage, basically see which processes use memory most. But after overnight, the process uses most memory still shows using 0.5% memory. At the same time, "free memory" still keeps on shrinking. So where should i find the problem ? Thanks !
I monitored my Ubuntu 2.6.32-61 for a while. It is 21520k free, never change.
【在 w*s 的大作中提到】 : Hi friends, : we have memory leak in our linux system, even without our app. : found this from "top" command, the "free memory" keeps on shrinking. : Now i sort the "top" by memory usage, basically see which processes use : memory most. But after overnight, the process uses most memory still shows : using 0.5% memory. : At the same time, "free memory" still keeps on shrinking. : So where should i find the problem ? : Thanks !
【在 w*s 的大作中提到】 : Hi friends, : we have memory leak in our linux system, even without our app. : found this from "top" command, the "free memory" keeps on shrinking. : Now i sort the "top" by memory usage, basically see which processes use : memory most. But after overnight, the process uses most memory still shows : using 0.5% memory. : At the same time, "free memory" still keeps on shrinking. : So where should i find the problem ? : Thanks !
Linux. will use as much as it can and rlease. if neded
【在 w*s 的大作中提到】 : Hi friends, : we have memory leak in our linux system, even without our app. : found this from "top" command, the "free memory" keeps on shrinking. : Now i sort the "top" by memory usage, basically see which processes use : memory most. But after overnight, the process uses most memory still shows : using 0.5% memory. : At the same time, "free memory" still keeps on shrinking. : So where should i find the problem ? : Thanks !
Look at the "Cached:" in /proc/meminfo. Linux will try to cache memory whenever possible. Memory at free is memory at waste. As long as the kernel can reclaim those memory (by dropping the cache). Kernel is not running out of memory. The free memory in kernel is memory that is currently not used at all, in other words, wasted. The kernel will try to cache stuff and keep the free memory low.
【在 w*s 的大作中提到】 : how to tell "Cache increasing? Network/FS buffer" ? : which sections from "/proc/meminfo" ? : i'm lost after google ...
That's correct. If you have root privilege, try echo 3 > /proc/sys/vm/drop_caches and you will see that your free memory, aka "wasted" memory in SSA's term, comes back. Cheers!
【在 S*A 的大作中提到】 : Look at the "Cached:" in /proc/meminfo. : Linux will try to cache memory whenever possible. : Memory at free is memory at waste. : As long as the kernel can reclaim those memory (by : dropping the cache). Kernel is not running out of : memory. : The free memory in kernel is memory that is currently : not used at all, in other words, wasted. The kernel : will try to cache stuff and keep the free memory low.
m*e
40 楼
我觉得是军区司令。
【在 m*r 的大作中提到】 : 节度使是什么级别的官?省长?
w*s
41 楼
make sense, thanks everyone !
【在 S*A 的大作中提到】 : Look at the "Cached:" in /proc/meminfo. : Linux will try to cache memory whenever possible. : Memory at free is memory at waste. : As long as the kernel can reclaim those memory (by : dropping the cache). Kernel is not running out of : memory. : The free memory in kernel is memory that is currently : not used at all, in other words, wasted. The kernel : will try to cache stuff and keep the free memory low.