Nipun
Nipun

Reputation: 4319

how does cassandra utilizes multiple cores to work

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?

Upvotes: 4

Views: 1322

Answers (1)

Jim Meyer
Jim Meyer

Reputation: 9475

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.

Upvotes: 5

Related Questions