简体   繁体   中英

Cassandra read performance almost a constant with replication

I am stress testing cassandra with 8 nodes and eventhough I increased replication factor the read performance is almost a constant. I inserted 1000000 objects to the cluster and exactly 2 objects would be read many times so that those 2 objects become much popular. Others are accessed uniformly at random. Because I only read objects (no writes after the initial insert), I expected an increase of read performance when increase the replication factor. Instead, it remains almost a constant. Could you please help to figure out this behaviour?

Increasing the replication factor will not increase your read performance. Replication factor provides the concept of Data Availability . Which means, if the corresponding node get downs then the data is retrieved from the replication node. So the query time will be same what ever your replication factor is.

Refer http://www.datastax.com/documentation/cassandra/1.2/cassandra/architecture/architectureClientRequestsRead_c.html

you can get idea of about how the cassandra read works. If you want to increase your read performance then your data modelling should be in good manner. Which means your column family schema and your query should give support of good read performance. Without your column family schema and your query it is hard to explain further(I agree with @kdgregory comment). For data modelling refer http://www.datastax.com/documentation/cql/3.0/cql/ddl/ddl_anatomy_table_c.html .

确保您也在使用令牌识别客户端。

I could resolve this problem. In order to do it, Cassandra setting we required to disable was dclocal_read_repair_chance. Even though this settings was said to be disabled by default, it was not in my experiment. Also we reduced the object count to 10000. Finally, we could see actually a performance increase for 80% read and 20% write access distribution at replication factor 2 and 3. Moreover, at replication factor 2 we saw a performance increase when 60% read and 40% write access distribution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM