Hi every one

So I have a 2 node( node1, node2 ) cassandra 3.11 cluster on which I have a keyspace with a replication factor of 2. this keyspace has only this table:

CREATE KEYSPACE myks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '2'} AND durable_writes = true;

CREATE TABLE myks.table1 (
    id1 int,
    id2 int,
    id3 int,
    att1 int,
    PRIMARY KEY ((id1, id2, id3), att1)
) WITH CLUSTERING ORDER BY (att1 ASC)
    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 = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    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';


I run two tasks against this table:

task one involves reading first:

"SELECT DISTINCT id1, id2, id3 FROM table1 WHERE id1 = :id1-value ALLOW FILTERING;";

and then, per each result, reading :
"SELECT COUNT( att1 ) FROM table1 WHERE id1 = :id1-value AND id2 = :id2-value AND id3 = :id3-value ;";

and once done adds new data by executing this:

"INSERT INTO table1 ( id1, id2, id3, att1 ) VALUES ( :id1-value, :id2-value, :id3-value, :att1-value ) USING TTL <ttl>;"

as long as there is data for different id1s. All of these are at CL one or any for insert.

task two only does the select part, but doesn't add any new data, again for a hundred different id1 values in each run. these are java applications and use com.datastax.driver.

my problem is that when I am running these tasks, specially task one, I always see a lot more cpu load, as in ,on average a ratio of 10 to 1 and sometimes even as high as 30 to 1 load, on node2 than node1. Both of these node have the same spec. I don't know how to explain this or what configuration parameter I need to look into in order to explain this, and I couldn't find any thing on-line either. Any hint or suggestion would be really appreciated.

thanks,

--
Kaveh Minooie

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org

Reply via email to