-
Notifications
You must be signed in to change notification settings - Fork 55
Hybrid VMs at large scale improvements #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-bot
merged 5 commits into
redhat-performance:main
from
afcollins:hv-hugepages
Feb 27, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2aa0c0f
Add switches for vNUMA and SR-IOV devices
afcollins 350312c
Removed vm_hugepages_size. Coded to 1Gi pages.
afcollins c7f75f1
Remove blurb for vm playbooks in other PR. Docs update
afcollins 4e74118
Update deployment guide for Multi-Node OpenShift Hybrid in ScaleLab
afcollins 1f309ad
Remove vm_hugepage_count as it is confusing.
afcollins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| # hv-install default vars | ||
|
|
||
| # Hugepages configuration for hypervisors | ||
| enable_hugepages: false | ||
|
|
||
| # Hugepage size: 2M or 1G | ||
| hugepage_size: "1G" | ||
|
|
||
| # Number of hugepages to allocate (e.g., 32 for 32GB of 1G hugepages) | ||
| hugepage_count: 32 | ||
|
|
||
| # Additional kernel parameters for performance tuning | ||
| additional_kernel_params: [] | ||
|
|
||
| # Number of hugepages per node (e.g. total / 2) | ||
| hugepages_count_per_node: 190 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
ansible/roles/hv-install/templates/hugetlb-reserve-pages.sh.j2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/bin/sh | ||
|
|
||
| nodes_path=/sys/devices/system/node/ | ||
| if [ ! -d $nodes_path ]; then | ||
| echo "ERROR: $nodes_path does not exist" | ||
| exit 1 | ||
| fi | ||
|
|
||
| reserve_pages() | ||
| { | ||
| echo $1 > $nodes_path/$2/hugepages/hugepages-1048576kB/nr_hugepages | ||
| } | ||
|
|
||
| reserve_pages {{ hugepages_count_per_node }} node0 | ||
| reserve_pages {{ hugepages_count_per_node }} node1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Deploy Multi-Node OpenShift Hybrid in ScaleLab | ||
|
|
||
| This guide describes how to deploy a hybrid Multi-Node OpenShift (MNO) cluster in ScaleLab: some nodes are bare metal and some are virtual machines (VMs). | ||
|
|
||
| ## 1. Configure Ansible variables in `all.yml` | ||
|
|
||
| Set up `all.yml` the same way as for a standard ScaleLab allocation. Then add these variables: | ||
|
|
||
| ``` | ||
| cluster_type: mno # Use "mno" (not "vmno"). MNO allows bare metal nodes; VMNO does not. | ||
| hv_inventory: true | ||
| hv_ssh_pass: <hv-password> | ||
| hybrid_worker_count: 123 # Total number of VM workers you want. | ||
| ``` | ||
|
|
||
| **Why use two phases?** | ||
| First you install a small cluster and confirm it works. Then you add the VM workers. Doing it in two steps makes it easier to find and fix problems: issues from the first install are separate from issues when creating many VMs. | ||
|
|
||
| ## 2. Run the playbooks | ||
|
|
||
| ### Phase 1: Install a small cluster (3 control-plane + 3 workers) | ||
|
|
||
| 1. In `all.yml`, set `hybrid_worker_count: 0`. | ||
| 2. Run the `create-inventory.yml` playbook. | ||
| 3. Run the `mno-deploy.yml` playbook. | ||
| 4. Run the `hv-setup.yml` playbook. | ||
|
|
||
| ### Phase 2: Add the VM workers | ||
|
|
||
| 1. In `all.yml`, set `hybrid_worker_count: 123`. | ||
| 2. Run the `create-inventory.yml` playbook. | ||
| 3. Open the inventory file at `ansible/inventory/cloudXX.local`. Check: | ||
| - **`[worker]`**: It should list the bare metal workers and the correct number of VMs to create. | ||
| - **`[hv_vm]`**: It should list the expected number of VMs with the right CPU, memory, and disk. Confirm how many VMs are assigned to each hypervisor (HV). This ratio is set by machine type in `hw_vm_counts` in `lab.yml`. | ||
| 4. Run the `hv-vm-create.yml` playbook. For more about this playbook, see [Virtual MultiNode OpenShift](deploy-vmno.md). | ||
| 5. Run the `ocp-scale-out.yml` playbook. For more about this playbook, see [Scale out a Multi-Node OpenShift deployment](scale-out-mno.md). | ||
|
|
||
| ## Command reference | ||
|
|
||
| ### create-inventory.yml | ||
|
|
||
| ```console | ||
| (.ansible) [root@<bastion> jetlag]# ansible-playbook ansible/create-inventory.yml | ||
| ``` | ||
|
|
||
| ### hv-setup.yml | ||
|
|
||
| ```console | ||
| (.ansible) [root@<bastion> jetlag]# ansible-playbook -i ansible/inventory/cloud99.local ansible/hv-setup.yml | ||
| ``` | ||
|
|
||
| ### hv-vm-create.yml | ||
|
|
||
| ```console | ||
| (.ansible) [root@<bastion> jetlag]# ansible-playbook -i ansible/inventory/cloud99.local ansible/hv-vm-create.yml | ||
| ``` | ||
|
|
||
| ### mno-deploy.yml | ||
|
|
||
| ```console | ||
| (.ansible) [root@<bastion> jetlag]# ansible-playbook -i ansible/inventory/cloud99.local ansible/mno-deploy.yml | ||
| ``` | ||
|
|
||
| ### ocp-scale-out.yml | ||
|
|
||
| ```console | ||
| (.ansible) [root@<bastion> jetlag]# ansible-playbook -i ansible/inventory/cloud99.local ansible/ocp-scale-out.yml | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.