| |
 |
|
Oracle Tips by Burleson Consulting
|
Internals of RAM memory
paging
So if RAM paging in “pi” may be acceptable and paging out “po” may
be acceptable, how do we tell when the RAM on a server is
overstressed and swapping? One answer is to correlate the UNIX scan
rate with page-in operations. When an Oracle server begins to run
low on RAM memory, the page stealing daemon process awakens and UNIX
begins to treat the RAM memory as a sharable resource, moving memory
frames to the swap disk with paging operations.
The page stealing daemon operates in two modes. When RAM memory
shortages are not critical, the daemon will steal small chunks of
least-recently-used RAM memory from a program. As RAM resource
demands continue to increase, the page stealing daemon escalates and
begins to page-out entire programs RAM regions. In short, we cannot
always tell if the page-in operations that we see are normal
housekeeping or a serious memory shortage unless we correlate the
activity of the page stealing daemon with the page-in output.
To aid in this, the vmstat utility gives the sr column to designate
the memory page scan rate. If we see the scan rate rising steadily,
we will have hit the page stealing daemons first threshold,
indicating that entire programs RAM memory regions are being paged
out to the swap disk. Next, we will begin to see high page-in
numbers as the entire process in paged back into RAM memory (Figure
6-2).
Figure 2: Interaction between scan rate, page-out and page-in
Carefully review the list below from HP/UX vmstat. The scan rate is
the furthest right column, and here we see the value of sr rising
steadily as the page stealing daemon prepares for a page in. As the
sr value peaks, we see the page-in operation (pi) as the real RAM
memory on the Oracle server is exceeded.
root> vmstat 2
procs memory page
r b w avm free re at pi po fr de sr
3 0 0 144020 12778 17 9 0 14 29 0 3
3 0 0 144020 12737 15 0 1 34 4 0 8
3 0 0 144020 12360 9 0 1 46 2 0 13
1 0 0 142084 12360 5 0 3 17 0 0 21
1 0 0 142084 12360 3 0 8 0 0 0 8
1 0 0 140900 12360 1 0 10 0 0 0 0
1 0 0 140900 12360 0 0 9 0 0 0 0
1 0 0 140900 12204 0 0 3 0 0 0 0
1 0 0 137654 12204 0 0 0 0 0 0 0
As we have already noted, we can also use the glance utility to see
details about memory consumption
In sum, that Oracle DBA must always be vigilant in their monitoring
for RAM memory paging.
 |
For more details and scripts, see my new book "
Oracle
Tuning: The Definitive Reference", over 900 pages
of BC's favorite tuning tips & scripts.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot. |
|