Skip to content

Commit 3f4292a

Browse files
authored
Merge pull request #163 from newkit/re-add_cpuflags
sap_vm_provision/kubevirt_vm: Add cpu flags and hugepages to vars file and playbook
2 parents 9a19ab9 + 5c4c396 commit 3f4292a

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

playbooks/vars/sample-variables-sap-vm-provision-redhat-ocpv.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,32 @@ sap_vm_provision_execution_host: localhost # on AAP, this is localhost
3030
# What's the host specification plan that should be rolled out?
3131
sap_vm_provision_host_specification_plan: example_host_specification_plan
3232

33+
# CPU performance settings which are applied to VM
34+
# Note: Using dedicatedCpuPlacement=true together with numa.guestMappingPassthrough requires also usage of huge pages
35+
sap_vm_provision_kubevirt_vm_performance_cpu_settings:
36+
dedicatedCpuPlacement: true
37+
model: host-passthrough
38+
numa:
39+
guestMappingPassthrough: {}
40+
features:
41+
- name: x2apic
42+
policy: require
43+
- name: rdtscp
44+
policy: require
45+
- name: invtsc
46+
policy: require
47+
3348
sap_vm_provision_kubevirt_vm_host_specifications_dictionary:
3449
example_host_specification_plan:
3550
host1: # Hostname, must be 13 characters or less
3651
# SMT-2 (i.e. 2 CPU Threads per CPU Core) is default for Intel CPU Hyper-Threading, optionally can be altered to SMT-1
3752
kubevirt_vm_cpu_smt: 2
3853
kubevirt_vm_cpu_cores: 2
3954
kubevirt_vm_memory_gib: 24
55+
# Defines size of huge pages for kubervirt hypervisor (e.g. '2Mi' or '1Gi')
56+
# This can be disabled by setting value to false. The default value is '1Gi'.
57+
# When set to false, remove NUMA and dedicatedCpuPlacement from sap_vm_provision_kubevirt_vm_performance_cpu_settings
58+
kubevirt_vm_memory_hypervisor_hugepages: '1Gi'
4059
sap_system_type: project_dev # project_dev, project_tst, project_prd
4160
sap_host_type: hana_primary # hana_primary, hana_secondary, anydb_primary, anydb_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas
4261
# Provide either an existing PVC or a URL for an OS image

roles/sap_vm_provision/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ sap_vm_provision_kubevirt_vm_os_user_password: ""
823823
sap_vm_provision_kubevirt_vm_container_memory_overhead: 1
824824

825825
# CPU performance settings which are applied to VM
826+
# Note: Using dedicatedCpuPlacement=true together with numa.guestMappingPassthrough requires also usage of huge pages
826827
sap_vm_provision_kubevirt_vm_performance_cpu_settings:
827828
dedicatedCpuPlacement: true
828829
model: host-passthrough

0 commit comments

Comments
 (0)