virtual-machine-memory-limits-can-cause-vm-memory-swapping-issues

VM (virtual machine) memory limit can cause VM memory swapping issues

Introduction

When a virtual machine is moved out of a resource pool that had a memory limit, the stand-alone virtual machine can, unknown to the administrator, maintain the mem limit to which it was subjected as a member of the resource pool. Additionally, some administrators configure memory limits thinking — erroneously — that a VM memory limit should be configured to ensure that one virtual machine doesn’t monopolize the RAM on a single host.

Impact

The impact of a VM memory limit is such that virtual machines may not be able to access the memory they need precisely when they need it. If a guest OS cannot access the memory that it needs, any applications running inside the guest OS will perform poorly, may even become unresponsive, or completely fail. Additionally, memory ballooning and vmkernel vm memory swapping may occur in a virtual machine with a mem limit even though the vSphere host may have plenty of RAM available. As is the case in the physical world (when this memory to disk swapping process takes place), the system’s overall performance is negatively impacted in a serious way since disk storage is almost never as fast as RAM. In the virtual world the vmkernel starts VM memory swapping, so writing the RAM content in a .vswp file within the home directory of the VM. That means on the datastore and not the physical RAM, slowing down extreme. A good article about the performance difference can be found here: Troubleshooting VM Performance

Ease of Detection

To find a VM memory limit, you can verify the memory configuration of each virtual machine, checking for memory limits and compare this against the actual memory assigned to a virtual machine. If you have a large number of virtual machines, this can be challenging and an automated tool that can detect memory limits is needed in medium and large virtual infrastructures.

vm memory limit lower than configuration

Benefits to Solving

By removing memory limits, vSphere’s built-in memory optimization techniques can more adequately perform their role and virtual machine guest operating systems can receive the memory that they need to run applications. If the virtual machine’s memory was limited when there was host RAM available, the performance of the application in the guest OS will improve as the guest is then able to access adequate RAM. You just need to select unlimited instead of setting any limit.

VM Memory Limit - vSphere client

Solution

Removing a VM memory limit is easily done by setting the limit back to zero. Unfortunately, finding memory limits can be more challenging than actually removing the limit. Without the right tools, determining whether you have any memory limits configured in your virtual infrastructure, you need to manually look through each virtual machine in your inventory by going into the settings of each virtual machine and verify whether a memory limit is configured. While it’s not difficult, the process can be very time consuming, particularly if you have a great number of virtual machines. Alternatively, you can run a PowerCLI script, like this one, to identify VMs with memory limits.

How opvizor Helps

opvizor helps to quickly and continually notify you of any virtual system that has memory limits and additionally started VM memory swapping. opvizor doesn’t leave you alone with the finding, it provides you with instructions on how to remove them, either from the GUI or using a PowerCLI script.

VM memory limit causes VM memory swapping

Learn more about a typical memory related issues, opvizor automatically finds in minutes:

Sign Up for opvizor!

Author

Thanks David Davis

CNIL
Metrics and Logs

(formerly, Opvizor Performance Analyzer)

VMware vSphere & Cloud
PERFORMANCE MONITORING, LOG ANALYSIS, LICENSE COMPLIANCE!

Monitor and Analyze Performance and Log files:
Performance monitoring for your systems and applications with log analysis (tamperproof using immudb) and license compliance (RedHat, Oracle, SAP and more) in one virtual appliance!

Subscribe to Our Newsletter

Get the latest product updates, company news, and special offers delivered right to your inbox.

Subscribe to our newsletter

Use Case - Tamper-resistant Clinical Trials

Goal:

Blockchain PoCs were unsuccessful due to complexity and lack of developers.

Still the goal of data immutability as well as client verification is a crucial. Furthermore, the system needs to be easy to use and operate (allowing backup, maintenance windows aso.).

Implementation:

immudb is running in different datacenters across the globe. All clinical trial information is stored in immudb either as transactions or the pdf documents as a whole.

Having that single source of truth with versioned, timestamped, and cryptographically verifiable records, enables a whole new way of transparency and trust.

Use Case - Finance

Goal:

Store the source data, the decision and the rule base for financial support from governments timestamped, verifiable.

A very important functionality is the ability to compare the historic decision (based on the past rulebase) with the rulebase at a different date. Fully cryptographic verifiable Time Travel queries are required to be able to achieve that comparison.

Implementation:

While the source data, rulebase and the documented decision are stored in verifiable Blobs in immudb, the transaction is stored using the relational layer of immudb.

That allows the use of immudb’s time travel capabilities to retrieve verified historic data and recalculate with the most recent rulebase.

Use Case - eCommerce and NFT marketplace

Goal:

No matter if it’s an eCommerce platform or NFT marketplace, the goals are similar:

  • High amount of transactions (potentially millions a second)
  • Ability to read and write multiple records within one transaction
  • prevent overwrite or updates on transactions
  • comply with regulations (PCI, GDPR, …)


Implementation:

immudb is typically scaled out using Hyperscaler (i. e. AWS, Google Cloud, Microsoft Azure) distributed across the Globe. Auditors are also distributed to track the verification proof over time. Additionally, the shop or marketplace applications store immudb cryptographic state information. That high level of integrity and tamper-evidence while maintaining a very high transaction speed is key for companies to chose immudb.

Use Case - IoT Sensor Data

Goal:

IoT sensor data received by devices collecting environment data needs to be stored locally in a cryptographically verifiable manner until the data is transferred to a central datacenter. The data integrity needs to be verifiable at any given point in time and while in transit.

Implementation:

immudb runs embedded on the IoT device itself and is consistently audited by external probes. The data transfer to audit is minimal and works even with minimum bandwidth and unreliable connections.

Whenever the IoT devices are connected to a high bandwidth, the data transfer happens to a data center (large immudb deployment) and the source and destination date integrity is fully verified.

Use Case - DevOps Evidence

Goal:

CI/CD and application build logs need to be stored auditable and tamper-evident.
A very high Performance is required as the system should not slow down any build process.
Scalability is key as billions of artifacts are expected within the next years.
Next to a possibility of integrity validation, data needs to be retrievable by pipeline job id or digital asset checksum.

Implementation:

As part of the CI/CD audit functionality, data is stored within immudb using the Key/Value functionality. Key is either the CI/CD job id (i. e. Jenkins or GitLab) or the checksum of the resulting build or container image.

White Paper — Registration

We will also send you the research paper
via email.

CodeNotary — Webinar

White Paper — Registration

Please let us know where we can send the whitepaper on CodeNotary Trusted Software Supply Chain. 

Become a partner

Start Your Trial

Please enter contact information to receive an email with the virtual appliance download instructions.

Start Free Trial

Please enter contact information to receive an email with the free trial details.