简体   繁体   中英

How to solve the cassandra batch write to bring the performance problems

when I write to Cassandra in java, my cup usage up to 100%, Specific details are written below:

  1. I use 5 threads write to Cassandra cluster;
  2. each thread will establish a connection;
  3. Write 3000 data in batches at a time, each data is an average of 50KB.

This is the way I write to Cassandra in java: batch_insert_statement

Have you ever met this similar problem? could you tell me something about it? thanks a lot.

update. The following is my computer's details:

cpu-memory-details

You don't have to establish a connection for each thread. Initialize the connection once and allow the threads to utilize that. Establishing connection each time is a costly act.

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