aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rumba/testbeds/qemu.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/rumba/testbeds/qemu.py b/rumba/testbeds/qemu.py
index b42cf5d..3573554 100644
--- a/rumba/testbeds/qemu.py
+++ b/rumba/testbeds/qemu.py
@@ -157,9 +157,9 @@ class Testbed(mod.Testbed):
boot_batch_size = max(1, multiprocessing.cpu_count() // 2)
booting_budget = boot_batch_size
- boot_backoff = 12
+ boot_backoff = 12 # in seconds
base_port = 2222
- vm_memory = 164
+ vm_memory = 164 # in megabytes
vm_frontend = 'virtio-net-pci'
vmid = 1
@@ -220,7 +220,7 @@ class Testbed(mod.Testbed):
booting_budget -= 1
if booting_budget <= 0:
- print('Sleeping for %s seconds to give the machines time to boot up.' % boot_backoff)
+ print('Sleeping %s secs waiting for the VMs to boot' % boot_backoff)
time.sleep(boot_backoff)
booting_budget = boot_batch_size
@@ -231,6 +231,14 @@ class Testbed(mod.Testbed):
vmid += 1
+ # Wait for the last batch of VMs to start
+ if booting_budget < boot_backoff:
+ tsleep = boot_backoff * (boot_batch_size - booting_budget) / \
+ boot_batch_size
+ print('Sleeping %s secs waiting for the last VMs to boot' % tsleep)
+ time.sleep(tsleep)
+
+
def swap_out(self, experiment):
"""
:rtype str