On Sun, Jun 6, 2010 at 8:30 AM, Steve Perez <[email protected]> wrote:

> The memory was finally released after 30 minutes.  I am not well versed in
> Linux but more of a Vm person.  But my questions are:
>
> 1. Is this normal?
> 2. What is holding the memory for 30 minutes?
> 3. Can the memory be released as soon as DB2 is brought down?
> 4. Is there a parm somewhere to tell DB2 or zLinux to release that memory?

You can't really answer those questions without proper
instrumentation. My guess is that what you saw as memory usage was
mostly not related to DB2 but in general cached data in Linux.
Something unrelated happened 30 minutes later (a process started by
cron maybe) and that acquired memory, pushing things out of page
cache. When this process then terminates, the memory becomes
available.

When I stopped DB2 on my system, the memory usage shows this:
Screen: ESAUCD2  Informatika                    ESAMON 3
2 of 2  LINUX UCD Memory Analysis Report        NODE ROB

                  <------------------Storage sizes (in M
                  <--Real Storage--> <--Storage in Use->
Time     Node     Total  Avail Used  Shared Buffer Cache
-------- -------- ------ ----- ----- ------ ------ -----
11:41:00 roblnx2  1462.4 873.5 588.9      0  244.0 283.9
11:40:00 roblnx2  1462.4 873.5 588.9      0  244.0 283.9
11:39:00 roblnx2  1462.4 873.5 588.9      0  244.0 283.9
11:38:00 roblnx2  1462.4 863.4 599.1      0  244.0 290.1
11:37:00 roblnx2  1462.4 668.7 793.7      0  244.0 442.0
11:36:00 roblnx2  1462.4 672.2 790.2      0  244.0 441.8
11:35:00 roblnx2  1462.4 703.5 758.9      0  244.0 418.7

So you see about 200 MB freed when DB2 terminated (you also see it
grow by 25M during DB2 shutdown at 11:36). And the data also shows
that 140 MB came out of page cache, and the rest from anonymous
memory. Another screen shows that my bash shell was active around that
time:

(more apologies for the layout - have a look at
http://demo.velocitysoftware.com/ZVIEW/zview.html to see what you can
when you collect one million performance metrics from Linux and z/VM
per minute...)

Screen: ESALNXP  Informatika                    ESAMON 3.797
1 of 4  LINUX VSI Process Statistics Report     NODE ROBLNX2

                            <-Process Ident-> <------CPU Perc
Time     Node     Name         ID  PPID   GRP Total sys  user
-------- -------- --------- ----- ----- ----- ----- ---- ----
11:39:00 roblnx2  *Totals*      0     0     0   0.1  0.1  0.0
11:38:00 roblnx2  bash      14743 14742 14743   0.7    0    0
                  init          1     1     1   0.1    0    0
                  *Totals*      0     0     0   1.0  0.1  0.0
11:37:00 roblnx2  *Totals*      0     0     0   0.2  0.1  0.1
11:36:00 roblnx2  bash      14743 14742 14743   1.2  0.0  0.1
                  *Totals*      0     0     0   1.3  0.1  0.1
11:35:00 roblnx2  *Totals*      0     0     0   0.2  0.1  0.1
11:34:00 roblnx2  bash      14649 14647 14649   0.2    0  0.1
                  sshd      14647  1879 14647   0.4    0  0.0
                  snmpd      6853     1  6852   0.1  0.1  0.0
                  *Totals*      0     0     0   0.7  0.1  0.2

And as a z/VM person, you would more care about what it means to z/VM.
When Linux frees up memory, z/VM is not aware and will continue to
keep those pages in memory or paging DASD. That's where CMM comes in.

Rob
-- 
Rob van der Heij
Velocity Software
http://www.velocitysoftware.com/

Reply via email to