Exemple #1
0
            env.envvars['NBA_IO_BATCH_SIZE'] = str(params[0])
            env.envvars['NBA_COMP_BATCH_SIZE'] = str(params[1])
            env.envvars['NBA_COMP_PPDEPTH'] = str(params[2])
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU_PORT'] = str(params[3])
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU'] = str(params[4])
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU_NODE'] = str(params[5])
            psize = str(params[6])
            branch_lv_count = int(params[7])
            speed_local = int(params[8])

            # Configure what and how to measure things.
            thruput_fetcher = env.measure_thruput(begin_after=15.0, repeat=False)
            cpu_fetcher     = env.measure_cpu_usage(interval=1, begin_after=17.0, repeat=False)

            marcel.set_args("-i", "xge0", "-f", "0,", "-v", "4", "-p", psize, "-g", speed_local, "-l", "1")
            with marcel:

                # Generate pipeline config.
                unit = "None() -> "
                end_config = "L2Forward(method echoback) -> ToOutput();"
                for i in range(branch_lv_count):
                    end_config = unit + end_config
                temp_path = os.path.normpath(os.path.join('configs', "__temp.click"))
                outfile = open(temp_path, "w")
                outfile.write(end_config)
                outfile.close()

                # Run.
                loop = asyncio.get_event_loop()
                loop.run_until_complete(env.execute_main('single-port-multi-cpu.py', "__temp.click", running_time=20.0))
Exemple #2
0
            env.envvars['NBA_IO_BATCH_SIZE'] = str(params[0]) 
            env.envvars['NBA_COMP_BATCH_SIZE'] = str(params[1]) 
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU_PORT'] = str(params[2])
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU'] = str(params[3])
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU_NODE'] = str(params[4])
            psize = str(params[5])

            # Configure what and how to measure things.
            thruput_fetcher = env.measure_thruput(begin_after=15.0, repeat=False)
            cpu_fetcher     = env.measure_cpu_usage(interval=1, begin_after=17.0, repeat=False)

            # Make progress of the generators to ensure configuration is applied.
            next(thruput_fetcher)
            next(cpu_fetcher)

            lahti.set_args("-i", "all", "-f", "0,", "-v", "4", "-p", psize)
            marcel.set_args("-i", "all", "-f", "0,", "-v", "4", "-p", psize)

            with lahti, marcel:
                # Run.
                env.execute_main('single-port-multi-cpu.py', sys.argv[1], running_time=20.0)

                # Retrieve the results.
                print('{0:5} {1:5} {2:5} {3:5} {4:5} {5:6}'.format(*params), end=' ')

                for thruput in thruput_fetcher:
                    print('totalpkt: {0:10,}'.format(thruput.total_fwd_pps), end=' ')

                    io_cores = env.get_io_cores(8)
                    comp_cores = env.get_comp_cores(8, 'same')
                    for cpu_usages in cpu_fetcher:
Exemple #3
0
            env.envvars['NBA_IO_BATCH_SIZE'] = str(params[0])
            env.envvars['NBA_COMP_BATCH_SIZE'] = str(params[1])
            env.envvars['NBA_COMP_PPDEPTH'] = str(params[2])
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU_PORT'] = str(params[3])
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU'] = str(params[4])
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU_NODE'] = str(params[5])
            psize = str(params[6])
            speed_local = int(params[7])
            env.envvars['NBA_COPROC_PPDEPTH'] = str(params[8])

            # Configure what and how to measure things.
            thruput_fetcher = env.measure_thruput(begin_after=15.0, repeat=False)
            cpu_fetcher     = env.measure_cpu_usage(interval=1, begin_after=17.0, repeat=False)

            ip_version = '6' if 'ipv6' in app_name else '4'
            marcel.set_args("-i", "all", "-f", "0", "-v", ip_version, "-p", psize, "-g", speed_local, "-l", "1")
            with marcel:

                # Run.
                loop = asyncio.get_event_loop()
                loop.run_until_complete(env.execute_main('rss.py', "ipv6-router.click", running_time=20.0))

                # Retrieve the results.
                print('{0:5} {1:5} {2:5} {3:5} {4:5} {5:5} pkt {6:6} {7:7}Gbps cppdepth {8:8}'.format(params[0], params[1], params[2], params[3], params[4], params[5], params[6], params[7], params[8]), end=' ')

                for thruput in thruput_fetcher:
                    print('delay: {0:10}'.format(marcel.get_delay()), end=' ')
                    print('totalpkt: {0:10}'.format(thruput.total_fwd_pps), end=' ')
                    print('totaldrop: {0:10}'.format(thruput.total_in_errs), end=' ')

                    io_cores = env.get_io_cores(8)
Exemple #4
0
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU'] = str(params[3])
            env.envvars['NBA_SINGLE_PORT_MULTI_CPU_NODE'] = str(params[4])
            psize = str(params[5])

            # Configure what and how to measure things.
            thruput_fetcher = env.measure_thruput(begin_after=15.0,
                                                  repeat=False)
            cpu_fetcher = env.measure_cpu_usage(interval=1,
                                                begin_after=17.0,
                                                repeat=False)

            # Make progress of the generators to ensure configuration is applied.
            next(thruput_fetcher)
            next(cpu_fetcher)

            lahti.set_args("-i", "all", "-f", "0,", "-v", "4", "-p", psize)
            marcel.set_args("-i", "all", "-f", "0,", "-v", "4", "-p", psize)

            with lahti, marcel:
                # Run.
                env.execute_main('single-port-multi-cpu.py',
                                 sys.argv[1],
                                 running_time=20.0)

                # Retrieve the results.
                print('{0:5} {1:5} {2:5} {3:5} {4:5} {5:6}'.format(*params),
                      end=' ')

                for thruput in thruput_fetcher:
                    print('totalpkt: {0:10,}'.format(thruput.total_fwd_pps),
                          end=' ')