# 1TB per node # TARGET_DATASET_SIZE = len(cluster_private_ips) * 1024 * 1024 * 1024 * 1024 TARGET_DATASET_SIZE = props['target_dataset_size_gb'] * 1024 * 1024 * 1024 REPLICATION_FACTOR = 3 COMPACTION_STRATEGY = props['compaction_strategy'] ROW_COUNT = int(TARGET_DATASET_SIZE / ROW_SIZE_BYTES / REPLICATION_FACTOR) BACKGROUND_LOAD_OPS = 25000 # Start Scylla/Cassandra nodes (except one to be a replacement node later) if props['cluster_type'] == 'scylla': cluster = Scylla(all_public_ips, all_private_ips, all_private_ips[0], props) cluster.install() cluster = Scylla(cluster_public_ips, cluster_private_ips, cluster_private_ips[0], props) cluster.start() else: cluster = Cassandra(all_public_ips, all_private_ips, all_private_ips[0], props) cluster.install() if "cassandra_extra_env_opts" in props: cluster.append_env_configuration(props["cassandra_extra_env_opts"]) cluster = Cassandra(cluster_public_ips, cluster_private_ips, cluster_private_ips[0], props) cluster.start() print("Nodes started at:", datetime.now().strftime("%H:%M:%S"))
cluster_public_ips = env['cluster_public_ips'] loadgenerator_public_ips = env['loadgenerator_public_ips'] loadgenerator_count = len(loadgenerator_public_ips) ROW_SIZE_BYTES = 300 # 20GB per node TARGET_DATASET_SIZE = len(cluster_private_ips) * 20 * 1024 * 1024 * 1024 REPLICATION_FACTOR = 3 ROW_COUNT = int(TARGET_DATASET_SIZE / ROW_SIZE_BYTES / REPLICATION_FACTOR) # Start Scylla nodes s = Scylla(env['cluster_public_ips'], env['cluster_private_ips'], env['cluster_private_ips'][0], props) s.install() s.start() print("Nodes started at:", datetime.now().strftime("%H:%M:%S")) cs = CassandraStress(env['loadgenerator_public_ips'], props, scylla_tools=False) cs.install() cs.prepare() print("Loading started at:", datetime.now().strftime("%H:%M:%S")) cs.stress_seq_range( ROW_COUNT, 'write cl=QUORUM', f'-schema "replication(strategy=SimpleStrategy,replication_factor={REPLICATION_FACTOR})" -log hdrfile=profile.hdr -graph file=report.html title=benchmark revision=benchmark-0 -mode native cql3 -rate "threads=300 throttle=50000/s" -node {cluster_string}'