when I write to Cassandra in java, my cup usage up to 100%, Specific details are written below:
- I use 5 threads write to Cassandra cluster;
- each thread will establish a connection;
- 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:
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.