Skip to contentSkip to conversation

virtbench w/ kvm support

ANNOUNCE Rusty Russell 2 participants 3 messages Apr 23, 2007 – Apr 24, 2007 2 messages not in the archive KVM

lore
Share & tools
lore
#0 lore raw

Hi all,

I've been toying around with a benchmark suite for virtualization, and
I've just added kvm support. You can download the source tarball straight from the mercurial repo:

http://ozlabs.org/~rusty/virtbench/
http://ozlabs.org/~rusty/virtbench/?archive/tip.tar.bz2

README excerpt below.

Feedback and patches welcome!
Rusty.

Virtbench - Simple Benchmarking for Virtualization
http://ozlabs.org/~rusty/virtbench

Virtbench is a set of (mainly micro-) benchmarks designed to assist coders optimize their hypervisors. Note that it won't tell you how well a virtualization solution will perform in a real world situation.

Requirements:

	sudo
	/dev/net/tun: try "modprobe tun"
	The networks 192.168.19.0 and 192.168.12.0 free to be used.

Quickstart:
# Build the code and root filesystems (will use sudo) make
# Set the guest kernel location and maybe more vi ./SETTINGS
# Run the benchmark (local mode)
sudo ./virtbench local
# Run the benchmark (kvm mode)
sudo ./virtbench kvm

More information:

(Note that virtbench is very much a work in progress)

Virtbench spawns 4 virtual machines running the virtbench client, then runs various tests on them. It supports various backends, and you can create a new directory to add new ones (see below):

- local (simply run each client as a normal process)
- lguest
- kvm
- qemu

Since most hypervisors require root privileges, virtbench is usually run as root.

All benchmarks are measured as time taken to do some task, so smaller is better. Currently virtbench has 14 microbenchmarks and 4 inter-guest benchmarks, but you can write new ones (see below).

Options which might be useful:
--ifname=<if>: use an interface other than "eth0" to get server IP. --rough: don't run benchmarks as many times. --distribution: show distribution details for results. --csv=<file>: record complete results to file
--help: usage and list of benchmark names
[benchnames]: run this/these benchmarks

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

A message that is not in the archive (sent off-list or not yet received): 1177305795.17026.56.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

#2 lore raw
Quoted 6 lines · Rusty Russell

Hi all,

I've been toying around with a benchmark suite for virtualization, and
I've just added kvm support. You can download the source tarball straight from the mercurial repo:

Quoted 7 lines

http://ozlabs.org/~rusty/virtbench/
http://ozlabs.org/~rusty/virtbench/?archive/tip.tar.bz2

README excerpt below.

Feedback and patches welcome!

Virtbench does not have puppy-nature on x86_64:

[avi@cleopatra virtbench]$ 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/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
results.c: In function ‘results_to_dist_summary’:
results.c:247: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u64’
results.c: In function ‘results_to_quick_summary’:
results.c:274: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘u64’
results.c:274: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u64’
results.c:274: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 5 has type ‘u64’
results.c: In function ‘results_to_csv’:
results.c:287: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u64’
cc -g -Wall -Wmissing-prototypes -DNUM_MACHINES=4 -o virtclient client.c stdrusty.c talloc.c micro/context-switch.c micro/cow.c micro/exec.c micro/fork.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
# 50M
dd if=/dev/zero of=rootfs/virtbench-root.tmp count=50 bs=1048576 50+0 records in
50+0 records out
52428800 bytes (52 MB) copied, 0.384909 seconds, 136 MB/s mke2fs -q -F rootfs/virtbench-root.tmp

# /dev/xvda needed for xen
set -e; sudo mount -text2 -o,loop,rw rootfs/virtbench-root.tmp /mnt; \
trap 'sudo umount /mnt' 0; \
sudo mkdir /mnt/lib /mnt/tmp /mnt/dev /mnt/proc; \
sudo mknod /mnt/dev/null c 1 3; \
sudo mknod /mnt/dev/zero c 1 5; \
sudo mknod /mnt/dev/console c 5 1; \
sudo mknod /mnt/dev/xvda b 202 0; \
sudo mknod /mnt/dev/xvda1 b 202 1
sync
[ rootfs/virtbench-root -ot rootfs/virtbench-root-0 ] || cp 
rootfs/virtbench-root rootfs/virtbench-root-0
set -e; trap 'sudo umount /mnt' 0; \
sudo mount -text2 -o,loop,rw rootfs/virtbench-root-0 /mnt; \
sudo cp virtclient /mnt; \
sudo cp /lib/ld-linux* /mnt/lib; \
sudo cp /lib/libc* /mnt/lib; \
sudo cp -a /lib/tls /mnt/lib/tls
cp: cannot stat `/lib/ld-linux*': No such file or directory
make: *** [rootfs/virtbench-root-0] Error 1
Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

A message that is not in the archive (sent off-list or not yet received): 462CAB5E.9080301-atKUWr5tajBWk0Htik3J/[email protected]

#4 lore raw
Quoted 8 lines · Avi Kivity
Quoted 5 lines · Rusty Russell

Hi all,

I've been toying around with a benchmark suite for virtualization, and
I've just added kvm support. You can download the source tarball straight from the mercurial repo:

Virtbench does not have puppy-nature on x86_64:

Hi Avi!

Ah, I've been concentrating on i386. I will do the port today (there's
also one test which is i386-specific, which needs to be conditionalized).

I'll reply again when it's done...
Rusty.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/