All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel@lists.xen.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: [PATCH 24/27] Recipes and jobs for running unixbench both on host and guest
Date: Wed, 10 Dec 2014 19:12:08 +0100	[thread overview]
Message-ID: <20141210181208.26400.90243.stgit@Abyss.station> (raw)
In-Reply-To: <20141210180651.26400.13356.stgit@Abyss.station>

From: Dario Faggioli <raistlin@linux.it>

Recipes are defined for running unixbench on baremetal,
PV and HVM guests, with similar HW resources. Jobs making
use of those recipes are instantiated too.

Aim is making  investigating performances loss due to
virtualization overhead easy and automatable.

In this case, rebooting the host is necessary (to
boot it baremetal, rather than on Dom0), and that makes
leak checks impossible. A mechanism is therefore introduced
for specifying, in sg-run-job, that for a particular job,
we don't want the leak checks.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 README            |   11 +++++++++++
 make-bench-flight |   20 ++++++++++++++++++++
 sg-run-job        |   33 +++++++++++++++++++++++++++++++--
 3 files changed, 62 insertions(+), 2 deletions(-)

diff --git a/README b/README
index b3880b5..1e777df 100644
--- a/README
+++ b/README
@@ -200,6 +200,17 @@ bench-$BENCHNAME-$ARCH-<XEN_OPTS>-<GUEST_OPTS>
         <GUEST_OPTS> tells about the guest's configuration (e.g., whether
         it's HVM or PV, number of vCPUs, RAM, etc.).
 
+bench-hostcmp-$BENCHNAME-$ARCH-<XEN_OPTS>-<GUEST_OPTS>
+
+        A benchmarking job, for comparing baremetal and guest performances.
+        This runs benchmark $BENCHNAME on a $ARCH baremetal host, and on
+        PV and HVM guests running on a $ARCH hypervisor and dom0.
+
+        In the remainder of the job's name, <XEN_OPTS> tells something
+        about Xen's configuration (e.g., what scheduler will be used);
+        <GUEST_OPTS> tells about the guest's configuration (e.g., whether
+        it's HVM or PV, number of vCPUs, RAM, etc.).
+
 NB: $ARCH (and $XENARCH etc) are Debian arch names, i386, amd64, armhf.
 
 Standalone Mode
diff --git a/make-bench-flight b/make-bench-flight
index 125f244..d41cbbd 100755
--- a/make-bench-flight
+++ b/make-bench-flight
@@ -109,12 +109,32 @@ do_kernbench_tests () {
           all_hostflags=$most_hostflags
 }
 
+do_hostcmp_unixbench_tests () {
+  sched=$1
+
+  # x86_64 only (for now)
+  if [ $xenarch != amd64 ]; then
+    return
+  fi
+  # "homogeneous" tests only (for now)
+  if [ $xenarch != $dom0arch ]; then
+    return
+  fi
+
+  job_create_test \
+          bench-hostcmp-unixbench-$xenarch-$sched bench-hostcmp-unixbench \
+          xl $xenarch $dom0arch xen_boot_append="sched=$sched" max_bench_cpus=16 \
+          max_bench_mem=24576 $debian_runvars bios=seabios unixbench_params="-i 3" \
+          debbenchhvm_image=debian-7.2.0-amd64-CD-1.iso all_hostflags=$most_hostflags
+}
+
 test_matrix_do_one () {
   for s in credit credit2; do
     for t in pv hvm; do
       do_unixbench_tests $t $s 4 4096 # 4 vcpus, 4GB RAM
       do_kernbench_tests $t $s 4 4096
     done
+    do_hostcmp_unixbench_tests $s
   done
 }
 
