mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
f97f9037df
commit
b3795a470f
@ -58,3 +58,12 @@
|
||||
#
|
||||
# Timeout to wait a cgroup to be empty after shutdown/cancel a microVM
|
||||
:cgroup_delete_timeout: 60
|
||||
|
||||
################################################################################
|
||||
# NUMA placement Options
|
||||
################################################################################
|
||||
#
|
||||
# Policy to schedule microVMs accross NUMA nodes. Available options:
|
||||
# - "rr": schedule the microVMs in a RR way across NUMA nodes based on the VM id.
|
||||
# - "random": schedule the microVMs randomly across NUMA nodes.
|
||||
:numa_policy: 'random'
|
||||
|
@ -32,7 +32,8 @@ class FirecrackerConfiguration < Hash
|
||||
:gid => 9869,
|
||||
:shutdown_timeout => 10,
|
||||
:cgroup_location => '/sys/fs/cgroup',
|
||||
:cgroup_delete_timeout => 10
|
||||
:cgroup_delete_timeout => 10,
|
||||
:numa_policy => 'random'
|
||||
}
|
||||
|
||||
FIRECRACKERRC = '../../etc/vmm/firecracker/firecrackerrc'
|
||||
@ -258,9 +259,23 @@ class OpenNebulaVM
|
||||
|
||||
nodes = nodes.split("\n")
|
||||
|
||||
case @fcrc[:numa_policy].downcase
|
||||
when 'rr'
|
||||
rr_policy(nodes)
|
||||
when 'random'
|
||||
random_policy(nodes)
|
||||
else
|
||||
random_policy(nodes)
|
||||
end
|
||||
end
|
||||
|
||||
def rr_policy(nodes)
|
||||
Integer(nodes[@vm_id % nodes.size].gsub('node', ''))
|
||||
end
|
||||
|
||||
def random_policy(nodes)
|
||||
Integer(nodes.sample.gsub('node', ''))
|
||||
end
|
||||
#---------------------------------------------------------------------------
|
||||
# Container Mapping: Extra Configuration & Profiles
|
||||
#---------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user