def Run(benchmark_spec): """Run memtier against enterprise redis and measure latency and throughput. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ load_vms = benchmark_spec.vm_groups['clients'] redis_vm = benchmark_spec.vm_groups['servers'][0] numa_pages_migrated, _ = redis_vm.RemoteCommand( 'cat /proc/vmstat | grep numa_pages_migrated') numa_pages_migrated = numa_pages_migrated.split(' ')[1] numa_balancing, _ = redis_vm.RemoteCommand( 'cat /proc/sys/kernel/numa_balancing') setup_metadata = { 'numa_pages_migrated': numa_pages_migrated.rstrip(), 'numa_balancing': numa_balancing.rstrip(), } results = redis_enterprise.Run(redis_vm, load_vms, REDIS_PORT) for result in results: result.metadata.update(setup_metadata) return results
def Run(benchmark_spec): """Run memtier against enterprise redis and measure latency and throughput. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ load_vms = benchmark_spec.vm_groups['clients'] redis_vms = benchmark_spec.vm_groups['servers'] redis_vm = redis_vms[0] numa_pages_migrated, _ = redis_vm.RemoteCommand( 'cat /proc/vmstat | grep numa_pages_migrated') numa_pages_migrated = numa_pages_migrated.split(' ')[1] numa_balancing, _ = redis_vm.RemoteCommand( 'cat /proc/sys/kernel/numa_balancing') setup_metadata = { 'numa_pages_migrated': numa_pages_migrated.rstrip(), 'numa_balancing': numa_balancing.rstrip(), } if _OPTIMIZE_THROUGHPUT.value: optimizer = redis_enterprise.ThroughputOptimizer( redis_vms, load_vms, REDIS_PORT) optimal_throughput, results = optimizer.GetOptimalThroughput() if not optimal_throughput: raise errors.Benchmarks.RunError( 'Did not get a throughput under 1ms metric. Try decreasing the ' '--enterprise_redis_min_threads value.') logging.info('Found optimal throughput %s', optimal_throughput) else: _, results = redis_enterprise.Run(redis_vms, load_vms, REDIS_PORT) for result in results: result.metadata.update(setup_metadata) return results