Skip to content

Commit

Permalink
Reconfigure for night len sweep
Browse files Browse the repository at this point in the history
  • Loading branch information
ccanel committed Feb 21, 2020
1 parent cdda791 commit 4dfae83
Showing 1 changed file with 58 additions and 54 deletions.
112 changes: 58 additions & 54 deletions experiments/buffers/nsdi2020.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# If True, then racks will be launched in serial.
SYNC = False
# The number of racks to mimic when creating the strobe schedule.
NUM_RACKS_FAKE = 25
NUM_RACKS_FAKE = 8
# Run static buffer experiments up to buffer size 2**STATIC_POW_MAX.
STATIC_POW_MAX = 7
# Long prebuffering sweep bounds.
Expand All @@ -36,8 +36,8 @@
SMALL_QUEUE_CAP = 16
BIG_QUEUE_CAP = 50
# Vary night len.
NIGHT_LEN_POW_MIN = 3
NIGHT_LEN_POW_MAX = 9
NIGHT_LEN_POW_MIN = 2
NIGHT_LEN_POW_MAX = 11
# Duration of prebuffering required for reTCP to achieve high utilization.
RETCP_RESIZE_us = 150

Expand All @@ -63,74 +63,78 @@ def main():
# CC modes are the outside loop to minimize how frequently we change the CC
# mode, since doing so requires restarting the cluster.
for cc in python_config.CCS:
if cc in ["cubic"]:
# (1) Old switches.
cnfs += [{"type": "fake_strobe",
"num_racks_fake": NUM_RACKS_FAKE,
"night_len_us": 1000 * python_config.TDF,
"day_len_us": 9000 * python_config.TDF,
"cc": cc}]
# (2) Future switches.
cnfs += [{"type": "fake_strobe",
"num_racks_fake": NUM_RACKS_FAKE,
"night_len_us": 1 * python_config.TDF,
"day_len_us": 9 * python_config.TDF, "cc": cc}]
# (3) Static buffers.
for exp in xrange(2, STATIC_POW_MAX + 1):
# Only do full sweeps for CUBIC and reTCP, but capture 16 packets
# for all variants.
if cc in ["cubic", "retcp"] or exp == 4:
cnfs += [{"type": "fake_strobe",
"num_racks_fake": NUM_RACKS_FAKE,
"small_queue_cap": 2**exp,
"big_queue_cap": 2**exp,
"cc": cc}]
# (4) Long prebuffering.
for us in xrange(RESIZE_LONG_MIN_us, RESIZE_LONG_MAX_us + 1,
RESIZE_LONG_DELTA_us):
# Only do a full sweep for CUBIC, but capture a few key us's for all
# variants.
if cc == "cubic" or us in ALL_VARIANTS_uss:
cnfs += [{"type": "fake_strobe",
"num_racks_fake": NUM_RACKS_FAKE,
"queue_resize": True,
"in_advance": int(round(us * python_config.TDF)),
"cc": cc}]
# (4) Short prebuffering, only for reTCP.
if cc == "retcp":
for us in xrange(RESIZE_SHORT_MIN_us, RESIZE_SHORT_MAX_us + 1,
RESIZE_SHORT_DELTA_us):
cnfs += [{"type": "fake_strobe",
"num_racks_fake": NUM_RACKS_FAKE,
"queue_resize": True,
"in_advance": int(round(us * python_config.TDF)),
"cc": cc}]
# if cc in ["cubic"]:
# # (1) Old switches.
# cnfs += [{"type": "fake_strobe",
# "num_racks_fake": NUM_RACKS_FAKE,
# "night_len_us": 1000 * python_config.TDF,
# "day_len_us": 9000 * python_config.TDF,
# "cc": cc}]
# # (2) Future switches.
# cnfs += [{"type": "fake_strobe",
# "num_racks_fake": NUM_RACKS_FAKE,
# "night_len_us": 1 * python_config.TDF,
# "day_len_us": 9 * python_config.TDF, "cc": cc}]
# # (3) Static buffers.
# for exp in xrange(2, STATIC_POW_MAX + 1):
# # Only do full sweeps for CUBIC and reTCP, but capture 16 packets
# # for all variants.
# if cc in ["cubic", "retcp"] or exp == 4:
# cnfs += [{"type": "fake_strobe",
# "num_racks_fake": NUM_RACKS_FAKE,
# "small_queue_cap": 2**exp,
# "big_queue_cap": 2**exp,
# "cc": cc}]
# # (4) Long prebuffering.
# for us in xrange(RESIZE_LONG_MIN_us, RESIZE_LONG_MAX_us + 1,
# RESIZE_LONG_DELTA_us):
# # Only do a full sweep for CUBIC, but capture a few key us's for all
# # variants.
# if cc == "cubic" or us in ALL_VARIANTS_uss:
# cnfs += [{"type": "fake_strobe",
# "num_racks_fake": NUM_RACKS_FAKE,
# "queue_resize": True,
# "in_advance": int(round(us * python_config.TDF)),
# "cc": cc}]
# # (4) Short prebuffering, only for reTCP.
# if cc == "retcp":
# for us in xrange(RESIZE_SHORT_MIN_us, RESIZE_SHORT_MAX_us + 1,
# RESIZE_SHORT_DELTA_us):
# cnfs += [{"type": "fake_strobe",
# "num_racks_fake": NUM_RACKS_FAKE,
# "queue_resize": True,
# "in_advance": int(round(us * python_config.TDF)),
# "cc": cc}]
# (5) Vary night len.
for exp in xrange(NIGHT_LEN_POW_MIN, NIGHT_LEN_POW_MAX + 1):
night_len_us = int(round(2**exp * python_config.TDF))
night_len_us = 2**exp
day_len_us = 9 * night_len_us
night_len_us_tdf = int(round(night_len_us * python_config.TDF))
day_len_us_tdf = int(round(day_len_us * python_config.TDF))
# CUBIC with static buffers.
if cc == "cubic":
cnfs += [{"type": "fake_strobe",
"num_racks_fake": NUM_RACKS_FAKE,
"small_queue_cap": SMALL_QUEUE_CAP,
"big_queue_cap": SMALL_QUEUE_CAP,
"night_len_us": night_len_us,
"day_len_us": day_len_us,
"night_len_us": night_len_us_tdf,
"day_len_us": day_len_us_tdf,
"cc": cc}]
# reTCP with dynamic buffers.
if cc == "retcp":
cnfs += [{"type": "fake_strobe",
"num_racks_fake": NUM_RACKS_FAKE,
"small_queue_cap": SMALL_QUEUE_CAP,
"big_queue_cap": BIG_QUEUE_CAP,
"night_len_us": night_len_us,
"day_len_us": day_len_us,
"night_len_us": night_len_us_tdf,
"day_len_us": day_len_us_tdf,
"queue_resize": True,
"in_advance": int(round(
min(day_len_us / python_config.TDF,
RETCP_RESIZE_us) *
python_config.TDF)),
# Use 150us or 75% of the circuit downtime length,
# whichever is less.
"in_advance": int(round(min(
0.75 * ((NUM_RACKS_FAKE - 1) *
(night_len_us + day_len_us) - day_len_us),
RETCP_RESIZE_us) * python_config.TDF)),
"cc": cc}]

# Set paramters that apply to all configurations.
Expand Down

0 comments on commit 4dfae83

Please sign in to comment.