virtbench now has xen support
Hi all,
I've been working on a set of easy-to-run benchmarks for hypervisor
optimization called virtbench, and the latest commit adds Xen support.
http://ozlabs.org/~rusty/virtbench
http://ozlabs.org/~rusty/virtbench/?archive/tip.tar.bz2
Quoted 1 line
From the README:
# Build the code
make
# Set the guest kernel location and maybe more vi ./SETTINGS
# Run the benchmark (local mode) ./virtbench local
# Run the benchmark (kvm mode)
sudo ./virtbench kvm
# Run the benchmark (Xen mode)
sudo ./virtbench xen
# Run the benchmark (lguest mode) sudo ./virtbench lguest
Feedback welcome!
Rusty.
Hi Rusty,
thanks for your work. I tried your benchmark on my XEN installation.
<xm info>
release : 2.6.18-1.2835.slc4xen
version : #1 SMP Wed Nov 29 21:05:58 CET 2006
machine : i686nr_cpus : 2nr_nodes : 1sockets_per_node : 2cores_per_socket : 1threads_per_core : 1cpu_mhz : 2800hw_caps : bfebfbff:20000000:00000000:00000180:0000641dtotal_memory : 2047free_memory : 1024xen_major : 3xen_minor : 0xen_extra : .3-rc5-1.2835.sxen_caps : xen-3.0-x86_32pxen_pagesize : 4096platform_params : virt_start=0xf5800000xen_changeset : unavailablecc_compiler : gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)cc_compile_by : rootcc_compile_date : Wed Nov 29 20:56:00 CET 2006xend_config_format : 2
</xm info>
and ended up in the following error.
<make error>
[root@lxdev19 virtbench-bd8e67e50775]# make
cc -g -Wall -Wmissing-prototypes -DNUM_MACHINES=4 -o virtbench server.c results.c stdrusty.c talloc.c micro/context-switch.c micro/cow.c micro/exec.c micro/fork.c micro/host-net-bandwidth.c micro/int-syscall.c micro/libc-syscall.c micro/memburn.c micro/pio.c micro/pte-update.c micro/read-bandwidth.c micro/read-latency.c micro/vmcall.c inter/bandwidth.c inter/pingpong.c inter/sendfile.c inter/udp-bandwidth.c micro/pte-update.c: In function `do_pte_update':micro/pte-update.c:45: error: too many arguments to function `mremap'
make: *** [virtbench] Error 1
</make error>
So first thing I would like to know if my XEN installation is compatible with your benchmark suite and if not which are the requirements?
Thank you for your help and support,
Jan Michael
Quoted 31 lines · Rusty Russell
Hi all,
I've been working on a set of easy-to-run benchmarks for hypervisor
optimization called virtbench, and the latest commit adds Xen support.http://ozlabs.org/~rusty/virtbench
http://ozlabs.org/~rusty/virtbench/?archive/tip.tar.bz2Quoted 1 line
From the README:
# Build the code
make
# Set the guest kernel location and maybe more vi ./SETTINGS
# Run the benchmark (local mode) ./virtbench local
# Run the benchmark (kvm mode)
sudo ./virtbench kvm
# Run the benchmark (Xen mode)
sudo ./virtbench xen
# Run the benchmark (lguest mode) sudo ./virtbench lguestFeedback welcome!
Rusty._______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 32 lines · Jan Michael
Hi Rusty,
thanks for your work. I tried your benchmark on my XEN installation.
<xm info>
release : 2.6.18-1.2835.slc4xen
version : #1 SMP Wed Nov 29 21:05:58 CET 2006
machine : i686nr_cpus: 2nr_nodes: 1sockets_per_node: 2cores_per_socket: 1threads_per_core: 1cpu_mhz: 2800hw_caps: bfebfbff:20000000:00000000:00000180:0000641dtotal_memory: 2047free_memory: 1024xen_major: 3xen_minor: 0xen_extra: .3-rc5-1.2835.sxen_caps: xen-3.0-x86_32pxen_pagesize: 4096platform_params: virt_start=0xf5800000xen_changeset: unavailablecc_compiler: gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)cc_compile_by: rootcc_compile_date: Wed Nov 29 20:56:00 CET 2006xend_config_format: 2
</xm info>and ended up in the following error.
Quoted 7 lines
<make error>
[root@lxdev19 virtbench-bd8e67e50775]# make
cc -g -Wall -Wmissing-prototypes -DNUM_MACHINES=4 -o virtbenchserver.cresults.cstdrusty.ctalloc.cmicro/context-switch.cmicro/cow.cmicro/exec.cmicro/fork.cmicro/host-net-bandwidth.cmicro/int-syscall.cmicro/libc-syscall.cmicro/memburn.cmicro/pio.cmicro/pte-update.cmicro/read-bandwidth.cmicro/read-latency.cmicro/vmcall.cinter/bandwidth.cinter/pingpong.cinter/sendfile.cinter/udp-bandwidth.cmicro/pte-update.c: In function `do_pte_update':micro/pte-update.c:45: error: too many arguments to function `mremap'
make: *** [virtbench] Error 1
</make error>
I've just pushed an update that should disable this test for older versions of glibc. Would appreciate if you let me know whether this fixed your build.
Regards,
Anthony Liguori
Quoted 40 lines
So first thing I would like to know if my XEN installation is compatible with your benchmark suite and if not which are the requirements?
Thank you for your help and support,
Jan Michael
Quoted 31 lines · Rusty Russell
Hi all,
I've been working on a set of easy-to-run benchmarks for hypervisor
optimization called virtbench, and the latest commit adds Xen support.http://ozlabs.org/~rusty/virtbench
http://ozlabs.org/~rusty/virtbench/?archive/tip.tar.bz2Quoted 1 line
From the README:
# Build the code
make
# Set the guest kernel location and maybe more vi ./SETTINGS
# Run the benchmark (local mode) ./virtbench local
# Run the benchmark (kvm mode)
sudo ./virtbench kvm
# Run the benchmark (Xen mode)
sudo ./virtbench xen
# Run the benchmark (lguest mode)
sudo ./virtbench lguestFeedback welcome!
Rusty._______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi Anthony,
Quoted 1 line · Anthony Liguori
I've just pushed an update that should disable this test for older versions of glibc. Would appreciate if you let me know whether this fixed your build.
That did the trick. Virtbench was sucessfully build on my system. I was also able to run virtbench in local mode but when I tried to run virtbench for xen I got the following error:
<error>
[root@lxdev19 virtbench-44dc217a9422]# KERNEL="/etc/xen/vmlinuz" ./virtbench xen --progress
virtbench: Start command failed for xen
</error>
I already tried to investigate this error viewing the virtbench logfile which I specified in SETTINGS file. But the logfile was not created :-(.
What can I do to get your benchmark work for my XEN installation?
Thanks,
Jan
Quoted 17 lines · Jan Michael
Hi Anthony,
Quoted 3 lines · Anthony Liguori
I've just pushed an update that should disable this test for older versions of glibc. Would appreciate if you let me know whether this fixed your build.
That did the trick. Virtbench was sucessfully build on my system. I was also able to run virtbench in local mode but when I tried to run virtbench for xen I got the following error:
<error>
[root@lxdev19 virtbench-44dc217a9422]# KERNEL="/etc/xen/vmlinuz" ./ virtbench xen --progress
virtbench: Start command failed for xen
</error>
Quoted 3 lines
I already tried to investigate this error viewing the virtbench logfile which I specified in SETTINGS file. But the logfile was not created :-(.
This is a failure of the "xen/start" command. I had this happen when "/etc/init.d/xend restart" failed. You can probably comment that line out if you're already running Xen (perhaps xen's init scripts are flaky).
Thanks for the report!
Rusty.
Hi Rusty,
Quoted 18 lines · Rusty Russell
Quoted 17 lines · Jan Michael
Hi Anthony,
Quoted 3 lines · Anthony Liguori
I've just pushed an update that should disable this test for older versions of glibc. Would appreciate if you let me know whether this fixed your build.
That did the trick. Virtbench was sucessfully build on my system. I was also able to run virtbench in local mode but when I tried to run virtbench for xen I got the following error:
<error>
[root@lxdev19 virtbench-44dc217a9422]# KERNEL="/etc/xen/vmlinuz" ./ virtbench xen --progress
virtbench: Start command failed for xen
</error>
Quoted 8 lines
Quoted 3 lines
I already tried to investigate this error viewing the virtbench logfile which I specified in SETTINGS file. But the logfile was not created :-(.
This is a failure of the "xen/start" command. I had this happen when "
/etc/init.d/xendrestart" failed. You can probably comment that line out if you're already running Xen (perhaps xen's init scripts are flaky).
Now I'm one step further. The domUs will be created, but they are destroyed after seconds. I started one of them manually with console so that I could see the error message:
<boot error>
md: autorun ...
md: ... autorun DONE.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
</boot error>
That must have been something to do with the kernel I'm using. I have to investigate (google) this. But if you can also help me in this case - you're welcome!
Cheers,
Jan
Quoted 1 line · Jan Michael
Hi Rusty,
Hi JaN!
Quoted 7 lines
Now I'm one step further. The domUs will be created, but they are destroyed after seconds. I started one of them manually with console so that I could see the error message:
<boot error>
md: autorun ...
md: ... autorun DONE.
Quoted 7 lines
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-
block(1,0)
</boot error>That must have been something to do with the kernel I'm using. I have to investigate (google) this. But if you can also help me in this case - you're welcome!
Hmm, perhaps your kernel doesn't have INITRD support? The default Xen kernel works (at least, for me on i386 it does)...
Thanks,
Rusty.
Salut Rusty,
Quoted 16 lines · Rusty Russell
Quoted 1 line · Jan Michael
Hi Rusty,
Hi JaN!
Quoted 11 lines
Now I'm one step further. The domUs will be created, but they are destroyed after seconds. I started one of them manually with console so that I could see the error message:
<boot error>
md: autorun ...
md: ... autorun DONE.Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-
block(1,0)
</boot error>
Quoted 6 lines
Quoted 3 lines
That must have been something to do with the kernel I'm using. I have to investigate (google) this. But if you can also help me in this case - you're welcome!
Hmm, perhaps your kernel doesn't have INITRD support? The default Xen kernel works (at least, for me on i386 it does)...
Hm. No. Unfortunately the kernel I'm using has INITRD support, because we need it also for self-installation of our domUs in productive environment. I attached the whole startup log. The RAM disk driver is loaded in line 50. Do you have any other suggestions?
Thanks,
Jan
1 Linux version 2.6.9-42.0.3.EL.cernxenU (root@lxcert-i386) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1 SMP Thu Nov 16 20:40:17 CET 2006
2 BIOS-provided physical RAM map:
3 Xen: 0000000000000000 - 0000000008800000 (usable)
4 0MB HIGHMEM available.
5 136MB LOWMEM available.
6 Using x86 segment limits to approximate NX protection
7 Built 1 zonelists
8 Kernel command line: root=/dev/ram0 rw rdinit=/virtclient 0 128/142/202/89 45375 /dev/xvda1 202 1 eth0 192/168/19/1
9 Initializing CPU#0
10 CPU 0 irqstacks, hard=c032f000 soft=c030f000
11 PID hash table entries: 1024 (order: 10, 16384 bytes)
12 Xen reported: 2800.092 MHz processor.
13 Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
14 Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
15 vmalloc area: c9000000-f4ffe000, maxmem 2d7fe000
16 Memory: 123788k/139264k available (1443k kernel code, 7160k reserved, 539k data, 104k init, 0k highmem)
17 Checking if this processor honours the WP bit even in supervisor mode... Ok.
18 Calibrating delay using timer specific routine.. 5603.53 BogoMIPS (lpj=28017694)
19 Security Scaffold v1.0.0 initialized
20 SELinux: Initializing.
21 SELinux: Starting in permissive mode
22 There is already a security framework initialized, register_security failed.
23 selinux_register_security: Registering secondary module capability
24 Capability LSM initialized as secondary
25 Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
26 CPU: Trace cache: 12K uops, L1 D cache: 16K
27 CPU: L2 cache: 1024K
28 Enabling fast FPU save and restore... done.
29 Enabling unmasked SIMD FPU exception support... done.
30 Checking 'hlt' instruction... OK.
31 Brought up 1 CPUs
32 checking if image is initramfs... it is
33 Freeing initrd memory: 1707k freed
34 Grant table initialized
35 NET: Registered protocol family 16
36 Brought up 1 CPUs
37 xen_mem: Initialising balloon driver.
38 audit: initializing netlink socket (disabled)
39 audit(1179734418.650:1): initialized
40 Total HugeTLB memory allocated, 0
41 VFS: Disk quotas dquot_6.5.1
42 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
43 SELinux: Registering netfilter hooks
44 Initializing Cryptographic API
45 ksign: Installing public key data
46 Loading keyring
47 - Added public key 54FCFCA8F64BD776
48 - User ID: Red Hat, Inc. (Kernel Module GPG key)
49 i8042.c: No controller found.
50 RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
51 Xen virtual console successfully installed as tty1
52 Event-channel device installed.
53 Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
54 ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
55 ide-floppy driver 0.99.newide
56 mice: PS/2 mouse device common for all mice
57 md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
58 NET: Registered protocol family 2
59 IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
60 TCP established hash table entries: 8192 (order: 5, 131072 bytes)
61 TCP bind hash table entries: 8192 (order: 4, 98304 bytes)
62 TCP: Hash tables configured (established 8192 bind 8192)
63 Initializing IPsec netlink socket
64 NET: Registered protocol family 1
65 NET: Registered protocol family 17
66 XENBUS: Device with no driver: device/vbd/51713
67 XENBUS: Device with no driver: device/vif/0
68 md: Autodetecting RAID arrays.
69 md: autorun ...
70 md: ... autorun DONE.
71 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
72
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 23 lines · Jan Michael
Salut Rusty,
Quoted 20 lines · Rusty Russell
Quoted 1 line · Jan Michael
Hi Rusty,
Hi JaN!
Quoted 14 lines
Now I'm one step further. The domUs will be created, but they are destroyed after seconds. I started one of them manually with console so that I could see the error message:
<boot error>
md: autorun ...
md: ... autorun DONE.Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-
block(1,0)
</boot error>That must have been something to do with the kernel I'm using. I have to investigate (google) this. But if you can also help me in this case - you're welcome!
Quoted 8 lines
Quoted 2 lines
Hmm, perhaps your kernel doesn't have INITRD support? The default Xen kernel works (at least, for me on i386 it does)...
Hm. No. Unfortunately the kernel I'm using has INITRD support, because we need it also for self-installation of our domUs in productive environment. I attached the whole startup log. The RAM disk driver is loaded in line 50.
Do you have any other suggestions?
66 XENBUS: Device with no driver: device/vbd/51713
67 XENBUS: Device with no driver: device/vif/0
looks worrysome. Do you have netfront and blkfront compiled into (your kernel, either built-in or as modules in your initrd)?
Though it seems you have a more basic problem with mounting the initrd.
J
Quoted 7 lines · Jan Michael
Salut Rusty,
Quoted 2 lines · Rusty Russell
Hmm, perhaps your kernel doesn't have INITRD support? The default Xen kernel works (at least, for me on i386 it does)...
Hm. No. Unfortunately the kernel I'm using has INITRD support,
Hi Jan!
Hmm, it has found the initrd, and ramdisk seems to be there. Any
chance you can send your kernel config? Obviously we want it to "just work" with whatever configs it can...
Thanks for chasing this!
Rusty.
Hi Rusty,
Quoted 7 lines · Rusty Russell
Quoted 6 lines · Jan Michael
Salut Rusty,
Quoted 2 lines · Rusty Russell
Hmm, perhaps your kernel doesn't have INITRD support? The default Xen kernel works (at least, for me on i386 it does)...
Quoted 7 lines
Quoted 1 line
Hm. No. Unfortunately the kernel I'm using has INITRD support,
Hi Jan!
Hmm, it has found the initrd, and ramdisk seems to be there. Any
chance you can send your kernel config? Obviously we want it to "just work" with whatever configs it can...
Sure. No problem. Please find attached our kernel config for domUs. Did you see the mail from Jeremy?
Quoted 7 lines · Jeremy Fitzhardinge
66 XENBUS: Device with no driver: device/vbd/51713
67 XENBUS: Device with no driver: device/vif/0looks worrysome. Do you have netfront and blkfront compiled into (your kernel, either built-in or as modules in your initrd)?
Though it seems you have a more basic problem with mounting the initrd.
I can say that we are using a kernel builf from the attached kernel config and a special initrd image for our domUs.
The initrd image contains the modules xenblk.ko and xennet.ko. So netfront and blkfront are not compiled into the kernel.
Our linux gurus made the kernel and the initrd image. I think I have to integrate those modules into the initrd image you are using and have to load them. But at this point I have no knowledge how to do this...
Cheers,
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines · Jan Michael
I can say that we are using a kernel builf from the attached kernel config and a special initrd image for our domUs.
The initrd image contains the modules xenblk.ko and xennet.ko. So netfront and blkfront are not compiled into the kernel.
Modular is OK if they're in the initrd you're using.
Quoted 4 lines
Our linux gurus made the kernel and the initrd image. I think I have to integrate those modules into the initrd image you are using and have to load them. But at this point I have no knowledge how to do this...
It's distro-dependent, but mkinitrd works for RH-type systems. Something like "mkinitrd --with=xenblk --with=xennet -v my-initrd.img <kernel version>".
J
Hello,
as I found out it is a little bit tricky to use one's initrd. Because Virtbench is overriding the init command in the domU configuration file with rdinit and therefore it is not possible to load modules:
<virtbench-xen.cfg.in>
extra = "rdinit=/virtclient @VIRTBENCH_ID@ @SERVERIP@ @SERVERPORT@ /dev/xvda1 202 1 eth0 %s" % string.replace('@IP@', '.', '/')
</virtbench-xen.cfg.in>
The template file virtbench-xen.cfg.in is used to create an individual xen configuration file for each user domain.
Despite this I tried to get the virtclient working with my own initrd. I was able to successfully load the xen network and block device driver. At the end of the init script I could start virtclient from the ramdisk.
So I modified the start_machine script in that way that it will manipulate the init start script of the ramdisk and after that it creates one initrd for each domU. The domU configuration uses now a prepared ramdisk rather than this one from virtbench.
The benchmark passed with the following outcome:
Time for one context switch via pipe: 8734 (8640 - 9575)
Time for one Copy-on-Write fault: 5898 (5814 - 8963)
Time to exec client once: 573046 (565921 - 615390)
Time for one fork/exit/wait: 347687 (345750 - 362250)
Time to send 4 MB from host: 55785000 (27069625 - 315191500) Time for one int-0x80 syscall: 370 (370 - 403)
Time for one syscall via libc: 376 (376 - 377)
Time to walk linear 64 MB: 1790875 (1711750 - 3332875)
Time to walk random 64 MB: 2254500 (2246000 - 2266250)
Time for one outb PIO operation: 721 (717 - 733)
DISABLED pte-update: glibc version is too old
Time to read from disk (256 kB): 18810406 (14266718 - 24088906) Time for one disk read: 56343 (38593 - 201718)
DISABLED vmcall: not a VT guest
DISABLED vmmcall: not an SVM guest
Time to send 4 MB between guests: 94326750 (79872250 - 729306500) Time for inter-guest pingpong: 130316 (119722 - 186511)
Time to sendfile 4 MB between guests: 134768000 (86528000 - 417646000) Time to receive 1000 1k UDPs between guests: 26010000 (23384000 - 66784000)
Last question for today: What is the unit of these time values?
Thanks,
Jan
Quoted 18 lines · Jeremy Fitzhardinge
Quoted 4 lines · Jan Michael
I can say that we are using a kernel builf from the attached kernel config and a special initrd image for our domUs.
The initrd image contains the modules xenblk.ko and xennet.ko. So netfront and blkfront are not compiled into the kernel.Modular is OK if they're in the initrd you're using.
Quoted 4 lines
Our linux gurus made the kernel and the initrd image. I think I have to integrate those modules into the initrd image you are using and have to load them. But at this point I have no knowledge how to do this...
It's distro-dependent, but mkinitrd works for RH-type systems. Something like "mkinitrd --with=xenblk --with=xennet -v my-initrd.img <kernel version>".
J
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 37 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jan Michael
Sent: 24 May 2007 16:37
To: Jeremy Fitzhardinge; Anthony Liguori; Rusty Russell; Xen Mailing List
Cc: Alex Iribarren
Subject: Re: [Xen-devel] Re: [ANNOUNCE] virtbench now has xen supportHi Everybody,
Quoted 12 lines · Jan Michael
The benchmark passed with the following outcome:
Time for one context switch via pipe: 8734 (8640 - 9575) Time for one Copy-on-Write fault: 5898 (5814 - 8963) Time to exec client once: 573046 (565921 - 615390) Time for one fork/exit/wait: 347687 (345750 - 362250) Time to send 4 MB from host: 55785000 (27069625 - 315191500) Time for one int-0x80 syscall: 370 (370 - 403) Time for one syscall via libc: 376 (376 - 377) Time to walk linear 64 MB: 1790875 (1711750 - 3332875) Time to walk random 64 MB: 2254500 (2246000 - 2266250) Time for one outb PIO operation: 721 (717 - 733)
Quoted 8 lines
DISABLED pte-update: glibc version is too old
Time to read from disk (256 kB): 18810406 (14266718 - 24088906) Time for one disk read: 56343 (38593 - 201718)
DISABLED vmcall: not a VT guest
DISABLED vmmcall: not an SVM guest
Time to send 4 MB between guests: 94326750 (79872250 - 729306500) Time for inter-guest pingpong: 130316 (119722 - 186511) Time to sendfile 4 MB between guests: 134768000 (86528000 -417646000)
Quoted 2 lines
Time to receive 1000 1k UDPs between guests: 26010000 (23384000 - 66784000)
Quoted 6 lines
I didn't had anything to do with benchmarking in the past, and especially not with virtualization benchmarks, so there are again some questions related to the results of the benchmarking test:
1. What can I read out of every single value which is
listed above?
The time it takes to perform the particular microbenchmark.
Quoted 2 lines
Can you please give a short explenation?
2. What are the unit(s) of the measured values?
Good question, and I don't know the actual answer. I suspect they are clock-cycles or perhaps nanoseconds. It's clearly not milliseconds or microseconds, so it's a "very short time-unit".
Quoted 3 lines
3. What is a good value and what is a bad value? On
what does these
measures depend on - hardware or software or both?
They aren't good or bad values as such - they are comparative numbers. There are no "absolute" good or bad values. If I say "ten seconds", that may be a good value if you're running 100m. But it's certainly a bad value for a computer running 10000 instructions, for example.
Using these values, one could either compare one implementation of Xen with another, or compare two machines with different specs (e.g. different processors, different memory types, different network cards or disks, or whatever). The on with the higher numbers is the slower one.
Quoted 4 lines
4. If I get a certain value like this one: Time for one
context
switch via pipe: 8734 (8640 - 9575). What can I do to improve/tune the performance or the values?
Like any other performance improvement, you'd have to figure out where the majority of time[1] is spent for this microbenchmark, and then try to improve that somehow. Repeatedly (unless it runs for a long time in itself) running this particular benchmark and running "oprofile" on the machine would be able to give a fair idea of where in the system the time is spent.
The numbers in the bracket is the upper/lower numbers, the first number being the average of several runs.
Quoted 3 lines
5. I googled through the web to find any results to
compare with
mine, but I couldn't find anything. Do you have some?
I don't.
Quoted 3 lines
6. In the README file is said that virtbench contains
"low level"
benchmarks. What do you consider as a "high level" benchmark?
Low-level benchmark is similar to "microbenchmark". It tests ONE particular feature of the system in isolation. For example, the "context switch via pipe" is sending a message via a pipe from one process to another process, and measuring the time it takes from sending the message until it's been received at the other end. This is a good way to measure very precise parts of a system, but improving this by 10%, 20% or 50% may serve no purpose if it isn't a large portion of a higher level functionality. E.g. if you run the Blurg[2] web-server, it may not use pipes at all, so the performance of Blurg is completely unrelated of the performance of this particular benchmark. Some other functions in the microbenchmark are likely to have some effect on Blurg, but it may also be that a major portion of Blurg's execution time isn't in the OS/Hypervisor at all, so it doesn't really make much difference at all.
To give another type of example:
We can measure the horse-power of a car-enging. There are several ways to do this. The most realistic is one that actually uses the car itself (such as a rolling-road), but we can also dismount the engine from the car and measure it without the gearbox, cooling fans, water pumps, and whatever else that can be "removed". This method will of course generate (somewhat) more power, but also less useful numbers. On the other hand, all of this is pointless if you can't actually USE the power (e.g. the suspension isn't good enough to go round corners, the brakes don't work well, so if you don't have half a kilometer to stop, you can't use the maximum speed of the car, etc, etc) on the road/racetrack, right? So the BEST way to compare two cars would be to use the same (skilled) driver around a track or a road, to see which performs best.
Microbenchmarks measure the engine-power, braking power, suspension springs, etc, etc. High level/application benchmarks measures the systems ability to perform a higher level task, such as web-serving, file-serving, complex calculation tasks, or some such.
[1] Figuring out where the majority of time is spent is USUALLY the best place to start. However, there are cases where small distributed bits of code are the major part. In the past, I've seen cases where a function called many times got inlined, and eaach individual "call" of the function didn't amount to much, but since it was called many times during the overall benchmark, it amounted to a noticable overhead. In another case, there was a "trace-function" that got called thousands of times a second, but since tracing was turned off, it didn't actually do anything but return. This "nothing but return" was about 2% of the overall time of the "benchmark". However, the effect of actually CALLING the function (passing a bunch of parameters and often extracting those parameters from pointers/data structures) was taking about 15% of the overall time. Moving the check to see if there was any output to be done to outside the function call improved the overall performance by about 16%. Worth having, eh?
[2] Blurg is a fictional web-server, not a product in real life, but for this example, it doesn't really matter.
--
Mats
Quoted 15 lines
Ok. Enough of my questions so far. If you answere these ones I'll may
be have more afterwards.
Thanks for your help,Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 7 lines · Jan Michael
I didn't had anything to do with benchmarking in the past, and especially not with virtualization benchmarks, so there are again some questions related to the results of the benchmarking test:
1. What can I read out of every single value which is listed above?
Can you please give a short explenation?
2. What are the unit(s) of the measured values?
Hi Jan!
Each one is in nanoseconds, shorter is better. All of them are run on processes within one randomly-chosen domU of the four (some are inter-guest test which run on two domUs)
Quoted 1 line
Quoted 1 line
Time for one context switch via pipe: 8734 (8640 - 9575)
Two processes within the domU, one is doing a read() waiting for the other to do a write(), then vice versa
Quoted 1 line
Quoted 1 line
Time for one Copy-on-Write fault: 5898 (5814 - 8963)
This measures the time for a page marked readonly to become writable when the guest writes to it.
Quoted 1 line
Quoted 1 line
Time to exec client once: 573046 (565921 - 615390)
This measures the client process execing itself.
Quoted 1 line
Quoted 1 line
Time for one fork/exit/wait: 347687 (345750 - 362250)
This measure the client process fork()ing, the child exiting, and the parent waiting for it.
Quoted 1 line
Quoted 1 line
Time to send 4 MB from host: 55785000 (27069625 - 315191500)
This measures network speed: 4MB TCP transfer from the virtbench process (dom0) to the client (domU).
Quoted 2 lines
Quoted 2 lines
Time for one int-0x80 syscall: 370 (370 - 403) Time for one syscall via libc: 376 (376 - 377)
These are the time taken to do a getppid() system call.
Quoted 2 lines
Quoted 2 lines
Time to walk linear 64 MB: 1790875 (1711750 - 3332875) Time to walk random 64 MB: 2254500 (2246000 - 2266250)
Memory walking.
Quoted 1 line
Quoted 1 line
Time for one outb PIO operation: 721 (717 - 733)
One io operation, roughly the time taken for a hypervisor entry & exit.
Quoted 1 line
Quoted 1 line
DISABLED pte-update: glibc version is too old
This test measures the time to update two page table entries, but required mremap() which is only in modern glibcs.
Quoted 1 line
Quoted 1 line
Time to read from disk (256 kB): 18810406 (14266718 - 24088906)
Read 256k from the block device.
Quoted 1 line
Quoted 1 line
Time for one disk read: 56343 (38593 - 201718)
Read a single block from the block device (ie. latency).
Quoted 2 lines
Quoted 2 lines
DISABLED vmcall: not a VT guest
DISABLED vmmcall: not an SVM guest
These only apply to fully-virtualized guests.
Quoted 1 line
Quoted 1 line
Time to send 4 MB between guests: 94326750 (79872250 - 729306500)
domU <-> domU 4MB TCP write.
Quoted 1 line
Quoted 1 line
Time for inter-guest pingpong: 130316 (119722 - 186511)
domU <-> domU TCP latency.
Quoted 1 line
Quoted 1 line
Time to sendfile 4 MB between guests: 134768000 (86528000 - 417646000)
domU <-> domU 4MB TCP write using sendfile().
Quoted 2 lines
Quoted 2 lines
Time to receive 1000 1k UDPs between guests: 26010000 (23384000 - 66784000)
Sending 1000 UDP packets from domU <-> domU. This benchmark is horribly unreliable and should probably be removed.
Quoted 2 lines
3. What is a good value and what is a bad value? On what does these
measures depend on - hardware or software or both?
Both... run "virtbench local" on the same hardware on a normal Linux kernel to see what native results are. This is really the target to aim for.
Quoted 3 lines
4. If I get a certain value like this one: Time for one context
switch via pipe: 8734 (8640 - 9575). What can I do to improve/tune the performance or the values?
That would be Xen-specific, I'm not entirely sure how much that can be improved.
Quoted 2 lines
5. I googled through the web to find any results to compare with
mine, but I couldn't find anything. Do you have some?
I do not release benchmark numbers myself; they're quite dependent on particular hardware, and also virtualization technology is moving rapidly enough to make them quite obsolete. virtbench is mainly useful for spotting regressions, measuring code optimizations and explaining the results of higher-level benchmarks.
Quoted 2 lines
6. In the README file is said that virtbench contains "low level"
benchmarks. What do you consider as a "high level" benchmark?
Things like: kernbench, SDET, Spec, etc.
I hope that helps,
Rusty.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 22 lines · Jan Michael
Hello Everyone,
I got my hands on a HP blade with 64-bit Intel XEON processors. I could successfully start the benchmark but after a while client 1 closed the connection. Please see the full log below.
Could you please help me to find the error? Is there a some kind of debugging mode I could use to get more details from both, client and server side?
<virtbench execution>
[root@somemachine virtbench-cern]# ./virtbench xen Bringing up machines11188 blocks
58.7%
11188 blocks
58.7%
11188 blocks
58.7%
11188 blocks
58.7%
....
Time for one context switch via pipe: 7747 (5070 - 8202)
Quoted 8 lines
Time for one Copy-on-Write fault: 4266 (4242 - 5865) Time to exec client once: 331171 (329757 - 332406) Time for one fork/exit/wait: 196031 (195781 - 196812) Time to send 4 MB from host: 37688750 (27595500 - 47665250) Time for one syscall via libc: 428 (417 - 652) Time to walk linear 64 MB: 2130375 (2123000 - 2168750) Time to walk random 64 MB: 2135000 (2130250 - 2140625)
virtbench: client 1 closed connection
OK, this looks like look it got upset on the "outb" test. Unfortunately, redirecting standard input from /dev/null causes xen not to output any console at all. I'm not sure how to fix this, but you can enter names manually on the commandline to avoid running this benchmark.
Quoted 6 lines
sh: line 1: Using: command not found
sh: line 2: Started: command not found
virtbench: 'xen/stop_machinevirtbench_3
Using config file "/tmp/virtbench-xen_3.cfg".
Started domainvirtbench_3
' failed
It seems that your xen/start_machine script printed out extra stuff, rahter than just the id to hand back to stop_machine.
Cheers,
Rusty.