diff --git a/benchmark/docker-composes/cassandra-single-node.yml b/benchmark/docker-composes/cassandra-single-node.yml new file mode 100644 index 00000000..1b65e6d3 --- /dev/null +++ b/benchmark/docker-composes/cassandra-single-node.yml @@ -0,0 +1,24 @@ +# CHANGES REQUIRED BEFORE RUNNING: +# - Change HEAP_NEWSIZE and MAX_HEAP_SIZE according to instruction + +networks: + public: + name: cassandra_single_node_public + driver: bridge + ipam: + driver: default + config: + - subnet: 172.43.0.0/16 + +services: + cassandra: + image: cassandra:latest + networks: + public: + ipv4_address: 172.43.0.2 + container_name: cassandra-single-node + environment: + - MAX_HEAP_SIZE=2048M # Recommended 1/4 of total RAM + - HEAP_NEWSIZE=512M # This is recommended to be 1/4 of MAX_HEAP_SIZE + - JVM_OPTS=-Dcassandra.skip_wait_for_gossip_to_settle=0 -Dcassandra.ring_delay_ms=5000 + diff --git a/benchmark/docker-composes/cassandra-three-node.yml b/benchmark/docker-composes/cassandra-three-node.yml new file mode 100644 index 00000000..97eb02c0 --- /dev/null +++ b/benchmark/docker-composes/cassandra-three-node.yml @@ -0,0 +1,73 @@ +# CHANGES REQUIRED BEFORE RUNNING: +# - Change HEAP_NEWSIZE and MAX_HEAP_SIZE according to instruction + +# This docker compose is taken from scylladb/scylla-rust-driver repository +version: '2.4' # 2.4 is the last version that supports depends_on conditions for service health + +networks: + public: + name: cassandra-three-node-network + driver: bridge + ipam: + driver: default + config: + - subnet: 172.44.0.0/16 + +services: + cassandra1: + image: cassandra + container_name: cassandra-node-1-of-3 + healthcheck: + test: ["CMD", "cqlsh", "-e", "describe keyspaces" ] + interval: 5s + timeout: 5s + retries: 60 + networks: + public: + ipv4_address: 172.44.0.2 + environment: + - CASSANDRA_BROADCAST_ADDRESS=172.44.0.2 + # REMEMBER TO CHANGE THOSE VALUES FOR ALL INSTANCES + - MAX_HEAP_SIZE=2048M # Recommended 1/12 [1/(4*numberOfNodes)] of total RAM + - HEAP_NEWSIZE=512M # This is recommended to be 1/4 of MAX_HEAP_SIZE + - JVM_OPTS=-Dcassandra.skip_wait_for_gossip_to_settle=0 -Dcassandra.ring_delay_ms=5000 + cassandra2: + image: cassandra + container_name: cassandra-node-2-of-3 + healthcheck: + test: ["CMD", "cqlsh", "-e", "describe keyspaces" ] + interval: 5s + timeout: 5s + retries: 60 + networks: + public: + ipv4_address: 172.44.0.3 + environment: + - CASSANDRA_BROADCAST_ADDRESS=172.44.0.3 + - CASSANDRA_SEEDS=172.44.0.2 + - MAX_HEAP_SIZE=2048M + - HEAP_NEWSIZE=512M + - JVM_OPTS=-Dcassandra.skip_wait_for_gossip_to_settle=0 -Dcassandra.ring_delay_ms=5000 + depends_on: + cassandra1: + condition: service_healthy + cassandra3: + image: cassandra + container_name: cassandra-node-3-of-3 + healthcheck: + test: ["CMD", "cqlsh", "-e", "describe keyspaces" ] + interval: 5s + timeout: 5s + retries: 60 + networks: + public: + ipv4_address: 172.44.0.4 + environment: + - CASSANDRA_BROADCAST_ADDRESS=172.44.0.4 + - CASSANDRA_SEEDS=172.44.0.2,172.44.0.3 + - MAX_HEAP_SIZE=2048M + - HEAP_NEWSIZE=512M + - JVM_OPTS=-Dcassandra.skip_wait_for_gossip_to_settle=0 -Dcassandra.ring_delay_ms=5000 + depends_on: + cassandra2: + condition: service_healthy