Escolar Documentos
Profissional Documentos
Cultura Documentos
© 2011 IBM
1
PowerVM
Session 4: Active Memory Sharing
v
Nigel Griffiths
IBM Power Systems
Advanced Technology Support
EMEA
TLA overload! v
© 2011 IBM
2
Today
AMS = Active Memory Sharing
– PowerVM feature for Power6 & Power7
NOT
• AME = Active Memory Expansion – AIX only feature
• AEM = Active Energy Manager – part of Systems Director
Why Active Memory Sharing (AMS) ?
v
© 2011 IBM
3
There is none!
Note:
• First released in May 2009 on Power6
• At that time required new FW, VIOS & OS
• Now all current
Active Memory Sharing Media & Installing
v
© 2011 IBM
7
You need:
1. PowerVM AMS Activated see HMC
2. VIOS recent like 2.1.1 or 2.2
3. Operating system that supports AMS like current
• AIX 6.1 TL3+ (not AIX 5.3)
• IBM i 6.1.1+ Fixes
• Linux – current
4. Uses 4 KB pages
5. Virtual Machines
• Pure Virtual (shared CPU, network & disks)
• Assumes differing workload pattern but friendly
• Co-operate in sharing RAM across the system
v
© 2011 IBM
8
Physical Memory
Ac
tua
ll
ys
tor
ed
Tiny 4 KB pages
o
nd
is k
v
© 2011 IBM
A page 11
Working Set is the pages needed to run in the short term (seconds)
Also called Resident Set (resident in memory), see ps or nmon ResText & ResData
OS Level Paging v
© 2011 IBM
12
Memory
Disk
“lrud” daemon
Memory access
Processes
VM Level Paging = AMS
v
© 2011 IBM
13
Disk
Memory “lrud” daemon
LPAR 1 Memory access
“lrud” daemon
LPAR 2 Memory access
“lrud” daemon
LPAR 3
Memory access
Hypervisor
owns the Virtual
--- paging table I/O
---
Server
---
v
© 2011 IBM
1 One
Paging Device
per LPAR i.e.
2 Server
Virtual I/O
LV/hdisk/LUN
VIOS
3
Hypervisor
Logical Partitions
v
© 2011 IBM
2 One
Paging Device
per LPAR i.e.
1 Server
Virtual I/O
LV/hdisk/LUN
VIOS
3
Hypervisor
Logical Partitions
4 Shared Shared
Memory Memory
4 GB 5 GB
v
© 2011 IBM
2 One
Paging Device
per LPAR i.e.
1 Server
Virtual I/O
LV/hdisk/LUN
VIOS
3
Hypervisor
Logical Partitions
4 Shared Shared Dedicated Dedicated
Memory Memory Memory Memory
4 GB 5 GB 5 GB 2 GB
v
© 2011 IBM
17
O O
C F
50 120
40 100
30 80
40
50 60
“Relaxed Mode”
O O
C F
50 120
40 100
Hypervisor asks OS images for help 30 80
20 60
10 40
once a second 0
10
20
0
20
20
30
OS then frees memory, if necessary paging out 40
40
60
50
“Co-operative Mode”
AMS Algorithm 3 – Loans are not enough
v
© 2011 IBM
19
60
“Aggressive Mode”
to the VM to handle 20
30
20
40
40
50 60
“Aggressive Mode”
v
© 2011 IBM
21
v
© 2011 IBM
Machine Level - Memory Pool on HMC 22
Pool Size
Decide VIOS(s)
v
© 2011 IBM
24
Can’t be both
v
© 2011 IBM
26
In use
v
Memory Pool Size © 2011 IBM
AIX Level: Logical Memory 28
vmstat -h
# vmstat -h 10
System configuration: lcpu=2 mem=2048MB ent=0.50 mmode=shared mpsz=4.00GB
Watching AMS on
a single LPAR is
… “insane” Hypervisor Page-ins Faults/s
Time waiting for hypervisor page-ins (in milliseconds)
Dedicated
Memory
LPAR
InUse LPAR Working Set
Inu
Shared memory LPAR
Logical Memory Mem Physical Memory pmem
8 GB 8 GB 10 GB 8 GB
Loan Loan
v
© 2011 IBM
31
v
© 2011 IBM
32
Physical Memory
Tiny 4 KB pages
o
nd
is k
v
© 2011 IBM
33
Logical Memory
Ac
tua
ll
ys
Hypervisor
tor
ed
Blue Physical Loaned Memory
o
nd
Memory Pages To Hypervisor
is k
VIOS