Dhrystone

  1. Unzip: tar -xzvf dhrystone-2.1.tar.gz
  2. Compile: make. Any errors?
  3. Fix the compilation errors
  4. Why do you think they put those function definition there if they are available in the system?
  5. Run the benchmark: ./gcc_dry2. Set the number of iterations to 100000000.
  6. Compare the results with the colleague next to you. Are they different?
  7. Run with register variables: ./gcc_dry2reg. Set the number of iterations to 100000000.
  8. Let's discuss about register variables.
  9. Run the same benchmark in container

CoreMark

  1. Unzip: tar -xzvf coremark_v1.0.tgz
  2. Compile: make
  3. Run benchmark: make run
  4. Compare the results with the colleague next to you. Are they different?
  5. Run the same benchmark in a container

lmbench

  1. Unzip: tar -xzvf lmbench-3.0-a9.tgz
  2. Compile: make
  3. Run lat_mem_rd: ./bin/x86_64-linux-gnu/lat_mem_rd 250 16 32 64 128 256 512 1024
  4. Guess the cache hierarchy and size.
  5. Run the same in container

Evaluate context switch overhead

  1. run benchmark ./bin/x86_64-linux-gnu/lat_ctx -s 80 2 4 6 8 10 12 14 16 18 20 24 32 48 96
  2. Why do you think the results are so close at the beginning?
  3. Run the same in container

Run lmbench default template

  1. cd scripts
  2. ./config-run with MB: 100
  3. ./results
  4. cd ./results
  5. make

In order to run a benchmark inside a container

  • Create a container - a Busybox container will do. We are not interested in any special configurations:
lxc-create -n foo -t busybox -f /share/doc/lxc/examples/lxc-no-netns.conf
  • By default, the container will start a process that will try to get an IP through DHCP. Since the specified config file does does not assign dedicated networking to the container, getting an IP will not work and it will block the container. You must prevent the container from starting this process by deleting the /bin/udhcpc line from /var/lib/lxc/foo/rootfs/etc/init.d/rcS.

* Start and console to the container:

lxc-start -n foo -d; lxc-console -n foo
  • Copy the benchmark binaries from the host into the container rootfs (/var/lib/lxc/foo/rootfs). This will make them accessible from the container shell (the one started with lxc-console).
      Note: you may also need some system utilities in the container (e.g. make). In order to make them available as well, find out where they are on the host (e.g. whereis make) and copy the associated binary in the container (cp /usr/bin/make /var/lib/lxc/foo/rootfs/usr/bin/).
  • Stop the container

* Destroy the container

sesiuni/virtualization-networking/session5.txt · Last modified: 2013/06/27 00:00 by laura