Skip to content

Commit

Permalink
Merge pull request #1233 from GoogleCloudPlatform/cassandra-param
Browse files Browse the repository at this point in the history
Add cassandra read concurrency flag
  • Loading branch information
yuyantingzero authored Dec 6, 2016
2 parents fe643ae + c1baedd commit ca97038
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion perfkitbenchmarker/data/cassandra/cassandra.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "{{ seeds }}"
concurrent_reads: 32
concurrent_reads: {{ concurrent_reads }}
concurrent_writes: {{ num_cpus * 8 }}
concurrent_counter_writes: 32
memtable_allocation_type: heap_buffers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def GenerateMetadataFromFlags(benchmark_spec):


metadata.update({
'concurrent_reads': FLAGS.cassandra_concurrent_reads,
'num_data_nodes': len(vm_dict[CASSANDRA_GROUP]),
'num_loader_nodes': len(vm_dict[CLIENT_GROUP]),
'num_cassandra_stress_threads': FLAGS.num_cassandra_stress_threads,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def Run(benchmark_spec):
'cassandra.deleteconsistencylevel': WRITE_CONSISTENCY}

metadata = {'ycsb_client_vms': FLAGS.ycsb_client_vms,
'num_vms': len(cassandra_vms)}
'num_vms': len(cassandra_vms),
'concurrent_reads': FLAGS.cassandra_concurrent_reads}

samples = list(benchmark_spec.executor.LoadAndRun(
loaders, load_kwargs=kwargs, run_kwargs=kwargs))
Expand Down
6 changes: 5 additions & 1 deletion perfkitbenchmarker/linux_packages/cassandra.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@

FLAGS = flags.FLAGS

flags.DEFINE_integer('cassandra_concurrent_reads', 32,
'Concurrent read requests each server accepts.')


def CheckPrerequisites():
"""Verifies that the required resources are present.
Expand Down Expand Up @@ -140,7 +143,8 @@ def Configure(vm, seed_vms):
'data_path': posixpath.join(vm.GetScratchDir(), 'cassandra'),
'seeds': ','.join(vm.internal_ip for vm in seed_vms),
'num_cpus': vm.num_cpus,
'cluster_name': 'Test cluster'}
'cluster_name': 'Test cluster',
'concurrent_reads': FLAGS.cassandra_concurrent_reads}

for config_file in [CASSANDRA_ENV_TEMPLATE, CASSANDRA_YAML_TEMPLATE]:
local_path = data.ResourcePath(config_file)
Expand Down

0 comments on commit ca97038

Please sign in to comment.