Increase maximum number of VNC ports
A message that is not in the archive (sent off-list or not yet received): [KVM_AUTOTEST][PATCH] KSM_overcommit: dynamic reserve calculation
(2)
A message that is not in the archive (sent off-list or not yet received): [KVM_AUTOTEST][PATCH] KSM_overcommit: dynamic reserve
calculation (2)
PATCH 1/4 Increase maximum number of VNC ports
--- client/tests/kvm/kvm_vm.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/kvm_vm.py +1 -1
@@ -396,7 +396,7 @@ class VM: # Find available VNC port, if needed if params.get("display") == "vnc": - self.vnc_port = kvm_utils.find_free_port(5900, 6000) + self.vnc_port = kvm_utils.find_free_port(5900, 6100) # Find random UUID if specified 'uuid = random' in config file if params.get("uuid") == "random":
Signature · 1 line
1.6.2.5
Quoted 1 line · Lukas Doktor
Signed-off-by Lukas Doktor <[email protected]>
The new patch set looks good, commited them all, see:
http://autotest.kernel.org/changeset/4492
Thanks!
Quoted 17 lines
--- client/tests/kvm/kvm_vm.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)client/tests/kvm/kvm_vm.py +1
-1@@ -396,7 +396,7 @@ class VM: # Find available VNC port, if needed if params.get("display") == "vnc": - self.vnc_port = kvm_utils.find_free_port(5900, 6000) + self.vnc_port = kvm_utils.find_free_port(5900, 6100) # Find random UUID if specified 'uuid = random' in config file if params.get("uuid") == "random":
PATCH 2/4 Add VMs alive check while spliting the guest's pages
In reply to a message not in the archive--- client/tests/kvm/tests/ksm_overcommit.py | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
client/tests/kvm/tests/ksm_overcommit.py +10 -0
@@ -142,6 +142,12 @@ def run_ksm_overcommit(test, params, env): session = None vm = None for i in range(1, vmsc): + # Check VMs + for j in range(0, vmsc): + if not lvms[j].is_alive: + e_msg = "VM %d died while executing static_random_fill in"\ + " VM %d on allocator loop" % (j, i) + raise error.TestFail(e_msg) vm = lvms[i] session = lsessions[i] a_cmd = "mem.static_random_fill()"
@@ -154,6 +160,10 @@ def run_ksm_overcommit(test, params, env): logging.debug("Watching host memory while filling vm %s memory", vm.name) while not out.startswith("PASS") and not out.startswith("FAIL"): + if not vm.is_alive(): + e_msg = "VM %d died while executing static_random_fill"\ + " on allocator loop" % i + raise error.TestFail(e_msg) free_mem = int(utils.read_from_meminfo("MemFree")) if (ksm_swap): free_mem = (free_mem +
Signature · 1 line
1.6.2.5
PATCH 3/4 FIX: Incorrect session in function split_guest()
In reply to a message not in the archive--- client/tests/kvm/tests/ksm_overcommit.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/tests/ksm_overcommit.py +1 -1
@@ -212,7 +212,7 @@ def run_ksm_overcommit(test, params, env): # Verify last machine with randomly generated memory a_cmd = "mem.static_random_verify()" - _execute_allocator(a_cmd, lvms[last_vm], session, + _execute_allocator(a_cmd, lvms[last_vm], lsessions[last_vm], (mem / 200 * 50 * perf_ratio)) logging.debug(kvm_test_utils.get_memory_info([lvms[last_vm]]))
Signature · 1 line
1.6.2.5
PATCH 4/4 guest_reserve, host_reserve and tmpfs overhead automatic calculation based on used memory
In reply to a message not in the archive--- client/tests/kvm/scripts/allocator.py | 11 +++++--- client/tests/kvm/tests/ksm_overcommit.py | 41 +++++++++++++++++++++++++++--- client/tests/kvm/tests_base.cfg.sample | 6 ++-- 3 files changed, 47 insertions(+), 11 deletions(-)
client/tests/kvm/scripts/allocator.py +7 -4
@@ -8,10 +8,12 @@ Auxiliary script used to allocate memory on guests. """ -import os, array, sys, struct, random, copy, inspect, tempfile, datetime +import os, array, sys, struct, random, copy, inspect, tempfile, datetime, math PAGE_SIZE = 4096 # machine page size +TMPFS_OVERHEAD = 0.0022 # overhead on 1MB of write data + class MemFill(object): """
@@ -32,7 +34,8 @@ class MemFill(object): self.tmpdp = tempfile.mkdtemp() ret_code = os.system("mount -o size=%dM tmpfs %s -t tmpfs" % - ((mem + 25), self.tmpdp)) + ((mem+math.ceil(mem*TMPFS_OVERHEAD)), + self.tmpdp)) if ret_code != 0: if os.getuid() != 0: print ("FAIL: Unable to mount tmpfs "
@@ -42,7 +45,7 @@ class MemFill(object): else: self.f = tempfile.TemporaryFile(prefix='mem', dir=self.tmpdp) self.allocate_by = 'L' - self.npages = (mem * 1024 * 1024) / PAGE_SIZE + self.npages = ((mem * 1024 * 1024) / PAGE_SIZE) self.random_key = random_key self.static_value = static_value print "PASS: Initialization"
@@ -83,7 +86,7 @@ class MemFill(object): @return: return array of bytes size PAGE_SIZE. """ a = array.array("B") - for i in range(PAGE_SIZE / a.itemsize): + for i in range((PAGE_SIZE / a.itemsize)): try: a.append(value) except:
client/tests/kvm/tests/ksm_overcommit.py +37 -4
69 lines not on this page · raw message
client/tests/kvm/tests_base.cfg.sample +3 -3
@@ -305,9 +305,9 @@ variants: ksm_overcommit_ratio = 3 # Max paralel runs machine ksm_parallel_ratio = 4 - # Host memory reserve - ksm_host_reserve = 512 - ksm_guest_reserve = 1024 + # Host memory reserve (default - best fit for used mem) + # ksm_host_reserve = 512 + # ksm_guest_reserve = 1024 variants: - ksm_serial: ksm_mode = "serial"
Signature · 1 line
1.6.2.5
A message that is not in the archive (sent off-list or not yet received): [KVM_AUTOTEST][PATCH] KSM_overcommit: dynamic reserve calculation (2)
PATCH 1/1 KSM_overcommit: dynamic reserve calculation (2)
Hi,
thanks for nice page about git workflow. I always wanted to try it but never had the time to sit down and learn...
Booth the TMPFS and 0.055 guest_reserve constant are set empirically using various RHEL and Fedora guest/hosts. Smaller hosts can work with smaller (0.045) constant but we didn't want to make the code more complex to exactly fit the limits.
Original changelog:
* NEW: guest_reserve and host_reserve are now calculated based on used memory
* NEW: tmpfs reserve is also evaluated to fit the overhead
* NEW: VM alive check during split_guest()
* FIX: In function split_guest() we used incorrect session
* MOD: Increase number of VNC ports
Best regards,
Lukas
Re: [Autotest] [KVM_AUTOTEST][PATCH] KSM_overcommit: dynamic reserve calculation (2)
Hi Lukas and Jiri - please hold on, cause this week I'm on vacation, will be back next week and will finish work on your patchset.
Cheers,
Quoted 22 lines · Lukas Doktor
Hi,
thanks for nice page about git workflow. I always wanted to try it but never had the time to sit down and learn...
Booth the TMPFS and 0.055
guest_reserveconstant are set empirically using various RHEL and Fedora guest/hosts. Smaller hosts can work with smaller (0.045) constant but we didn't want to make the code more complex to exactly fit the limits.Original changelog:
* NEW:guest_reserveandhost_reserveare now calculated based on used memory
* NEW: tmpfs reserve is also evaluated to fit the overhead
* NEW: VM alive check duringsplit_guest()
* FIX: In functionsplit_guest()we used incorrect session
* MOD: Increase number of VNC portsBest regards,
Lukas_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
Signature · 1 line
Lucas