Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how does cassandra utilizes multiple cores to work

Tags:

cassandra

I would like to know how casandra uses multiple cores of a server machine. I ran cassandra process and can see it running as a single process. This means one core is enough for cassandra then why do we need 8 cores for optimal cassandra performance as mentioned on its site? Also, if cassandra is multithreaded then it would be all on the OS to run different threads on different cores right?

like image 843
Nipun Avatar asked Oct 30 '25 22:10

Nipun


1 Answers

Cassandra is highly threaded so it is able to take advantage of multiple cores. On Linux you can see how many threads a process has like this:

cat /proc/<process id>/status | grep Threads

On an idle node on my system, it has 73 threads. The OS will schedule the threads to run on the available cores when the threads have work to do.

The CPU is often a bottleneck for Cassandra since it is written in Java and does a lot of CPU intensive operations such as object serialization and de-serialization as it reads and writes data, garbage collection, and SSTable compaction.

like image 172
Jim Meyer Avatar answered Nov 03 '25 01:11

Jim Meyer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!