diff --git a/sg-run-job b/sg-run-job
index 32c94db..5954032 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -30,10 +30,17 @@ proc run-job {job} {
     set anyfailed 0
     jobdb::prepare $job
 
+    set do_leak_check 1
     set nh [need-hosts/$jobinfo(recipe)]
     if {![string compare $nh BUILD]} {
         set need_xen_hosts {}
         set need_build_host 1
+    } elseif {[string match REBOOT* $nh]} {
+        # no leak checks for tests that reboot the host
+        set do_leak_check 0
+        set nh [lreplace $nh 0 0]
+        set need_xen_hosts $nh
+        set need_build_host 0
     } else {
         set need_xen_hosts $nh
         set need_build_host 0
@@ -54,10 +61,10 @@ proc run-job {job} {
     per-host-ts .       xen-install/@     ts-xen-install
     per-host-ts .       xen-boot/@        ts-host-reboot
 
-    per-host-ts .       =(*)             {ts-leak-check basis}
+    if {$do_leak_check} {per-host-ts . =(*) {ts-leak-check basis}         }
 
     if {$ok} { catching-otherwise fail      run-job/$jobinfo(recipe)      }
-    per-host-ts .       =                {ts-leak-check check}
+    if {$do_leak_check} {per-host-ts . = {ts-leak-check check}            }
 
     if {!$need_build_host} {
         per-host-ts !broken capture-logs/@(*) ts-logs-capture
@@ -381,6 +388,28 @@ proc run-job/bench-kernbench-hvm {} {
     bench-kernbench-guest debianhvm
 }
 
+proc need-hosts/bench-hostcmp-unixbench {} { return {REBOOT host} }
+proc run-job/bench-hostcmp-unixbench {} {
+    # Run benchmark in a PV guest
+    set g debbenchpv
+    run-ts . = ts-debian-install           + host $g
+    run-ts . = ts-debian-fixup             + host $g
+    run-ts . = ts-bench-hostcmp-guest-prep + host $g
+    bench-unixbench-guest $g
+    # Run benchmark in an HVM guest
+    set g debbenchhvm
+    run-ts . = ts-debian-hvm-install       + host $g
+    run-ts . = ts-guest-stop               + host $g
+    run-ts . = ts-bench-hostcmp-guest-prep + host $g
+    bench-unixbench-guest $g
+    # Run benchmark on the host
+    run-ts . = ts-bench-hostcmp-host-prep
+    run-ts . = ts-host-reboot
+    bench-unixbench-host
+    run-ts . = ts-bench-hostcmp-post
+    run-ts . = ts-host-reboot
+}
+
 #---------- builds ----------
 
 proc need-hosts/build {} { return BUILD }

  parent reply	other threads:[~2014-12-10 18:12 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10 18:08 [PATCH 00/27] Running benchmarks via OSSTest Dario Faggioli
2014-12-10 18:09 ` [PATCH 01/27] ts-devbian-hvm-install: prune "cdrom:" from install sources Dario Faggioli
2014-12-10 18:09 ` [PATCH 02/27] Osstest/Debian.pm: fix identifying a Linux baremetal grub2 entry Dario Faggioli
2014-12-10 18:09 ` [PATCH 03/27] Guest setup: allow the amount of RAM to be a runvar Dario Faggioli
2014-12-11 12:05   ` Wei Liu
2014-12-11 12:57     ` Dario Faggioli
2014-12-11 13:06       ` Wei Liu
2014-12-10 18:09 ` [PATCH 04/27] Osstest/TestSupport.pm: Introduce target_getfile_[root_]stash() Dario Faggioli
2014-12-10 18:09 ` [PATCH 05/27] mg-unixbench-download: new script for downloading the unixbench archive Dario Faggioli
2014-12-10 18:09 ` [PATCH 06/27] ts-unixbench-build: prep the environment for running unixbench Dario Faggioli
2014-12-10 18:09 ` [PATCH 07/27] ts-unixbench-run: kick off the benchmark on the target Dario Faggioli
2014-12-10 18:09 ` [PATCH 08/27] ts-unixbench-reslts: for retrieving the results Dario Faggioli
2014-12-11 12:09   ` Wei Liu
2014-12-11 12:59     ` Dario Faggioli
2014-12-10 18:10 ` [PATCH 09/27] ts-unixbench-reslts: process and plot bench results Dario Faggioli
2014-12-11 12:15   ` Wei Liu
2014-12-11 13:11     ` Dario Faggioli
2014-12-11 13:16       ` Wei Liu
2014-12-10 18:10 ` [PATCH 10/27] sg-run-job: recipes for the unixbench jobs Dario Faggioli
2014-12-10 18:10 ` [PATCH 11/27] make-bench-flight: to create a benchmarking flight Dario Faggioli
2014-12-10 18:10 ` [PATCH 12/27] standalone-reset: introduce a new -t option Dario Faggioli
2014-12-10 18:10 ` [PATCH 13/27] mg-kernbench-download: new script for downloading kernbench Dario Faggioli
2014-12-10 18:10 ` [PATCH 14/27] ts-kernbench-build: prep the environment for running kernbench Dario Faggioli
2014-12-10 18:10 ` [PATCH 15/27] ts-kernbench-run: kick off the benchmark on the target Dario Faggioli
2014-12-10 18:11 ` [PATCH 16/27] ts-unixbench-reslts: retrieve and stash kernbench results Dario Faggioli
2014-12-10 18:11 ` [PATCH 17/27] ts-kernbench-reslts: process and plot bench results Dario Faggioli
2014-12-11 13:19   ` Dario Faggioli
2014-12-10 18:11 ` [PATCH 18/27] sg-run-job: recipes for the kernbench jobs Dario Faggioli
2014-12-10 18:11 ` [PATCH 19/27] make-bench-flight: create " Dario Faggioli
2014-12-10 18:11 ` [PATCH 20/27] Osstest/TestSupport.pm: read hosts' hardware characteristics Dario Faggioli
2014-12-10 18:11 ` [PATCH 21/27] ts-bench-hostcmp-guest-prep: new script Dario Faggioli
2014-12-10 18:11 ` [PATCH 22/27] ts-bench-hostcmp-host-prep: " Dario Faggioli
2014-12-11 12:32   ` Wei Liu
2014-12-11 13:23     ` Dario Faggioli
2014-12-10 18:12 ` [PATCH 23/27] ts-bench-hostcmp-host-reset: " Dario Faggioli
2014-12-11 13:20   ` Dario Faggioli
2014-12-10 18:12 ` Dario Faggioli [this message]
2014-12-10 18:12 ` [PATCH 25/27] ts-bench-hostcmp-post: add plotting facilities Dario Faggioli
2014-12-10 18:12 ` [PATCH 26/27] Kernbench perf comparison between host and guest Dario Faggioli
2014-12-10 18:12 ` [PATCH 27/27] ts-bench-hostcmp-post: add plotting facilities Dario Faggioli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141210181208.26400.90243.stgit@Abyss.station \
    --to=dario.faggioli@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.