What causes Cassandra cluster to be 20% slower in read operations than a single-node cluster?
I have set up a Cassandra cluster with 3 nodes and tested read performance. I used Cassandra's integrated stress test tool. For comparison, there is one separate node (single-node cluster) on the same server.
The configuration is as follows: 1 Hyper-v2 server with Cassandra cluster (3 nodes, v. 3.11) + 1 single-node cluster, every node on its own virtual machine (CentOS 7) and its own physical SSD drive (4 drives).
Every virtual machine has 16GB of RAM and has access to all 16 logical cores of the server CPU. Network speed between nodes is around 500MB/s. I ran the READ test a few times with 1M rows and warm-up enabled. All default settings are used (incl. consistency=1).
Single node Cassandra always achieved better read performance (around 2400 op/s), than the cluster (2000 op/s). Why am I seeing a performance degradation in a multi node cluster? What am I doing wrong in the cluster configuration?
CREATE KEYSPACE keyspace1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
CREATE TABLE keyspace1.standard1 (
key blob PRIMARY KEY,
"C0" blob,
"C1" blob,
"C2" blob,
"C3" blob,
"C4" blob
) WITH COMPACT STORAGE
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'enabled': 'false'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
Test results
cassandra-stress read n=1000000 cl=local_one -node IPADDRESS -rate threads=1