예제 #1
0
def main():
    global NUM_QUE
    core_aff = []
    for i in range(0, NUM_QUE):
        aff = march.make_Simp_core_aff(i, [i])
        core_aff.append(aff)
    core_list = range(0, NUM_QUE)
    sched = march.make_service_sched("LinuxNetStack", [NUM_QUE, core_list],
                                     core_aff)
    m0 = march.make_machine(mid=0, name="machine_0", cores=40, netSched=sched)
    m1 = march.make_machine(mid=1, name="machine_1", cores=40, netSched=sched)
    m2 = march.make_machine(mid=2, name="machine_2", cores=40, netSched=sched)
    m3 = march.make_machine(mid=3, name="machine_3", cores=40, netSched=sched)

    machines = [m0, m1, m2, m3]

    with open("./json/machines.json", "w+") as f:
        json.dump(machines, f, indent=2)
예제 #2
0
def main():
	global NUM_QUE
	global FANOUT
	core_aff = []
	for i in range(0, NUM_QUE):
		aff = march.make_Simp_core_aff(i, [i])
		core_aff.append(aff)
	core_list = range(0, NUM_QUE)
	sched = march.make_service_sched("LinuxNetStack", [NUM_QUE, core_list], core_aff)
	machines = []
	for i in range(0, FANOUT + 1):
		m = march.make_machine(mid = i, name = "machine_" + str(i), cores = 40, netSched = sched)
		machines.append(m)

	with open("./json/machines.json", "w+") as f:
		json.dump(machines, f, indent=2)
예제 #3
0
def main():
	global NUM_QUE
	global FANOUT
	core_aff = []
	for i in range(0, NUM_QUE):
		aff = march.make_Simp_core_aff(i, [i])
		core_aff.append(aff)
	core_list = range(0, NUM_QUE)

	machines = []
	sched = march.make_service_sched("LinuxNetStack", [NUM_QUE, core_list], core_aff)

	# need 2x machines + 1 to hold both ngx, memcached pairs and a load balancer
	for i in range(0, FANOUT + 1):
		mach_name = "machine_" + str(i)
		mach = march.make_machine(mid = i, name = mach_name, cores = 40, netSched = sched)
		machines.append(mach)

	with open("./json/machines.json", "w+") as f:
		json.dump(machines, f, indent=2)