Changes between Version 4 and Version 5 of PlasticSlices/Experiments


Ignore:
Timestamp:
05/17/11 16:21:19 (13 years ago)
Author:
Josh Smift
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/Experiments

    v4 v5  
    8686}}}
    8787
    88 Divide that number by the number of host pairs you have (the number of rows in your table); call this number <count>, and use it below when you run the netcat client command.
     88Divide that number by the number of host pairs you have (the number of rows in your table); call this number <count>, and use it below when you run the netcat commands.
    8989
    9090Copy the file to each of the servers. (When you run the experiment, you'll download it repeatedly from each of the clients.)
     
    162162This experiment uses the HTTPS protocol to send 1 GB of data via encrypted TCP.
    163163
     164== Setup ==
     165
     166Divide the hosts that you want to use into pairs. You'll run an HTTPS server on the server, and run wget on the client to fetch files from it.
     167
     168Identify the precise IP address on each server that you'll want to connect to. Make a table to keep track of which server you'll want to connect to from each client, e.g.
     169
     170|| '''client'''                   || '''server'''                   || '''server address''' ||
     171|| ganel.gpolab.bbn.com           || planetlab5.clemson.edu         || server=10.42.101.105 ||
     172|| planetlab4.clemson.edu         || pl5.myplc.grnoc.iu.edu         || server=10.42.101.73  ||
     173|| of-planet1.stanford.edu        || wings-openflow-3.wail.wisc.edu || server=10.42.101.96  ||
     174
     175You'll use the "server=<ipaddr>" parts when you run the experiment.
     176
     177Identify a port that you'd like to use for the connection; call it <port>, and use it below when you run the netcat server and client commands.
     178
     179On each server, install an HTTPS server. One way is to install pyOpenSSL, the 'patch' program, and use the Python server at http://code.activestate.com/recipes/442473-simple-http-server-supporting-ssl-secure-communica/, with a patch to allow you to bind to an address and port specified on the command line:
     180
     181{{{
     182sudo yum install pyOpenSSL patch
     183rm -rf ~/gigaweb
     184mkdir -p ~/gigaweb/docroot
     185cd ~/gigaweb
     186wget http://code.activestate.com/recipes/442473-simple-http-server-supporting-ssl-secure-communica/download/1/ -O httpsd.py
     187wget http://groups.geni.net/geni/attachment/wiki/PlasticSlices/Experiments/httpsd.py.patch?format=raw -O httpsd.py.patch
     188patch httpsd.py httpsd.py.patch
     189rm httpsd.py.patch
     190}}}
     191
     192On each server, generate a self-signed SSL key:
     193
     194{{{
     195openssl genrsa -passout pass:localhost -des3 -rand /dev/urandom -out localhost.localdomain.key 1024
     196openssl req -subj /CN=localhost.localdomain -passin pass:localhost -new -key localhost.localdomain.key -out localhost.localdomain.csr
     197openssl x509 -passin pass:localhost -req -days 3650 -in localhost.localdomain.csr -signkey localhost.localdomain.key -out localhost.localdomain.crt
     198openssl rsa -passin pass:localhost -in localhost.localdomain.key -out decrypted.localhost.localdomain.key
     199mv decrypted.localhost.localdomain.key localhost.localdomain.key
     200cat localhost.localdomain.key localhost.localdomain.crt > localhost.localdomain.pem
     201rm localhost.localdomain.key localhost.localdomain.crt localhost.localdomain.csr
     202}}}
     203
     204Identify a file that you'd like to transfer from the servers to the clients; call it <file>. Find out how many times you'll need to copy it to get more than 1 GB:
     205
     206{{{
     207echo $((10**9/$(du -b <file> | awk '{print $1;}')+1))
     208}}}
     209
     210Divide that number by the number of host pairs you have (the number of rows in your table); call this number <count>, and use it below when you run the wget command on the clients.
     211
     212Copy the file to each of the servers, and put it into ~/gigaweb/docroot. (When you run the experiment, you'll download it repeatedly from each of the clients.)
     213
     214== Execution ==
     215
     216On each server, run
     217
     218{{{
     219server=<ipaddr>
     220cd ~/gigaweb/docroot
     221python ../httpsd.py $server <port>
     222}}}
     223
     224using the "server=<ipaddr>" line from your table, and the <count>, <port>, and <file> values you identified earlier.
     225
     226That should print a line on your terminal like
     227
     228{{{
     229Serving HTTPS on <ipaddr> port <port> ...
     230}}}
     231
     232immediately, and then lines like
     233
     234{{{
     235<ipaddr> - - [17/May/2011 19:53:21] "GET / HTTP/1.1" 200 -
     236}}}
     237
     238for each client connection when clients connect.
     239
     240On each client, run
     241
     242{{{
     243server=<ipaddr>
     244rm -rf ~/gigaweb
     245mkdir ~/gigaweb
     246cd ~/gigaweb
     247for i in {1..<count>} ; do wget --no-check-certificate https://$server:<port>/<file> -O <file>.$i ; done
     248}}}
     249
     250You'll see output typical of wget as each transfer runs.
     251
     252''FIXME: Should we capture this in a log file? We don't need it, but I suppose it could make debugging easier.''
     253
     254When the downloads are finished, on the server, hit ctrl-c to kill the httpsd.py process.
     255
     256== Results ==
     257
     258On each client, check the total size of the data transfered:
     259
     260{{{
     261du -sb .
     262}}}
     263
     264Add up the results for all the clients; they should add up to 1 GB (or more).
     265
     266On the server, calculate the md5sum checksum for the file: Do
     267
     268{{{
     269md5sum <file> | awk '{print $1;}'
     270}}}
     271
     272Call the result of this command <md5sum>.
     273
     274On each client, calculate the md5sum checksums for all of the copies of the file, and find any that differ from the server: Do
     275
     276{{{
     277md5sum * | grep -v <md5sum> || echo "All checksums match."
     278}}}
     279
     280and expect "All checksums match" as the only output.
     281
     282== Cleanup ==
     283
     284On each client, remove the gigaweb directory:
     285
     286{{{
     287cd
     288rm -rf ~/gigaweb
     289}}}
     290
    164291= GigaPerfTCP =
    165292