Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for 
change notification.

The "NodeTool" page has been changed by JanneJalkanen:
http://wiki.apache.org/cassandra/NodeTool?action=diff&rev1=21&rev2=22

Comment:
setcompactionthroughput documented

  == Scrub ==
  Cassandra v0.7.1 and v0.7.2 shipped with a bug that caused incorrect 
row-level bloom filters to be generated when compacting sstables generated with 
earlier versions.  This would manifest in IOExceptions during column name-based 
queries.  v0.7.3 provides "nodetool scrub" to rebuild sstables with correct 
bloom filters, with no data lost. (If your cluster was never on 0.7.0 or 
earlier, you don't have to worry about this.)  Note that nodetool scrub will 
snapshot your data files before rebuilding, just in case.
  
- == upgradesstables ==
+ == Upgradesstables ==
  
  While "scrub" does rebuild your sstables, it will also discard data it deems 
broken and create a snapshot, which you have to remove manually.  If you just 
wish to rebuild your sstables without all that jazz, then use "nodetool 
upgradesstables".  This is useful e.g. when you are upgrading your server, or 
changing compression options.
  
  upgradesstables is available from Cassandra 1.0.4 onwards.
+ 
+ == Setcompactionthroughput ==
+ 
+ As of Cassandra 1.0, the amount of resources that compactions can use can be 
easily controlled using a single value: the compaction throughput, which is 
expressed in Megabytes/second.  You can (and probably should) specify this in 
your cassandra.yaml file, but in some cases it can be very beneficial to change 
it live using the nodetool.
+ 
+ For example, in 
[[http://www.slideshare.net/edwardcapriolo/m6d-cassandrapresentation|this 
presentation]] Edward Capriolo explains how their company throttles compaction 
during the day so that I/O is mostly reserved for serving requests, whereas 
during the night they allocate more capability for running compactions.  This 
can be e.g. accomplished through a simple cron script:
+ 
+ {{{
+ # Script increases compaction throughput to 999 MB/s (i.e. nearly unlimited) 
for 00-06.
+ #
+ # turn into Mr.batch at night
+ 0 0 * * * root nodetool -h `hostname` setcompactionthroughput 999
+ # turn back into Dr.Realtime for day
+ 0 6 * * * root nodetool -h `hostname` setcompactionthroughput 16
+ }}}
+ 
+ Setting the compaction throughput to zero disables compaction.  This may be 
useful in some cases if you e.g. wish to avoid the compaction I/O during 
extremely busy periods.  It is not a good idea to leave it on for a long 
period, since you will end up with a large number of very small sstables, which 
will start to slow down your reads.
  
  == Cfhistograms ==
  

Reply via email to