def Run(benchmark_spec): """Spawn YCSB and gather the results. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample instances. """ vms = benchmark_spec.vms loaders = _GetVMsByRole(vms)['loaders'] aerospike_vms = _GetVMsByRole(vms)['aerospike_vms'] logging.debug('Loaders: %s', loaders) vms = benchmark_spec.vms executor = ycsb.YCSBExecutor( 'aerospike', **{ 'as.host': aerospike_vms[0].internal_ip, 'as.namespace': 'test' }) metadata = { 'ycsb_client_vms': FLAGS.ycsb_client_vms, 'num_vms': len(aerospike_vms), 'scratch_disk_type': FLAGS.scratch_disk_type, 'scratch_disk_size': FLAGS.scratch_disk_size } samples = list(executor.LoadAndRun(loaders)) for sample in samples: sample.metadata.update(metadata) return samples
def Run(benchmark_spec): """Spawn YCSB and gather the results. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample instances. """ vms = benchmark_spec.vms table_name = _GetTableName() # Add hbase conf dir to the classpath, ALPN to the bootclasspath. ycsb_memory = ycsb_memory = min(vms[0].total_memory_kb // 1024, 4096) jvm_args = pipes.quote('-Xmx{0}m -Xbootclasspath/p:{1}'.format( ycsb_memory, _GetALPNLocalPath())) executor_flags = { 'cp': hbase.HBASE_CONF_DIR, 'jvm-args': jvm_args, 'table': table_name } executor = ycsb.YCSBExecutor('hbase-10', **executor_flags) cluster_info = _GetClusterDescription( FLAGS.project or _GetDefaultProject(), FLAGS.google_bigtable_zone_name, FLAGS.google_bigtable_cluster_name) metadata = { 'ycsb_client_vms': len(vms), 'bigtable_nodes': cluster_info.get('serveNodes') } kwargs = {'columnfamily': COLUMN_FAMILY} # By default YCSB uses a BufferedMutator for Puts / Deletes. # This leads to incorrect update latencies, since since the call returns # before the request is acked by the server. # Disable this behavior during the benchmark run. run_kwargs = {'clientbuffering': 'false'} run_kwargs.update(kwargs) samples = list( executor.LoadAndRun(vms, load_kwargs=kwargs, run_kwargs=run_kwargs)) for sample in samples: sample.metadata.update(metadata) return samples
def Run(benchmark_spec): """Run YCSB with against MongoDB. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ vms = benchmark_spec.vms vm = vms[1] executor = ycsb.YCSBExecutor('mongodb') kwargs = { 'mongodb.url': 'mongodb://%s:27017' % vms[0].internal_ip, 'mongodb.writeConcern': FLAGS.mongodb_writeconcern } samples = list( executor.LoadAndRun([vm], load_kwargs=kwargs, run_kwargs=kwargs)) return samples
def Run(benchmark_spec): """Spawn YCSB and gather the results. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample instances. """ vms = benchmark_spec.vms loaders = _GetVMsByRole(vms)['loaders'] cassandra_vms = _GetVMsByRole(vms)['cassandra_vms'] logging.debug('Loaders: %s', loaders) vms = benchmark_spec.vms executor = ycsb.YCSBExecutor( 'cassandra-10', hosts=','.join(vm.internal_ip for vm in cassandra_vms)) kwargs = {'hosts': ','.join(vm.internal_ip for vm in cassandra_vms), 'columnfamily': COLUMN_FAMILY, 'cassandra.readconsistencylevel': READ_CONSISTENCY, 'cassandra.scanconsistencylevel': READ_CONSISTENCY, 'cassandra.writeconsistencylevel': WRITE_CONSISTENCY, 'cassandra.deleteconsistencylevel': WRITE_CONSISTENCY} metadata = {'ycsb_client_vms': FLAGS.ycsb_client_vms, 'num_vms': len(cassandra_vms), 'scratch_disk_type': FLAGS.scratch_disk_type, 'scratch_disk_size': FLAGS.scratch_disk_size} samples = list(executor.LoadAndRun(loaders, load_kwargs=kwargs, run_kwargs=kwargs)) for sample in samples: sample.metadata.update(metadata) return samples
def Run(benchmark_spec): """Spawn YCSB and gather the results. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ vms = benchmark_spec.vms by_role = _GetVMsByRole(vms) loaders = by_role['loaders'] logging.info('Loaders: %s', loaders) executor = ycsb.YCSBExecutor('hbase-10') metadata = { 'ycsb_client_vms': len(loaders), 'hbase_cluster_size': len(by_role['hbase_vms']), 'hbase_zookeeper_nodes': FLAGS.hbase_zookeeper_nodes, 'scratch_disk_type': FLAGS.scratch_disk_type, 'scratch_disk_size': FLAGS.scratch_disk_size } kwargs = {'columnfamily': COLUMN_FAMILY} # By default YCSB uses a BufferedMutator for Puts / Deletes. # This leads to incorrect update latencies, since since the call returns # before the request is acked by the server. # Disable this behavior during the benchmark run. run_kwargs = {'clientbuffering': 'false'} run_kwargs.update(kwargs) samples = list( executor.LoadAndRun(loaders, load_kwargs=kwargs, run_kwargs=run_kwargs)) for sample in samples: sample.metadata.update(metadata) return samples
def Run(benchmark_spec): """Spawn YCSB and gather the results. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample instances. """ vms = benchmark_spec.vms table_name = _GetTableName() executor = ycsb.YCSBExecutor('hbase-10', table=table_name) cluster_info = _GetClusterDescription( FLAGS.project or _GetDefaultProject(), FLAGS.google_bigtable_zone_name, FLAGS.google_bigtable_cluster_name) metadata = { 'ycsb_client_vms': len(vms), 'bigtable_nodes': cluster_info.get('serveNodes') } kwargs = {'columnfamily': COLUMN_FAMILY} # By default YCSB uses a BufferedMutator for Puts / Deletes. # This leads to incorrect update latencies, since since the call returns # before the request is acked by the server. # Disable this behavior during the benchmark run. run_kwargs = {'clientbuffering': 'false'} run_kwargs.update(kwargs) samples = list( executor.LoadAndRun(vms, load_kwargs=kwargs, run_kwargs=run_kwargs)) for sample in samples: sample.metadata.update(metadata) return samples
def Run(benchmark_spec): """Run memtier_benchmark against Redis. Args: benchmark_spec: The benchmark specification. Contains all data that is required to run the benchmark. Returns: A list of sample.Sample objects. """ redis_vm = benchmark_spec.vms[0] ycsb_vms = benchmark_spec.vms[1:] executor = ycsb.YCSBExecutor('redis', **{'redis.host': redis_vm.internal_ip}) metadata = {'ycsb_client_vms': FLAGS.ycsb_client_vms} # This thread count gives reasonably fast load time. samples = list(executor.LoadAndRun(ycsb_vms, load_kwargs={'threads': 4})) for sample in samples: sample.metadata.update(metadata) return samples