Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 559F762E0 for ; Thu, 4 Aug 2011 22:36:09 +0000 (UTC) Received: (qmail 36484 invoked by uid 500); 4 Aug 2011 22:36:07 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 36367 invoked by uid 500); 4 Aug 2011 22:36:06 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 36359 invoked by uid 99); 4 Aug 2011 22:36:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2011 22:36:06 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tholzer@wetafx.co.nz designates 110.232.144.26 as permitted sender) Received: from [110.232.144.26] (HELO meera.wetafx.co.nz) (110.232.144.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2011 22:36:00 +0000 Received: from localhost (localhost [127.0.0.1]) by meera.wetafx.co.nz (Postfix) with ESMTP id 8732E9F00010 for ; Fri, 5 Aug 2011 10:35:37 +1200 (NZST) X-Virus-Scanned: with amavisd-new by meera at meera.wetafx.co.nz Received: from meera.wetafx.co.nz ([127.0.0.1]) by localhost (meera.wetafx.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i3dg1Of-enBC; Fri, 5 Aug 2011 10:35:37 +1200 (NZST) Received: from jupiter036.localdomain (webmail.wetafx.co.nz [192.168.120.66]) by meera.wetafx.co.nz (Postfix) with ESMTP id C20DC9F0000B for ; Fri, 5 Aug 2011 10:35:36 +1200 (NZST) Received: from localhost (localhost [127.0.0.1]) by jupiter036.localdomain (Postfix) with ESMTP id ADFAC5BE9A2 for ; Fri, 5 Aug 2011 10:35:36 +1200 (NZST) X-Virus-Scanned: amavisd-new at wetafx.co.nz Received: from jupiter036.localdomain ([127.0.0.1]) by localhost (smtp-digi.wetafx.co.nz [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KHthR-9kSNDd for ; Fri, 5 Aug 2011 10:35:36 +1200 (NZST) Received: from [192.168.49.114] (boarshead.wetafx.co.nz [192.168.49.114]) by jupiter036.localdomain (Postfix) with ESMTP id 9CBB75BE97A for ; Fri, 5 Aug 2011 10:35:36 +1200 (NZST) Message-ID: <4E3B1EB8.4030206@wetafx.co.nz> Date: Fri, 05 Aug 2011 10:35:36 +1200 From: Teijo Holzer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110705 Thunderbird/5.0 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Force a garbage collection with jmxterm from the shell Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, The following command line triggers a garbage collection via JMX: echo 'run -b java.lang:type=Memory gc' | java -jar jmxterm-1.0-alpha-4-uber.jar -l service:jmx:rmi:///jndi/rmi://hostname:8080/jmxrmi -n It uses: http://wiki.cyclopsgroup.org/jmxterm The GC is necessary after a major compaction to trigger the deletion of stale files. jmxterm can also be used to query and modify beans exposed via JMX. That makes it easy to integrate into any monitoring & maintenance scripts, e.g.: echo 'get -b org.apache.cassandra.db:type=ColumnFamilies,keyspace=KS1,columnfamily=CF1 ReadCount' | ... You can also perform multiple operations as once: echo 'domains\nbeans' | ... If you are concerned about the start-up speed of the jar, just unpack it. You might need to unpack & shuffle the internal jars around a bit as well. Cheers, T.