Documente Academic
Documente Profesional
Documente Cultură
v
e
© 2010 IBM
em
3
or
y
Announcement Confusion
Ex
pa
ns
io
n
1. Marketing thought:
– “Expansion” sounded better than “Compression”
1
Ac
tiv
v
e
Active Memory Expansion Pre-Reqs:
M
© 2010 IBM
em
4
or
y
Ex
pa
POWER7 based machine
ns
io
n
AIX 6.1 TL04 SP2+
Also note:
– Transparent to all applications
– Not IVM - Activation key via the HMC
– But configured at LPAR level
– AME will switch off AIX 64KB page support
– Can be enabled but tests showed it was slower
Ac
tiv
v
e
M
© 2010 IBM
em
5
or
y
Ex
2
Ac
tiv
v
e
M
© 2010 IBM
em
6
or
y
Ex
How do we switch AME on?
pa
ns
io
n
Ac
tiv
v
e
M
7
or
y
Ex
pa
ns
io
n
HMC
Server Properties
Capabilities
then scroll to the bottom
3
Ac
tiv
v
e
Activate on AME on the LPAR profile
M
© 2010 IBM
em
8
or
y
Ex
pa
ns
io
n
Hard reboot (not restart) to
activate LPAR in AME mode
Expansion Factor:
1.0 = AME on but inactive
1.2 to 1.5 = Good start point
10.0 = suicidal !
Ac
tiv
v
e
© 2010 IBM
em
9
or
y
Ex
pa
ns
io
n
4
Ac
tiv
v
e
M
© 2010 IBM
em
10
or
y
Ex
How does AME work?
pa
ns
io
n
Ac
tiv
v
e
M
© 2010 IBM
em
11
or
y
Ex
Memory Pages
5
Ac
tiv
v
e
M
© 2010 IBM
em
12
or
y
Ex
AME Conceptual Model
pa
ns
io
n
Memory Pages RAM Disk
Ac
tiv
v
e
M
© 2010 IBM
em
13
or
y
Ex
6
Ac
tiv
v
e
M
© 2010 IBM
em
14
or
y
Ex
AME Conceptual Model
pa
ns
io
n
Compressed
Memory Pages RAM Disk
Ac
tiv
v
e
M
© 2010 IBM
em
15
or
y
Ex
Compressed
Memory Pages Memory pages
7
Ac
tiv
v
e
M
© 2010 IBM
em
16
or
y
Ex
AME Practicalities
pa
ns
io
n
Lower Expansion Factor
= Compress once little used pages
= Near zero CPU cycles
Higher Expansion Factor
= More compression
= More CPU cycles
Balance more RAM verses more CPU cycles
Ac
tiv
v
e
M
© 2010 IBM
em
17
or
y
Ex
Technical Details
pa
ns
io
n
8
Ac
tiv
v
e
M
© 2010 IBM
em
18
or
y
Ex
Bad Compression Targets
pa
ns
io
n
AIX Kernel
– Not a AME target
Filesystem cache, code or memory mapped files
– Best to page out to filesystems
– Performance tools “numperm”
Pinned Memory
– Pinned = never page out (AME is like paging)
– Performance tools “pinned pages”
Ac
tiv
v
e
M
© 2010 IBM
em
19
or
y
Ex
9
Ac
tiv
v
e
M
© 2010 IBM
em
20
or
y
Ex
Excellent Compression Targets
pa
ns
io
n
Data that compresses well
– Data only used on program initialisation
– Pages allocated but unused = full of zeros/blanks
– Pages with lots of repeat data like database records
Access Pattern
– Some hot pages, some warm, some freezing
– All pages equally used (HPC) – not so good
Ac
tiv
v
e
M
© 2010 IBM
em
21
or
y
Ex
Do I have
Good or bad compression ratio?
Friendly or hostile access pattern?
until now ….
10
Ac
tiv
v
e
M
© 2010 IBM
em
22
or
y
Ex
Planning for Active Memory Expansion
pa
ns
io
n
A new AIX command: amepat
– Active Memory Expansion Performance Analysis Tool
– Or someone called Patrick/Patricia – you decide!
Ac
tiv
v
e
M
© 2010 IBM
em
23
or
y
Ex
11
Ac
tiv
v
e
M
© 2010 IBM
em
24
or
y
Ex
Knee of the Curve
pa
ns
CPU Constrained
io
n
So no time for AME
% CPU
utilised for
expansion
Increasingly
ineffective
Very cost effective
Ac
tiv
v
e
M
© 2010 IBM
em
25
or
y
Ex
# amepat -?
Usage: amepat [-u minucomp_poolsize] [-m min_mem_savings]
{[-t tgt_expmem_size] | [-a]} [-n num_entries] [-P recfile]
{[-e startexpfactor[:stopexpfactor[:incexpfactor]]] |
{ [-c max_cpu_overhead%] | [-C max_cpu_overhead] }}
[-v] { [Duration] | [interval [samples]] }
amepat -R recfile { [Duration] | [Interval [Samples]] }
amepat -N [{-P|-R} recfile] [-v] {Duration]|[Interval [Samples]]}
-m min_mem_savings Unit is MB
-c max_cpu_overhead% Unit is percentage
-C max_cpu_overhead Unit is in number of Physical Processors
-u minucomp_poolsize Unit is MB
-t tgt_expmem_size Unit is MB
Duration Unit is minutes
interval Unit is minutes
Note: -N flag will turn off Active Memory Expansion Modeling.
All options except -P, -R will be disabled when -N is used.
12
Ac
tiv
v
e
M
© 2010 IBM
em
26
or
y
Ex
amepat - Basics are Easy
pa
ns
io
n
Run & report mode gets frustrating so …
Ac
tiv
v
e
M
© 2010 IBM
em
27
or
y
Ex
Warning ….
pa
ns
io
n
13
Ac
tiv
v
e
amepat output – Machine Summary
M
© 2010 IBM
em
28
or
# amepat
y
Ex
Date/Time of invocation : -
pa
Total Monitored time : NA
ns
Total Samples Collected : NA
io
n
System Configuration:
Machine Summary ---------------------
Partition Name : diamond3
Processor Implementation Mode : POWER7
Number Of Logical CPUs : 16
Processor Entitled Capacity : 0.80
Processor Max. Capacity : 4.00
1 GB = very small True Memory : 1.00 GB
for my test case SMT Threads : 4
Shared Processor Mode : Enabled-Uncapped
Active Memory Sharing : Disabled
Active Memory Expansion : Enabled
Target Expanded Memory Size : 1.00 GB Factor=1 No
Target Memory Expansion factor : 1.00
Compression
Memory Summary System Resource Statistics: Current
--------------------------- ----------------
CPU Util (Phys. Processors) 0.01 [ 0%]
Virtual Memory Size (MB) 790 [ 77%]
True Memory In-Use (MB) 985 [ 96%]
Not compressed Pinned Memory (MB) 371 [ 36%]
File Cache Size (MB) 179 [ 17%]
by AME Available Memory (MB) 184 [ 18%]
. . .
. . .
. . .
Ac
Nothing Compressed
tiv
v
e
amepat –P ame.out
M
29
or
. . .
pa
14
Ac
Nothing Compressed
tiv
v
e
amepat –P ame.out
M
as there is no need © 2010 IBM
em
30
or
-> REMOVED CONFIG DETAILS ABOVE HERE
y
Ex
. . .
pa
AME Statistics: Current
ns
1GB with --------------- ----------------
io
n
AME CPU Usage (Phy. Proc Units) 0.00 [ 0%]
99% used Compressed Memory (MB)
Compression Ratio
0 [ 0%]
2.02
Ac
tiv
© 2010 IBM
em
31
or
. . .
pa
15
Ac
tiv
v
e
M
© 2010 IBM
em
32
or
y
Ex
Monitoring Active Memory Expansion in use
pa
ns
io
n
Ac
tiv
v
e
M
© 2010 IBM
em
33
or
y
Ex
lparstat -i
pa
ns
io
n
Target
Expansion Factor
AME memory
16
Ac
tiv
v
e
M
© 2010 IBM
em
34
or
y
Ex
vmstat –c 1
pa
ns
io
n
mem = apparent Memory CI = Compressed Page In
tmem = True Memory CO = Compressed Page Out
Ac
tiv
v
e
M
© 2010 IBM
em
35
or
y
Ex
lparstat –c 1
pa
ns
io
n
17
Ac
tiv
v
e
topas
M
© 2010 IBM
em
36
or
y
Ex
pa
ns
io
n
TMEM = True Memory
CMEM = Compressed Memory EF = Expansion Factor
T = target
CI = Compressed Page In A = Actual
CO = Compressed Page Out
Ac
tiv
v
e
M
© 2010 IBM
em
37
topas_nmon not aware of AME (yet!)
or
y
Ex
pa
ns
io
n
18
Ac
tiv
v
e
M
© 2010 IBM
em
38
or
y
Ex
nmon capture to file then Analyser
pa
ns
io
n
MEM tab
– Size of the Compressed pool (MB)
– Size of true memory (MB)
– Expanded memory size (MB),
– Size of the Uncompressed pool (MB)
MEMNEW tab
– Compressed Pool%
PAGE tab
– Paging rates (pages per second) but this time very quickly
in & out of the compressed memory area
– Compressed pool pgins - other tools like topas call this CI
– Compressed pool pgouts - other tools like topas call this CO
Ac
tiv
v
e
M
© 2010 IBM
em
39
or
y
Ex
19
Ac
tiv
v
e
M
© 2010 IBM
em
40
or
y
Ex
svmon
pa
ns
io
n
Good luck with that one !
Ac
tiv
v
e
M
© 2010 IBM
em
2
io
1 3
n
Performance
Estimated Results
CPU Utilization
CPU Utilization
20
Ac
tiv
v
e
M
© 2010 IBM
em
42
or
y
Ex
AME Wiki page & AME Forum
pa
ns
io
n
AME Public Wiki (on the AIX wiki)
http://www.ibm.com/developerworks/wikis/display/WikiPtype/IBM+Active+Memory+Expansion
URL for trial, presentation, Forum, whitepapers, manual page, Perf Tune Guide, movies
AME Forum
http://www.ibm.com/developerworks/forums/forum.jspa?forumID=2179
Ac
tiv
v
e
M
© 2010 IBM
em
43
or
y
Ex
Docs
pa
ns
io
n
21
Ac
tiv
v
e
M
© 2010 IBM
em
44
or
y
Ex
AME – at the Movies
pa
ns
io
n
http://tinyurl.com/AIXmovies
Ac
tiv
v
e
M
© 2010 IBM
em
45
or
y
http://www.ibm.com/developerworks/wikis/display/WikiPtype/ …
IBM+Active+Memory+Expansion
22