How to determine the memory allocated to the VMware Balloon driver [vmw_balloon] (shipped with RHEL) from vmcore?
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- VMware Virtual Platform
- VMware balloon module [
vmw_balloon
] or [vmware_balloon
]
Issue
- How to determine the memory allocated to the VMware Balloon driver [
vmw_balloon
] (shipped with RHEL) from vmcore?
Resolution
-
The memory allocated to VMware Balloon driver (shipped with RHEL) can be determined from the "
struct vmballoon->size
" and "struct vmballoon->target
" variables. -
The "
struct vmballoon->size
" variable contains the amount of memory consumed by VMware Balloon driver [vmw_balloon
] in pages.crash> struct vmballoon.size -ox struct vmballoon { [0x54] unsigned int size; }
-
The "
struct vmballoon->target
" variable contains the amount of memory VMware Balloon driver [vmw_balloon
] is going to consume in pages.crash> struct vmballoon.target -ox struct vmballoon { [0x58] unsigned int target; }
Steps to determine the memory allocated to VMware Balloon driver [vmw_balloon
] from vmcore:
-
Load symbolic and debugging data from the object file of [
vmw_balloon
] module (i.e., vmw_balloon.ko.debug) in crash. Note: For RHEL 6 use the VMware Balloon driver name [vmware_balloon
] (i.e.,mod -s vmware_balloon
).crash> mod -s vmw_balloon Eg: crash> mod -s vmw_balloon MODULE NAME BASE SIZE OBJECT FILE ffffffffc05c0340 vmw_balloon ffffffffc05bc000 24576 /usr/lib/debug/lib/modules/4.18.0-425.19.2.el8_7.x86_64/kernel/drivers/misc/vmw_balloon.ko.debug
-
Determine the value of
struct vmballoon->size
variable using the address of symbolballoon
.crash> sym balloon ffffffffc05c06c0 (b) balloon [vmw_balloon] crash> pd balloon.size $1 = 2721049 (pages) OR crash> struct vmballoon.size balloon size = 2721049 (pages) crash> !bc -q scale=2 2721049*4/2^20 10.37 (GiB)
- In the above example, the amount of memory consumed by VMware Balloon driver [vmw_balloon] is 10.37 GiB (2721049 pages).
-
Determine the value of
struct vmballoon->target
variable using the address of symbolballoon
.crash> sym balloon ffffffffc05c06c0 (b) balloon [vmw_balloon] crash> pd balloon.target $2 = 3177311 (pages) OR crash> struct vmballoon.target balloon target = 3177311 (pages) crash> !bc -q scale=2 3177311*4/2^20 12.12 (GiB)
- In the above example, the amount of memory needed by VMware Balloon driver [vmw_balloon] is 12.12 GiB (3177311 pages).
Note:
- You can check the same by using
debugfs
: How to find out what amount of memory a VMWare balloon driver has consumed from a virtualized server
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments