Kbase P29874: How much memory do APW, BIW, AIW, _mprshut, _mprosrv, _progres processes consume?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/02/2010 |
|
Status: Verified
GOAL:
How much memory do APW, BIW, AIW, _mprshut, _mprosrv, _progres processes consume?
GOAL:
Is there a way to calculate memory consumption for a Progress process?
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Product Family
FIX:
The answer varies from release to release and operating system to operating system.
1. APWs, BIW, AIW are the same _mprshut executable run with a different parameter.
2. The size of the executable is determined primarily by the amount of code that is built in to it. That code will usually not be fully loaded into memory when the executable is run. That is because the code is paged in dynamically on demand and only those pages that are actually used get brought into memory. But there are also various libraries that are used, such as the C run-time library and things like that. So the executable does not contain /all/ of the code that it uses.
3. Most code is shareable, so if several processes are running the same executable then only one copy of the code is needed.
On Solaris, you can use the pmap command to see what the various chunks of a process's address space look like. Here is an example of a 9.1D07 APW:
00010000 1752K read/exec dev:193,1890 ino:10444398
001D4000 192K read/write/exec dev:193,1890 ino:10444398
00204000 232K read/write/exec [ heap ]
EE000000 2120K read/write/exec/shared [ shmid=0x6e95 ]
EEC02000 8K read/write/exec [ anon ]
EED04000 8K read/write/exec [ anon ]
EEE06000 8K read/write/exec [ anon ]
EEF08000 8K read/write/exec [ anon ]
EF00A000 8K read/write/exec [ anon ]
EF10C000 8K read/write/exec [ anon ]
EF20E000 8K read/write/exec [ anon ]
EF30C000 8K read/write/exec [ anon ]
EF310000 8K read/write/exec [ anon ]
EF40E000 8K read/write/exec [ anon ]
EF544000 8K read/write/exec [ anon ]
EF554000 8K read/write/exec [ anon ]
EF560000 16K read/exec /usr/lib/libmp.so.2
EF572000 8K read/write/exec /usr/lib/libmp.so.2
EF580000 592K read/exec /usr/lib/libc.so.1
EF622000 32K read/write/exec /usr/lib/libc.so.1
EF62A000 8K read/write/exec [ anon ]
EF640000 96K read/exec /usr/lib/libthread.so.1
EF666000 16K read/write/exec /usr/lib/libthread.so.1
EF66A000 32K read/write/exec [ anon ]
EF680000 448K read/exec /usr/lib/libnsl.so.1
EF6FE000 40K read/write/exec /usr/lib/libnsl.so.1
EF708000 24K read/write/exec [ anon ]
EF720000 16K read/exec /usr/platform/sun4u/lib/libc_psr.so.1
EF730000 8K read/write/exec [ anon ]
EF740000 88K read/exec /usr/lib/libm.so.1
EF764000 8K read/write/exec /usr/lib/libm.so.1
EF770000 8K read/write/exec/shared [ anon ]
EF780000 8K read/exec /usr/lib/libdl.so.1
EF790000 32K read/exec /usr/lib/libsocket.so.1
EF7A6000 8K read/write/exec /usr/lib/libsocket.so.1
EF7A8000 8K read/write/exec [ anon ]
EF7B0000 8K read/exec /usr/lib/libintl.so.1
EF7C0000 128K read/exec /usr/lib/ld.so.1
EF7EE000 16K read/write/exec /usr/lib/ld.so.1
EFFFA000 24K read/write/exec [ stack ]
total 6064K
The first two pieces are code and data from the executable. That is just under 2 megabytes. The code is shared.
The next piece is the heap, which is dynamically allocated data used by the APW while it is running. This is not shared.
The next piece is the database shared memory, which in this case is just over two megabytes. There is one copy of this, used by all the processes which attach to the database directly (broker, servers, APWs, BIW, AIW, self-serving clients, etc.)
The rest is almost all from system libraries. These are shared among all processes that use them.
The last piece is the process stack, which is private and varies in size from process to process. Processes running the same executable will often have similar stack sizes.
4. All modern systems have demand-paged virtual memory. So the amount of a process that is actually resident varies from one instant to another. In the example I got the pmap output from, the top command shows that _mprshut has a total size of 8040 kilobytes and a resident size of 4488 kilobytes. That means a little over half is actually in memory (i.e. "resident") and in this case, much of .that is shared. The part that is not resident is probably code that is linked to the executable but has not been used.
So in short, even if you calculate the amount of memory that a process uses that is not shared, it would be very difficult to determine how much of that small portion is actually in memory..