我的 RAM 都去哪儿了

我的 RAM 都去哪儿了

在我们的 RHEVM 服务器上,当我运行 free -m 命令时,它告诉我们 23117MB“已用 -(缓冲区+缓存)”RAM 正在使用中,而空闲“空闲+(缓冲区+缓存)”为 9120MB

总可用 RAM 为 30759MB 实际已用 23117MB 实际可用 9120MB

当我试图找到一个消耗 RAM 的进程时,它是 POSTMASTER 进程,但它仍然只使用 1288MB

这是顶级进程的列表

1288MB  postmaster
859MB   java
449MB   udisks-daemon
355MB   gnome-settings-
232MB   firefox
133MB   httpd
132MB   gpk-update-icon
58MB    gdu-notificatio
55MB    gvfs-gdu-volume
42MB    python
38MB    nautilus
29MB    Xorg
24MB    Xvnc
24MB    clock-applet
19MB    sshd
13MB    gnome-panel
13MB    metacity
12MB    mdmon
12MB    gnome-session
12MB    wnck-applet
11MB    gnome-volume-co
11MB    ovirt-engine.py
11MB    gdm-user-switch
10MB    notification-da

并从 TOP 命令输出

Tasks: 371 total,   1 running, 370 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.7%us,  0.3%sy,  0.0%ni, 98.7%id,  0.2%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  32853828k total, 31500888k used,  1352940k free,   208496k buffers
Swap: 16777208k total,   561144k used, 16216064k free,  7620628k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2780 ovirt     20   0 5924m 858m  21m S  2.7  2.7   4:58.50 java
  130 root      39  19     0    0    0 S  1.0  0.0  10704:56 kipmi0
  472 root      20   0     0    0    0 S  0.3  0.0   3533:58 md126_raid1
 1778 root      20   0     0    0    0 S  0.3  0.0 288:47.88 kondemand/1
 2992 postgres  20   0  270m  62m  11m S  0.3  0.2   0:19.17 postmaster
 2993 postgres  20   0  269m  62m  11m S  0.3  0.2   0:19.27 postmaster
 2994 postgres  20   0  271m  65m  11m S  0.3  0.2   0:19.38 postmaster
 2996 postgres  20   0  270m  63m  11m S  0.3  0.2   0:19.16 postmaster
 3042 postgres  20   0  272m  63m  11m S  0.3  0.2   0:19.27 postmaster
 3043 postgres  20   0  270m  66m  11m S  0.3  0.2   0:18.88 postmaster
 3056 postgres  20   0  269m  60m  11m S  0.3  0.2   0:18.96 postmaster
 3057 postgres  20   0  269m  62m  11m S  0.3  0.2   0:18.85 postmaster
 3058 postgres  20   0  270m  64m  11m S  0.3  0.2   0:19.00 postmaster
 3062 postgres  20   0  272m  63m  11m S  0.3  0.2   0:18.96 postmaster
 4744 root 20   0 15280 1472  948 R  0.3  0.0   0:00.02 top
    1 root      20   0 19364 1224 1016 S  0.0  0.0   0:13.54 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:07.08 kthreadd
    3 root      RT   0     0    0    0 S  0.0  0.0   0:57.27 migration/0
    4 root      20   0     0    0    0 S  0.0  0.0   4:43.07 ksoftirqd/0
    5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    6 root      RT   0     0    0    0 S  0.0  0.0   0:49.55 watchdog/0
    7 root      RT   0     0    0    0 S  0.0  0.0   0:55.62 migration/1
    8 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/1
    9 root      20   0     0    0    0 S  0.0  0.0  14:32.43 ksoftirqd/1
   10 root      RT   0     0    0    0 S  0.0  0.0   0:41.13 watchdog/1
   11 root      RT   0     0    0    0 S  0.0  0.0   0:41.82 migration/2
   12 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/2
   13 root      20   0     0    0    0 S  0.0  0.0   4:40.52 ksoftirqd/2

自由命令输出

             total       used       free     shared    buffers     cached
Mem:         32083      30999       1084          0        204       7665
-/+ buffers/cache:      23129       8954
Swap:        16383        547      15836

23117MB RAM 有何用途

答案1

一些 RAM 可能被 tmpfs 或其他与内核相关的东西(例如 ZFS)使用。

df -hcat /proc/meminfo可能有助于解决这个问题。

相关内容