Skip to content

Instantly share code, notes, and snippets.

@ffund
Last active August 18, 2016 06:34
Show Gist options
  • Save ffund/6e5c5d3de62a0a73caea3f9ed7f8e2a6 to your computer and use it in GitHub Desktop.
Save ffund/6e5c5d3de62a0a73caea3f9ed7f8e2a6 to your computer and use it in GitHub Desktop.
For "Comparing queueing delay between PIE and RED"
# Install software
sudo apt-get update;
sudo apt-get -y install vsftpd nload # nload is for monitoring network traffic
# Put the VSFTPD config file in place
sudo wget --output-document=/etc/vsftpd.conf https://bitbucket.org/by626/pievsred/raw/master/vsftpd.conf
sudo wget --output-document=/etc/vsftpd-nolimit.conf https://bitbucket.org/by626/pievsred/raw/master/vsftpd.conf
sudo wget --output-document=/etc/vsftpd-limit.conf https://bitbucket.org/by626/pievsred/raw/master/vsftpd.conf
echo 'anon_max_rate=25000' | sudo tee --append /etc/vsftpd-limit.conf
# Modify MTU on servers
sudo ifconfig eth1 mtu 982
# Set up TCP Reno, SACK on servers
sudo echo 1 | sudo tee /proc/sys/net/ipv4/tcp_sack
sudo echo reno | sudo tee /proc/sys/net/ipv4/tcp_congestion_control
# Generate files of size ~250MB (this takes a while)
i=1
while [ $i -lt 21 ]
do
sudo dd if=/dev/zero of=/srv/ftp/test$i.dat count=250 bs=1024000
i=$(($i+1))
done
sudo service vsftpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment