Hi Ane-Pieter,
if the box "Assign All System Resources" is checked, then you are right. The VIO LPARs won't start because they will not find any resources.
But if they can start, reducing max memory for the LPARs will reduce the size of memory consumed by hypervisor.
I did a small test now with HMC V10R1SP1020 and IBM Power E1080 9080-HEX FW1010.31.
- Get resource dump of memory consumption and check it, how many LMBs the hypervisor uses:
LpId HvLpEntry@ Group InitLmbs MinLmbs MaxLmbs CurLmbs TargetLmbs UsableLmbs
0 8004000013E81000 *None 1 1 65536 184 212 3
Target LMBs are 212. It is the same memory as it shown in HMC as Reserved Memory, multiplied by LMB size. The LMB size is 256MB in this case.
2. I have a switched off LPAR (without any OS) which is configured to 1GB desired memory and 4GB maximum memory. I changed the maximum memory to 8GB and switched on LPAR into OpenFirmware mode. Then I took another dump:
LpId HvLpEntry@ Group InitLmbs MinLmbs MaxLmbs CurLmbs TargetLmbs UsableLmbs
0 8004000013E81000 *None 1 1 65536 184 214 3
As you can see the number of Target LMBs is increased by 2 LMBs.
3. Then again I switched off the LPAR, changed maximum memory setting back to 4GB, switched on the LPAR into OF mode and then switched off again. Another dump shows that Target LMBs came back to 212:
LpId HvLpEntry@ Group InitLmbs MinLmbs MaxLmbs CurLmbs TargetLmbs UsableLmbs
0 8004000013E81000 *None 1 1 65536 184 212 3
Another test. The same system but another time:
LpId HvLpEntry@ Group InitLmbs MinLmbs MaxLmbs CurLmbs TargetLmbs UsableLmbs
0 8004000013E81000 *None 1 1 65536 186 214 3
I create a new empty LPAR without any I/O resources, just 0.1 CPU, 1GB RAM desired and 4GB RAM maximum. The LPAR is not started:
LpId HvLpEntry@ Group InitLmbs MinLmbs MaxLmbs CurLmbs TargetLmbs UsableLmbs
0 8004000013E81000 *None 1 1 65536 186 216 3
Hypervisor memory consumption is increased by 2 LMBs. I started the LPAR:
LpId HvLpEntry@ Group InitLmbs MinLmbs MaxLmbs CurLmbs TargetLmbs UsableLmbs
0 8004000013E81000 *None 1 1 65536 186 216 3
Memory consumption is the same as it was. Hypervisor reserved the memory during the creation and didn't change it after starting LPAR. Now it is time to shut down the LPAR:
LpId HvLpEntry@ Group InitLmbs MinLmbs MaxLmbs CurLmbs TargetLmbs UsableLmbs
0 8004000013E81000 *None 1 1 65536 186 216 3
LPAR is down but hypervisor still reserves the memory it needs if the LPAR will be started. I delete the LPAR and the memory is freed:
LpId HvLpEntry@ Group InitLmbs MinLmbs MaxLmbs CurLmbs TargetLmbs UsableLmbs
0 8004000013E81000 *None 1 1 65536 186 214 3
Of course it is not "the official IBM method to reduce the hypervisor memory". I am not an IBM employee and it is just experience and what I learned from more experienced colleagues. It may work in your environment but it is not guaranteed. As Frederik and others already wrote, the hypervisor memory consumption may be result of many factors. Not all of them can be changed online or changed at all.
------------------------------
Andrey Klyachkin
https://www.power-devops.com
------------------------------
Original Message:
Sent: Thu March 09, 2023 02:46 AM
From: Ane-Pieter Wieringa
Subject: PowerVM Hypervisor memory
Hi Andrey,
I wonder if, in this case, this is true. The way I read the question is that the definitions of the viosses stil exist. They are not running. That is not possible I guess because the running partion has all the resources. (I assume this partion has the 'Assign All System Resources' box checked in its profile)
My gut feeling is that removing the vios definitions won't free any memory.
------------------------------
Ane-Pieter Wieringa
Original Message:
Sent: Wed March 08, 2023 04:25 AM
From: Andrey Klyachkin
Subject: PowerVM Hypervisor memory
Hi Dave,
even if I don't know a way how to dynamically decrease memory reserved by hypervisor, but there is a small trick. If your VIOs were overdimensioned (max RAM was too high), you can change the memory values in their profiles - let's say 256MB if you don't need them, and then start them from new profiles in OpenFirmware mode. In this moment hypervisor recalculates the reserved memory and you should see it lower. Then you can shutdown your VIOs again if you don't need them. I didn't test on the newest systems (Power10), but it did help with older systems.
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Tue March 07, 2023 09:14 AM
From: Dave Heald
Subject: PowerVM Hypervisor memory
Is it possible to dynamically reduce the reserved memory for Hypervisor? I have a system that was using VIOs that has since been rebuilt as a standalone full system resource partition. Reserved memory is showing as several Gb and could be needed in this environment due to workload, lack of live partition mobility and business outages (so partition can not be moved with an outage).
The previous VIO partitions are still there but not activated. Could removing these reduce reserved hypervisor memory?#
Thanks
------------------------------
Dave Heald
------------------------------