| | 1 | = Getting Frisbee traffic over !OpenFlow Enabled Switches = |
| | 2 | |
| | 3 | Frisbee is a fast disk imaging process in which a server distributes chunks of disk image to one or more clients in a multicast group. Frisbee is used extensively for imaging nodes, so there is a need for the !OpenFlow deployment here to be able to handle its traffic. |
| | 4 | |
| | 5 | This page records one attempt to see if !OpenFlow can be made to handle Frisbee traffic, and if so, measure its performance. Success here means being able to image a node in a reasonable amount of time. |
| | 6 | |
| | 7 | == I General Setup steps taken == |
| | 8 | A regular !SandBox (SB6) with 2 nodes was used to carry out these steps. The control plane switch for SB6 is an NEC IP8800 (sw-sb-01) shared by this and !SandBoxes 1,2,5,7 and 8. [[BR]] |
| | 9 | |
| | 10 | === 1.1. Network setup - enable !OpenFlow mode on switch === |
| | 11 | The SB6 control VLAN was set in !OpenFlow mode (e.g. make it a virtual switch, or "VSI"). The command(s) for doing this differ depending on firmware version, which can be found with the command `show version` in user mode. The VSI was pointed to our [wiki:Internal/OpenFlow/Controllers/BigSwitch BSN controller], kvm-big. |
| | 12 | * 11.1.C (old - this is what sw-sb-01 is running) |
| | 13 | {{{ |
| | 14 | setvsi 12 31,32,48.12 tcp 172.16.0.14:6633 dpid 0x001010213231 |
| | 15 | }}} |
| | 16 | * 11.1.Ae (the theoretic steps, not confirmed ^1^) |
| | 17 | {{{ |
| | 18 | (config)# openflow openflow-id 1 virtual-switch |
| | 19 | !sw-gp(config-of) controller controller-name kvm-big 1 172.16.0.14 tcp |
| | 20 | !sw-gp(config-of) dpid 0000001010213231 |
| | 21 | !sw-gp(config-of) openflow-vlan 27 |
| | 22 | !sw-gp(config-of) enable |
| | 23 | }}} |
| | 24 | In the first code block, `tcp 172.16.0.14:6633` points the switch to `kvm-big`. Association can be confirmed with the `show switch` command on the controller, in which you should see the VSI's DPID in the list of switches the controller has seen: |
| | 25 | {{{ |
| | 26 | kvm-big> sh sw |
| | 27 | Switch DPID Alias Active Last Connect Time IP Address Socket Address Max Packets Max Tables |
| | 28 | -----------------------|-----|------|-----------------------|-------------|--------------------|-----------|---------- |
| | 29 | ... |
| | 30 | 00:00:00:10:10:21:32:31 True 2011-09-20 21:34:47 EDT 172.16.0.253 /172.16.0.253:64372 256 2 |
| | 31 | ... |
| | 32 | }}} |
| | 33 | Note, the controller lists DPIDs in a form similar to MAC addresses, but with '00:00' tacked in front. |
| | 34 | === 1.2. Network setup - Add static flow entry to BSN Controller === |
| | 35 | Once the VSI is associated, add a static flow entry to the controller. |
| | 36 | {{{ |
| | 37 | kvm-big> en |
| | 38 | kvm-big# config |
| | 39 | kvm-big(config)# switch 00:00:00:10:10:21:32:31 |
| | 40 | kvm-big(config-switch)# flow-entry floodall |
| | 41 | kvm-big(config-flow-entry)# ether-type 2048 |
| | 42 | kvm-big(config-flow-entry)# dst-ip 224.0.0.5 |
| | 43 | kvm-big(config-flow-entry)# actions output=flood |
| | 44 | kvm-big(config-flow-entry)# active True |
| | 45 | }}} |
| | 46 | * ether-type must be specified in decimal. As in this case, if doing a flow based on IP-layer parameters, ether-type must be set to 2048, for IP (hex ether-type 0x800). |
| | 47 | * actions are specified in a syntax similar to that used in `dpctl`. It roughly follows the syntax: |
| | 48 | {{{ |
| | 49 | actions output=[port number|flood|drop] |
| | 50 | }}} |
| | 51 | Multiple output ports may be specified in a comma-separated chain of "output= ", e.g: |
| | 52 | {{{ |
| | 53 | actions output=2,output=4 |
| | 54 | }}} |
| | 55 | * The flow must be enabled with `enable True`, with capitalized T. |
| | 56 | |
| | 57 | === 1.3. Client/server setup === |
| | 58 | To avoid the overhead of the `omf` commands, both Frisbee server (frisbeed) and client (frisbee) were run manually. The client must be booted into a pre-boot environment prior to running frisbee. This can be done by rebooting the node after manually adding a link (as root) to /tftpboot/pxelinux.cfg/ on repository1: |
| | 59 | {{{ |
| | 60 | ln -s omf-5.2.4 0A100102 |
| | 61 | }}} |
| | 62 | Where omf-5.2.4 is the name of the preboot environment and 0A100102 is the IP address of the node in hex. Once back up, the node should be in a busybox-like environment with `frisbee` as one of the command options. |
| | 63 | |
| | 64 | Once the client is ready to go, you can start the processes with the following commands: |
| | 65 | * Server: on repository1: |
| | 66 | {{{ |
| | 67 | /usr/sbin/frisbeed -i 10.16.0.42 -m 224.0.0.5 -p 7060 -W 50000000 /var/lib/omf-images-5.2/ubuntu10.10.ndz -ddd |
| | 68 | }}} |
| | 69 | Where: |
| | 70 | * -i 10.16.0.42 : Interface to use for session |
| | 71 | * -m 224.0.0.5 : Multicast address server/clients will use to send/receive disk image chunks, respectively |
| | 72 | * -p 7060 : UDP port to use for session |
| | 73 | * -W 50000000 : throughput in bps |
| | 74 | * -ddd : verbose mode |
| | 75 | |
| | 76 | * Client: on node1-2: |
| | 77 | {{{ |
| | 78 | frisbee -i 10.16.1.2 -m 224.0.0.5 -p 7060 /dev/hda -ddd |
| | 79 | }}} |
| | 80 | Where the flags have the same meanings as for frisbeed. In the client's case, `-ddd` will give you a bunch of run-time messages, as well as the summary at the end: |
| | 81 | {{{ |
| | 82 | Client 271061107 Performance: |
| | 83 | runtime: 3387.386 sec |
| | 84 | start delay: 0.000 sec |
| | 85 | real data written: 1039785984 (306993 Bps) |
| | 86 | effective data written: 12002000896 (3543549 Bps) |
| | 87 | Client 271061107 Params: |
| | 88 | chunk/block size: 1024/1024 |
| | 89 | chunk buffers: 64 |
| | 90 | disk buffering: 64MB |
| | 91 | readahead/inprogress: 2/8 |
| | 92 | recv timo/count: 30000/3 |
| | 93 | re-request delay: 1000000 |
| | 94 | writer idle delay: 1000 |
| | 95 | randomize requests: 1 |
| | 96 | Client 271061107 Stats: |
| | 97 | net thread idle/blocked: 6173/0 |
| | 98 | decompress thread idle/blocked: 1053451/0 |
| | 99 | disk thread idle: 1197 |
| | 100 | join/request msgs: 1/52576 |
| | 101 | dupblocks(chunk done): 1080 |
| | 102 | dupblocks(in progress): 31043 |
| | 103 | partial requests/blocks: 50501/18254631 |
| | 104 | re-requests: 50501 |
| | 105 | }}} |
| | 106 | The above, in fact, was the result of the imaging process done with the configuration steps described in this page. Note the runtime - 3387.386 sec, or approximately 56 min! |
| | 107 | == II Data collection == |
| | 108 | In addition to the steps above several other things were done for troubleshooting. |
| | 109 | === 2.1 On `kvm-big` === |
| | 110 | * A trace of the control channel traffic can be observed with the command: |
| | 111 | {{{ |
| | 112 | show switch 00:00:00:10:10:21:32:31 trace detail |
| | 113 | }}} |
| | 114 | Appending >> filename will spit the trace into a file in user bsn's home directory. |
| | 115 | |
| | 116 | * The controller has a debug shell one can reach with command `debug bash` fromt he CLI. From here, a tcpdump session was started to sniff the control port: |
| | 117 | {{{ |
| | 118 | tcpdump -i eth0 -s 1514 -vvv not ether proto 0x88cc and not port 22 and port 6633 and not port 69 -w frisbee.pcap |
| | 119 | }}} |
| | 120 | The various filters remove LLDP, SSH, mDNS, and TFTP traffic, respectively, and the capture was saved to a file for later inspection. |
| | 121 | |
| | 122 | === 2.2 On sw-sb-01 === |
| | 123 | * Commands `showswitch` and `showflow` allow you to check the status of, and flows being pushed to, the device. |
| | 124 | * 'show cpu seconds` allows you to monitor switch CPU load: |
| | 125 | {{{ |
| | 126 | sw-sb-02# show cpu seconds |
| | 127 | Date 2011/08/17 21:04:13 UTC |
| | 128 | *** second *** |
| | 129 | date time cpu average |
| | 130 | Aug 17 21:03:12-21:03:21 100 100 100 100 100 100 100 100 100 100 |
| | 131 | Aug 17 21:03:22-21:03:31 100 100 100 100 100 100 100 99 100 100 |
| | 132 | Aug 17 21:03:32-21:03:41 100 100 100 100 100 100 100 100 92 100 |
| | 133 | Aug 17 21:03:42-21:03:51 100 100 100 100 100 100 100 100 100 100 |
| | 134 | Aug 17 21:03:52-21:04:01 100 100 100 100 100 100 100 100 100 100 |
| | 135 | Aug 17 21:04:02-21:04:11 100 100 100 100 100 100 93 100 100 100 |
| | 136 | }}} |
| | 137 | High load as seen above is bad. Expect normal load to be mostly single digits or in the teens. |
| | 138 | |
| | 139 | |
| | 140 | ^1. I don't have a manual for the new !OpenFlow features.^ |
| | 141 | |