mahimahi: a web performance measurement toolkit
ravinet / mahimahi Goto Github PK
View Code? Open in Web Editor NEWWeb performance measurement toolkit
License: GNU General Public License v3.0
Web performance measurement toolkit
License: GNU General Public License v3.0
mahimahi: a web performance measurement toolkit
(hello, unsharenet, forktest, simple-ferry)
Including where they're mentioned in Makefile.am, and all their source files that aren't used elsewhere.
HTTP Proxy should use https://github.com/keithw/ourtube/blob/master/http_parser.hh to get an ENTIRE request (request headers and complete request body) from the client.
Only when it has the WHOLE request should it then sent it along to the server (as a string).
Everything else unchanged.
(1) Edit Makefile.am
to make the program get installed setuid root. (Add chmod u+s $(bindir)/delayshell
as an install hook?)
(2) Make the child process drop privileges immediately after executing unshare
.
(a) Change group first.
(b) Then change UID.
(c) The Internet will have instructions on how to do this.
Separate new program
HTTP Proxy should construct each HTTP response (response headers and response body) before sending to the client.
This will require parsing chunked bodies, which Ourtube hasn't handled yet. Use the HTTP specification (RFC 2616).
Like FileDescriptor does
Same concept as delayshell but uses delay 0 (still uses tundevices and ferryqueue).
It doesn't need to be a cellular link under all circumstances.
If I run the following sequence of commands:
delayshell 2
screen
Ctrl-A Ctrl-D (detaches from screen)
delayshell 2
ifconfig
Now, in a new terminal:
screen -r
ifconfig
Both ifconfigs show an "ingress" tun device. Wondering if this will lead to trouble later on. Maybe not because they are in separate network namespaces?
On an additional cosmetic note, screen -r doesn't return our cool "[delay 2]" prompt, and uses the standard bash login prompt instead.
It should be uid of the user running replayshell and not www-data.
Man pages currently give http://mahimahi.csail.mit.edu (should be mahimahi.mit.edu)
Probably using NAT
Other options:
When I'm connected to MIT Wi-Fi, /etc/resolv.conf contains other nameservers. These are not available inside replayshell but they're tried anyway, resulting in hostname lookup times of 5+ seconds. Therefore, page load times of URLs with hostnames are much higher than URLs with direct IP addresses. This can be manually fixed by making sure that /etc/resolv.conf is blank.
Make hello world compile nicely with autotools stealing from https://github.com/anirudhSK/explicit-vp8 if necessary.
Remembering to rename everywhere it's mentioned
Overwriting old files is not an option.
(This causes an occasional exception on quit. If we know that one of the veth devices in the pair is inside the container, we do not have to clean it up ourselves.)
Venet is two tun devices directly connected, where one is inside and one is outside. This way, we don't have to deal with ferrying packets from tun device (and adding delay) since delay is 0.
Steps to reproduce the problem:
git clone https://github.com/ravinet/mahimahi
cd mahimahi
git checkout recordshell
./autogen.sh && ./configure && sudo make install
delayshell record
Run:
wget http://web.mit.edu/anirudh/www/irtf_iab-ccirtcpaper28.pdf -O /tmp/1.pdf
wget http://web.mit.edu/anirudh/www/irtf_iab-ccirtcpaper28.pdf -O /tmp/2.pdf
1 and 2 have the same size (and the same size as the original file on the web) but differ in their contents.
used fork + unshare instead
Delayshell needs to ferry DNS traffic between the container and the host. We should:
Live graph!
One tap device is inside the special network namespace and one tap device is outside of it.
We are making a bridge.
I can lock it up with netperf in a matter of seconds on
3.11.0-19-generic #33-Ubuntu SMP. Which is too bad as toke is making
huge progress with netperf-wrapper and a new gui...
I setup two delay shells, then start netserver in one, and try to connect to the
other. Fire up netperf -H 10.64.0.2 and inside of a few thousand packets, it
hangs...
[delay 10 ms] d@nuc:~/git/mahimahi$ ifconfig
ingress Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:100.64.0.2 P-t-P:100.64.0.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:6627 errors:0 dropped:0 overruns:0 frame:0
TX packets:4376 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:9929172 (9.9 MB) TX bytes:248836 (248.8 KB)
other window:
d@nuc:/git/netperf-wrapper$ delayshell 10/git/netperf-wrapper$ netperf -H 100.64.0.2
[delay 10 ms] d@nuc:
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
100.64.0.2 () port 0 AF_INET : demo
Ensure that it compiles with Ubuntu 12.04.
Something has changed in the kernel treatment of veth devices. (The packetshells do still work.)
Wrapping call to eventloop, parent should
(1) Create ChildProcess
(2) (Inside ChildProcess: drop privileges, then run eventloop)
(3) wait for ChildProcess to finish
The Internet claims that we can't expect a 1:1 correspondence between waitable events from child processes and SIGCHLD signals.
http://stackoverflow.com/questions/8398298/handling-sigchld
http://stackoverflow.com/questions/10434218/libevent-signal-handling-sigchld-specifically
umask should be user readable.
Want to use dnat and then receive UDP datagram, obtain original destination, and handle request in new thread (create socket, send datagram, receive response, ferry back to original source). This is similar to how we handle UDP DNS.
DelayShell should search for a pair of IP addresses that are unused for the ingress and egress, rather than hardcoding two specific IP addresses. This will allow us to nest one program inside another (e.g. cellsh inside httpreplaysh).
The IP address search should start at 100.64.0.1 and end at 100.64.0.255 (Carrier-grade NAT range).
We should use the getifaddrs()
function to list the interfaces on the machine and their addresses.
We should also pick a name for the egress interface that's not just "egress", because that might be taken (if multiple users are running delayshell at the same time). Probably just doing egress + pid is a good idea.
Seems like this was a workaround to silence -Weffc++. Wonder what the actual solution is.
Use Selenium or equivalent.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.