Database Reference
In-Depth Information
6. Performance Tuning
Once your Cassandra cluster is in production and running with its out-of-the-box
configuration, it's time to push the envelope a little with some performance tuning.
There are multiple levels at which this tuning can take place. At the lowest level,
there are the hardware and operating system. And while some of this has to do
with basic setup of the hardware (such as RAID levels), there are kernel-level tun-
ables that you can take advantage of. At the next level is the Java Virtual Machine.
The JVM also has a lot of ways that it can be started and manipulated to handle
various types of workloads and applications. And finally there are the configur-
ables within Cassandra itself.
The important thing to remember when attempting to do performance tuning
of any kind is that not everything is universally applicable. Your mileage will
vary depending on your OS, hardware, applications, and access patterns. Learning
which things are tunable and what they do when changed will go a long way to-
ward helping you pull the most out of your system. This chapter will talk about
how some of the available knobs work.
Methodology
Much of the tuning that needs to be done on any system requires a baseline un-
derstanding of how the system operates under normal circumstances. There are a
number of methods that can be used to obtain this information. The most common
method is to use standard *nix tools like vmstat , iostat , dstat , and any of
the top monitors like htop , atop , and top . Each of these tools will give you a
picture of usage on the memory, CPU, I/O, disks, and any combinations of those
on your system. It may sound boring and tedious, but get a little familiar with what
the output of those tools should look like under normal operating conditions for
your system.
Having instrumented graphs is also helpful. Applications such as Cacti, Munin,
and Ganglia come with standard templates for graphing many of the system-level
metrics. This means you can actively change settings and see how the applications
and the system respond in real time. While some of these may be easier than others
to get working, it is easier to understand a visual representation of changes than to
determine whether or not one or two numbers in a row of other numbers changed
Search WWH ::




Custom Search