AIX 内存使用分析(谁在使用内存)

AIX Memory Usage - or - Who is using the memory and how?

How To

Summary

When you run low on AIX memory, before you add more, it is good to check memory use.

Objective

AIX 内存使用分析(谁在使用内存)

Steps

Common question: I see XX% of Used Memory but I don't know who is using it and how?

A simple question but there is no simple answer as memory use if complex.
nmon then hit "m" will quickly show you a few big uses of memory as below:

AIX 内存使用分析(谁在使用内存)

Many system admin people talk about Computational memory (I never understood why) but with nmon on the far

right top add the Process=6.0% and System=16.2% for the computational memory=22.2%.

UNIX Inter-process Communication (IPC) is another place which can soak up large amounts of memory. Use the ipcs -m command to list the use:

AIX 内存使用分析(谁在使用内存)


The shared memory used by lots of applications like DB2 and Oracle - check the SEGSZ for the size.

The Owner column usually tells you what it is used for like the Oracle user for the SGA or db2inst1 for the DB2 buffer cache. Above we see the largest Shared Memory segment is ~22 MM (222696000 bytes).

Then it is down to the processes and this gets tricky. All processes running the same program file will be sharing the code pages as its read-only.  The may also be sharing some or nearly all of the data and stack pages if the processes started by a common process that then forked like for example RDBMS and things like Apache.
This is also true for the dozens of libraries that processes also need and are largely invisible to us. Due to this unknown sharing it is often the case if you add up all the memory of all the processes it is obviously much larger than memory. If you use nmon then "t" for top processes and then "4" to order in process size you see the process memory:

AIX 内存使用分析(谁在使用内存)
  1. Size KB = the size as found in the program file on disk.
  2. Resident Set Size = how big it is in memory (excluding the pages still in the file system (like code) and some parts on paging disks)".
  3. ResText column is the code pages of the Resident Set
  4. ResData column is the data and stack pages of the Resident Set

If you want the full details then you need the svmon command but be warned - this tells you the full picture and it is very complicated. Even when listing the details of a single process - as you find there are a dozen combinations of memory attributes and you find your processes memory has all of them and for the dozen libraries. Remember processes have shared read-only access the programs code and their library's code so adding up the processes does not work.

DeveloperWorks its=282027

2 次浏览 更新于 2026-11-04

同组文章性能与故障案例

查看本组全部 10 篇

没有找到想要的答案?

上传日志让 AI 帮你诊断,或者在控制台里直接向 AI 提问。