adding QUIC Siri experience: Siri traffic using QUIC instead of TCP

This commit is contained in:
Quentin De Coninck 2017-05-31 14:51:01 +02:00
parent 16667db3cf
commit e3e45004b4
4 changed files with 87 additions and 0 deletions

View File

@ -20,6 +20,7 @@ class MpExperience:
SIRIHTTP = "sirihttp" SIRIHTTP = "sirihttp"
SIRIMSG = "sirimsg" SIRIMSG = "sirimsg"
QUIC = "quic" QUIC = "quic"
QUICSIRI = "quicsiri"
def __init__(self, xpParam, mpTopo, mpConfig): def __init__(self, xpParam, mpTopo, mpConfig):
self.xpParam = xpParam self.xpParam = xpParam

View File

@ -0,0 +1,82 @@
from mpExperience import MpExperience
from mpParamXp import MpParamXp
import os
class MpExperienceQUICSiri(MpExperience):
GO_BIN = "/usr/local/go/bin/go"
SERVER_LOG = "quic_server.log"
CLIENT_LOG = "quic_client.log"
CLIENT_GO_FILE = "~/go/src/github.com/lucas-clemente/quic-go/example/siri/client/siri.go"
SERVER_GO_FILE = "~/go/src/github.com/lucas-clemente/quic-go/example/siri/siri.go"
PING_OUTPUT = "ping.log"
def __init__(self, xpParamFile, mpTopo, mpConfig):
MpExperience.__init__(self, xpParamFile, mpTopo, mpConfig)
self.loadParam()
self.ping()
MpExperience.classicRun(self)
def ping(self):
self.mpTopo.commandTo(self.mpConfig.client, "rm " + \
MpExperienceQUICSiri.PING_OUTPUT )
count = self.xpParam.getParam(MpParamXp.PINGCOUNT)
for i in range(0, self.mpConfig.getClientInterfaceCount()):
cmd = self.pingCommand(self.mpConfig.getClientIP(i),
self.mpConfig.getServerIP(), n = count)
self.mpTopo.commandTo(self.mpConfig.client, cmd)
def pingCommand(self, fromIP, toIP, n=5):
s = "ping -c " + str(n) + " -I " + fromIP + " " + toIP + \
" >> " + MpExperienceQUICSiri.PING_OUTPUT
print(s)
return s
def loadParam(self):
"""
todo : param LD_PRELOAD ??
"""
self.run_time = self.xpParam.getParam(MpParamXp.QUICSIRIRUNTIME)
self.multipath = self.xpParam.getParam(MpParamXp.QUICMULTIPATH)
def prepare(self):
MpExperience.prepare(self)
self.mpTopo.commandTo(self.mpConfig.client, "rm " + \
MpExperienceQUICSiri.CLIENT_LOG )
self.mpTopo.commandTo(self.mpConfig.server, "rm " + \
MpExperienceQUICSiri.SERVER_LOG )
def getQUICSiriServerCmd(self):
s = MpExperienceQUICSiri.GO_BIN + " run " + MpExperienceQUICSiri.SERVER_GO_FILE
s += " -addr 0.0.0.0:8080 &>" + MpExperienceQUICSiri.SERVER_LOG + " &"
print(s)
return s
def getQUICClientCmd(self):
s = MpExperienceQUICSiri.GO_BIN + " run " + MpExperienceQUICSiri.CLIENT_GO_FILE
s += " -addr " + self.mpConfig.getServerIP() + ":8080 -runTime " + self.run_time + "s"
if int(self.multipath) > 0:
s += " -m"
s += " &>" + MpExperienceQUICSiri.CLIENT_LOG
print(s)
return s
def clean(self):
MpExperience.clean(self)
def run(self):
cmd = self.getQUICSiriServerCmd()
self.mpTopo.commandTo(self.mpConfig.server, "netstat -sn > netstat_server_before")
self.mpTopo.commandTo(self.mpConfig.server, cmd)
self.mpTopo.commandTo(self.mpConfig.client, "sleep 2")
cmd = self.getQUICSiriClientCmd()
self.mpTopo.commandTo(self.mpConfig.client, "netstat -sn > netstat_client_before")
self.mpTopo.commandTo(self.mpConfig.client, cmd)
self.mpTopo.commandTo(self.mpConfig.server, "netstat -sn > netstat_server_after")
self.mpTopo.commandTo(self.mpConfig.client, "netstat -sn > netstat_client_after")
self.mpTopo.commandTo(self.mpConfig.server, "pkill -f " + MpExperienceQUICSiri.SERVER_GO_FILE)
self.mpTopo.commandTo(self.mpConfig.client, "sleep 2")
# Need to delete the go-build directory in tmp; could lead to no more space left error
self.mpTopo.commandTo(self.mpConfig.client, "rm -r /tmp/go-build*")

View File

@ -65,6 +65,7 @@ class MpParamXp(MpParam):
MSGNBREQUESTS = "msgNbRequests" MSGNBREQUESTS = "msgNbRequests"
MSGBYTES = "msgBytes" MSGBYTES = "msgBytes"
QUICMULTIPATH = "quicMultipath" QUICMULTIPATH = "quicMultipath"
QUICSIRIRUNTIME = "quicSiriRunTime"
PRIOPATH0 = "prioPath0" PRIOPATH0 = "prioPath0"
PRIOPATH1 = "prioPath1" PRIOPATH1 = "prioPath1"
BACKUPPATH0 = "backupPath0" BACKUPPATH0 = "backupPath0"

View File

@ -23,6 +23,7 @@ from mpExperienceMsg import MpExperienceMsg
from mpExperienceSiriHTTP import MpExperienceSiriHTTP from mpExperienceSiriHTTP import MpExperienceSiriHTTP
from mpExperienceSiriMsg import MpExperienceSiriMsg from mpExperienceSiriMsg import MpExperienceSiriMsg
from mpExperienceQUIC import MpExperienceQUIC from mpExperienceQUIC import MpExperienceQUIC
from mpExperienceQUICSiri import MpExperienceQUICSiri
from mpExperienceNone import MpExperienceNone from mpExperienceNone import MpExperienceNone
from mpExperience import MpExperience from mpExperience import MpExperience
from mpECMPSingleInterfaceTopo import MpECMPSingleInterfaceTopo from mpECMPSingleInterfaceTopo import MpECMPSingleInterfaceTopo
@ -134,6 +135,8 @@ class MpXpRunner:
MpExperienceSiriMsg(self.xpParam, self.mpTopo, self.mpTopoConfig) MpExperienceSiriMsg(self.xpParam, self.mpTopo, self.mpTopoConfig)
elif xp == MpExperience.QUIC: elif xp == MpExperience.QUIC:
MpExperienceQUIC(self.xpParam, self.mpTopo, self.mpTopoConfig) MpExperienceQUIC(self.xpParam, self.mpTopo, self.mpTopoConfig)
elif xp == MpExperience.QUICSIRI:
MpExperienceQUICSiri(self.xpParam, self.mpTopo, self.mpTopoConfig)
else: else:
print("Unfound xp type..." + xp) print("Unfound xp type..." + xp)