Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sesiuni:virtualization-networking:session4-2014 [2014/07/08 16:11]
freescale created
sesiuni:virtualization-networking:session4-2014 [2014/07/08 16:13] (current)
freescale
Line 19: Line 19:
   - Run with register variables: ''​./​gcc_dry2reg''​. Set the number of iterations to 100000000. ​   - Run with register variables: ''​./​gcc_dry2reg''​. Set the number of iterations to 100000000. ​
   - Let's discuss about register variables.   - Let's discuss about register variables.
-  - Run the same benchmark in container 
  
  
Line 29: Line 28:
   - Run benchmark: ''​make run''​   - Run benchmark: ''​make run''​
   - Compare the results with the colleague next to you. Are they different?   - Compare the results with the colleague next to you. Are they different?
-  - Run the same benchmark in a container 
  
 __lmbench__ __lmbench__
Line 38: Line 36:
   - Run lat_mem_rd: ''​./​bin/​x86_64-linux-gnu/​lat_mem_rd 250 16 32 64 128 256 512 1024''​   - Run lat_mem_rd: ''​./​bin/​x86_64-linux-gnu/​lat_mem_rd 250 16 32 64 128 256 512 1024''​
   - Guess the cache hierarchy and size.   - Guess the cache hierarchy and size.
-  - Run the same in container 
  
  
Line 45: Line 42:
   - 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''​   - 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''​
   - Why do you think the results are so close at the beginning?   - Why do you think the results are so close at the beginning?
-  - Run the same in container 
  
 __Run lmbench default template__ __Run lmbench default template__
Line 54: Line 50:
   - ''​cd ./​results''​   - ''​cd ./​results''​
   - ''​make''​   - ''​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:​ 
- 
-<code bash> 
-lxc-create -n foo -t busybox -f /​share/​doc/​lxc/​examples/​lxc-no-netns.conf 
-</​code>​ 
- 
-* 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: 
-<code bash> 
-lxc-start -n foo -d; lxc-console -n foo 
-</​code>​ 
- 
-* 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/session4-2014.txt · Last modified: 2014/07/08 16:13 by freescale