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 4DB8692C3 for ; Thu, 2 Feb 2012 19:45:31 +0000 (UTC) Received: (qmail 82942 invoked by uid 500); 2 Feb 2012 19:45:28 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 82874 invoked by uid 500); 2 Feb 2012 19:45:27 -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 82866 invoked by uid 99); 2 Feb 2012 19:45:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 19:45:27 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a54.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 19:45:20 +0000 Received: from homiemail-a54.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a54.g.dreamhost.com (Postfix) with ESMTP id 123333A407A for ; Thu, 2 Feb 2012 11:44:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=htjCSd7GyI HialaPUri70unCE8k/pOkAATHvbVxNokE1bDpijlCBDiwE7+VMs87+AJXKX4bu1K jk3r+kaZnBziPgIP6f60PpJEvpVEY9XVw8bqqPvS7hnF7UsfmvmfHaKb0hfR3fX/ vYD/RqWjnNe0WYo8yZvgpvl8BLpEXtI+k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=aSUt0uX3yubdWxSw F63ZMk/eZwQ=; b=hcBoFiGYmS++TYk5UKIGIvMcD8PZaajhdgCbhyHTwJicHJ/m 8oQWwDlOD1WU0UuxFHjHMQxMyo7uvmmTcN5mdcsM8oaBb8/Gf9ZIQ6FLHIlxTbV2 8YL3pR87Y8V3+bhy9s7zHhXzOu7mNdDepG+98jsUpVKcVrZXFOuf9qTOXoU= Received: from [172.16.1.3] (125-236-193-159.adsl.xtra.co.nz [125.236.193.159]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a54.g.dreamhost.com (Postfix) with ESMTPSA id E47A23A406D for ; Thu, 2 Feb 2012 11:44:55 -0800 (PST) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: multipart/alternative; boundary="Apple-Mail=_54F1207E-4BDD-463F-867C-12585E13F335" Subject: Re: Restart cassandra every X days? Date: Fri, 3 Feb 2012 08:44:52 +1300 In-Reply-To: To: user@cassandra.apache.org References: <4F20464B.9060308@hiramoto.org> <4F20491F.3070304@hiramoto.org> <6F1D54DD1FE19B408496215469822A8701F060B376D3@OCDP-ERFMMBX03.ERF.THOMSON.COM> <30C7D8E3-3C2E-40C5-8629-302DEBDC480A@thelastpickle.com> <0A794C24-16F6-41AE-9ADA-F9FB0BA5EFB4@thelastpickle.com> <4F2410BF.2050803@bnl.gov> <4D115C38-6CA7-4508-AEBB-42C11F715BC2@thelastpickle.com> <947E79FB-ACC9-4384-AD7D-2AFBCB66E5A9@thelastpickle.com> Message-Id: X-Mailer: Apple Mail (2.1251.1) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_54F1207E-4BDD-463F-867C-12585E13F335 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Speaking technically, that ain't right. I would: * Check if node .135 is holding a lot of hints.=20 * Take a look on disk and see what is there. * Go through a repair and compact on each node. =20 Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 2/02/2012, at 9:55 PM, R. Verlangen wrote: > Yes, I already did a repair and cleanup. Currently my ring looks like = this: >=20 > Address DC Rack Status State Load = Owns Token > ***.89 datacenter1 rack1 Up Normal 2.44 GB = 50.00% 0 > ***.135 datacenter1 rack1 Up Normal 6.99 GB = 50.00% 85070591730234615865843651857942052864 >=20 > It's not really a problem, but I'm still wondering why this happens. >=20 > 2012/2/1 aaron morton > Do you mean the load in nodetool ring is not even, despite the tokens = been evenly distributed ?=20 >=20 > I would assume this is not the case given the difference, but it may = be hints given you have just done an upgrade. Check the system using = nodetool cfstats to see. They will eventually be delivered and deleted.=20= >=20 > More likely you will want to: > 1) nodetool repair to make sure all data is distributed then > 2) nodetool cleanup if you have changed the tokens at any point = finally >=20 > Cheers >=20 > ----------------- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com >=20 > On 31/01/2012, at 11:56 PM, R. Verlangen wrote: >=20 >> After running 3 days on Cassandra 1.0.7 it seems the problem has been = solved. One weird thing remains, on our 2 nodes (both 50% of the ring), = the first's usage is just over 25% of the second.=20 >>=20 >> Anyone got an explanation for that? >>=20 >> 2012/1/29 aaron morton >> Yes but=85 >>=20 >> For every upgrade read the NEWS.TXT it will go through the upgrade = procedure in detail. If you want to feel extra smart scan through the = CHANGES.txt to get an idea of whats going on.=20 >>=20 >> Cheers >>=20 >> ----------------- >> Aaron Morton >> Freelance Developer >> @aaronmorton >> http://www.thelastpickle.com >>=20 >> On 29/01/2012, at 4:14 AM, Maxim Potekhin wrote: >>=20 >>> Sorry if this has been covered, I was concentrating solely on 0.8x = -- >>> can I just d/l 1.0.x and continue using same data on same cluster? >>>=20 >>> Maxim >>>=20 >>>=20 >>> On 1/28/2012 7:53 AM, R. Verlangen wrote: >>>>=20 >>>> Ok, seems that it's clear what I should do next ;-) >>>>=20 >>>> 2012/1/28 aaron morton >>>> There are no blockers to upgrading to 1.0.X. >>>>=20 >>>> A=20 >>>> ----------------- >>>> Aaron Morton >>>> Freelance Developer >>>> @aaronmorton >>>> http://www.thelastpickle.com >>>>=20 >>>> On 28/01/2012, at 7:48 AM, R. Verlangen wrote: >>>>=20 >>>>> Ok. Seems that an upgrade might fix these problems. Is Cassandra = 1.x.x stable enough to upgrade for, or should we wait for a couple of = weeks? >>>>>=20 >>>>> 2012/1/27 Edward Capriolo >>>>> I would not say that issuing restart after x days is a good idea. = You are mostly developing a superstition. You should find the source of = the problem. It could be jmx or thrift clients not closing connections. = We don't restart nodes on a regiment they work fine. >>>>>=20 >>>>>=20 >>>>> On Thursday, January 26, 2012, Mike Panchenko = wrote: >>>>> > There are two relevant bugs (that I know of), both resolved in = somewhat recent versions, which make somewhat regular restarts = beneficial >>>>> > https://issues.apache.org/jira/browse/CASSANDRA-2868 (memory = leak in GCInspector, fixed in 0.7.9/0.8.5) >>>>> > https://issues.apache.org/jira/browse/CASSANDRA-2252 (heap = fragmentation due to the way memtables used to be allocated, refactored = in 1.0.0) >>>>> > Restarting daily is probably too frequent for either one of = those problems. We usually notice degraded performance in our ancient = cluster after ~2 weeks w/o a restart. >>>>> > As Aaron mentioned, if you have plenty of disk space, there's no = reason to worry about "cruft" sstables. The size of your active set is = what matters, and you can determine if that's getting too big by = watching for iowait (due to reads from the data partition) and/or paging = activity of the java process. When you hit that problem, the solution is = to 1. try to tune your caches and 2. add more nodes to spread the load. = I'll reiterate - looking at raw disk space usage should not be your = guide for that. >>>>> > "Forcing" a gc generally works, but should not be relied upon = (note "suggest" in = http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#gc()). = It's great news that 1.0 uses a better mechanism for releasing unused = sstables. >>>>> > nodetool compact triggers a "major" compaction and is no longer = a recommended by datastax (details here = http://www.datastax.com/docs/1.0/operations/tuning#tuning-compaction = bottom of the page). >>>>> > Hope this helps. >>>>> > Mike. >>>>> > On Wed, Jan 25, 2012 at 5:14 PM, aaron morton = wrote: >>>>> > >>>>> > That disk usage pattern is to be expected in pre 1.0 versions. = Disk usage is far less interesting than disk free space, if it's using = 60 GB and there is 200GB thats ok. If it's using 60Gb and there is 6MB = free thats a problem. >>>>> > In pre 1.0 the compacted files are deleted on disk by waiting = for the JVM do decide to GC all remaining references. If there is not = enough space (to store the total size of the files it is about to write = or compact) on disk GC is forced and the files are deleted. Otherwise = they will get deleted at some point in the future.=20 >>>>> > In 1.0 files are reference counted and space is freed much = sooner.=20 >>>>> > With regard to regular maintenance, node tool cleanup remvos = data from a node that it is no longer a replica for. This is only of use = when you have done a token move.=20 >>>>> > I would not recommend a daily restart of the cassandra process. = You will lose all the run time optimizations the JVM has made (i think = the mapped files pages will stay resident). As well as adding additional = entropy to the system which must be repaired via HH, RR or nodetool = repair.=20 >>>>> > If you want to see compacted files purged faster the best = approach would be to upgrade to 1.0.=20 >>>>> > Hope that helps.=20 >>>>> > ----------------- >>>>> > Aaron Morton >>>>> > Freelance Developer >>>>> > @aaronmorton >>>>> > http://www.thelastpickle.com >>>>> > On 26/01/2012, at 9:51 AM, R. Verlangen wrote: >>>>> > >>>>> > In his message he explains that it's for " Forcing a GC ". GC = stands for garbage collection. For some more background see: = http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)=20 >>>>> > Cheers! >>>>> > >>>>> > 2012/1/25 >>>>> > >>>>> > Karl, >>>>> > >>>>> > Can you give a little more details on these 2 lines, what do = they do? >>>>> > >>>>> > java -jar cmdline-jmxclient-0.10.3.jar - localhost:8080 >>>>> > java.lang:type=3DMemory gc >>>>> > >>>>> > Thank you, >>>>> > Mike >>>>> > >>>>> > -----Original Message----- >>>>> > From: Karl Hiramoto [mailto:karl@hiramoto.org] >>>>> > Sent: Wednesday, January 25, 2012 12:26 PM >>>>> > To: user@cassandra.apache.org >>>>> > Subject: Re: Restart cassandra every X days? >>>>> > >>>>> > >>>>> > On 01/25/12 19:18, R. Verlangen wrote: >>>>> >> Ok thank you for your feedback. I'll add these tasks to our = daily >>>>> >> cassandra maintenance cronjob. Hopefully this will keep things = under >>>>> >> controll. >>>>> > >>>>> > I forgot to mention that we found that Forcing a GC also cleans = up some >>>>> > space. >>>>> > >>>>> > >>>>> > in a cronjob you can do this with >>>>> > http://crawler.archive.org/cmdline-jmxclient/ >>>>> > >>>>> > >>>>> > my cron >>>>>=20 >>>>=20 >>>>=20 >>>=20 >>=20 >>=20 >=20 >=20 --Apple-Mail=_54F1207E-4BDD-463F-867C-12585E13F335 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
http://www.thelastpickle.com

On 2/02/2012, at 9:55 PM, R. Verlangen wrote:

Yes, I = already did a repair and cleanup. Currently my ring looks like = this:

Address         DC =          Rack        Status = State   Load            Owns   =  Token
***.89    datacenter1 rack1   =     Up     Normal  2.44 GB       =   50.00%  0
***.135    datacenter1 rack1       Up =     Normal  6.99 GB         50.00% =  85070591730234615865843651857942052864

It's= not really a problem, but I'm still wondering why this happens.

2012/2/1 aaron morton <aaron@thelastpickle.com>
Do you mean the load in nodetool = ring is not even, despite the tokens been evenly distributed = ? 

I would assume this is not the case given the = difference, but it may be hints given you have just done an upgrade. = Check the system using nodetool cfstats to see. They will eventually be = delivered and deleted. 

More likely you will want to:
1) nodetool = repair to make sure all data is distributed then
2) nodetool = cleanup if you have changed the tokens at any point = finally

Cheers

-----------------
Aaron Morton
Freelance = Developer
@aaronmorton

On 31/01/2012, at 11:56 PM, = R. Verlangen wrote:

After running 3 = days on Cassandra 1.0.7 it seems the problem has been solved. One weird = thing remains, on our 2 nodes (both 50% of the ring), the first's usage = is just over 25% of the second. 

Anyone got an explanation for that?

2012/1/29 aaron morton <aaron@thelastpickle.com>
Yes but=85

For = every upgrade read the NEWS.TXT it will go through the upgrade procedure = in detail. If you want to feel extra smart scan through the CHANGES.txt = to get an idea of whats going on. 

Cheers

-----------------
Aaron Morton
Freelance = Developer
@aaronmorton

On 29/01/2012, at 4:14 AM, Maxim Potekhin = wrote:

=20 =20 =20
Sorry if this has been covered, I was concentrating solely on 0.8x --
can I just d/l 1.0.x and continue using same data on same = cluster?

Maxim


On 1/28/2012 7:53 AM, R. Verlangen wrote:
Ok, seems that it's clear what I should do = next ;-)

2012/1/28 aaron morton <aaron@thelastpickle.com>
There are no blockers to upgrading to 1.0.X.

-----------------
Aaron Morton
Freelance Developer
@aaronmorton

On 28/01/2012, at 7:48 AM, R. Verlangen wrote:

Ok. Seems that an = upgrade might fix these problems. Is Cassandra 1.x.x stable enough to upgrade for, or should we wait for a couple of weeks?

2012/1/27 Edward Capriolo <edlinuxguru@gmail.com>
I would not say that issuing restart after x days is a good idea. You are mostly developing a superstition. You should find the source of the problem. It could be jmx or thrift clients not closing connections. We don't restart nodes on a regiment they work fine.


On Thursday, January 26, 2012, Mike Panchenko <m@mihasya.com> wrote:
> There are two relevant bugs (that I know of), both resolved in somewhat recent versions, which make somewhat regular restarts beneficial
> https://issues.apache.org/jira/browse/CASSANDRA-2868= (memory leak in GCInspector, fixed in 0.7.9/0.8.5)
> https://issues.apache.org/jira/browse/CASSANDRA-2252= (heap fragmentation due to the way memtables used to be allocated, refactored in 1.0.0)
> Restarting daily is probably too frequent for either one of those problems. We usually notice degraded performance in our ancient cluster after ~2 weeks w/o a restart.
> As Aaron mentioned, if you have plenty of disk space, there's no reason to worry about "cruft" sstables. The size of your active set is what matters, and you can determine if that's getting too big by watching for iowait (due to reads from the data partition) and/or paging activity of the java process. When you hit that problem, the solution is to 1. try to tune your caches and 2. add more nodes to spread the load. I'll reiterate - looking at raw disk space usage should not be your guide for that.
> "Forcing" a gc generally works, but should not be relied upon (note "suggest" in http://docs.oracle.com/javase/6/docs/api/java/lang/Syste= m.html#gc()). It's great news that 1.0 uses a better mechanism for releasing unused sstables.
> nodetool compact triggers a "major" compaction and is no longer a recommended by datastax (details = here http://www.datastax.com/docs/1.0/operations/tuning#tunin= g-compaction bottom of the page).
> Hope this helps.
> Mike.
> On Wed, Jan 25, 2012 at 5:14 PM, aaron morton <aaron@thelastpickle.com> wrote:
>
> That disk usage pattern is to be expected in pre 1.0 versions. Disk usage is far less interesting than disk free space, if it's using 60 GB and there is 200GB thats ok. If it's using 60Gb and there is 6MB free thats a problem.
> In pre 1.0 the compacted files are deleted on disk by waiting for the JVM do decide to GC all remaining references. If there is not enough space (to store the total size of the files it is about to write or compact) on disk GC is forced and the files are deleted. Otherwise they will get deleted at some point in the = future. 
> In 1.0 files are reference counted and space is freed much sooner. 
> With regard to regular maintenance, node tool cleanup remvos data from a node that it is no longer a replica for. This is only of use when you have done a token = move. 
> I would not recommend a daily restart of the cassandra process. You will lose all the run time optimizations the JVM has made (i think the mapped files pages will stay resident). As well as adding additional entropy to the system which must be repaired via HH, RR or nodetool repair. 
> If you want to see compacted files purged faster the best approach would be to upgrade to 1.0. 
> Hope that helps. 
> -----------------
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
> On 26/01/2012, at 9:51 AM, R. Verlangen wrote:
>
> In his message he explains that it's for " Forcing a GC ". GC = stands for garbage collection. For some more background see:  http://en.wikipedia.org/wiki/Garbage_collection_(compute= r_science) 
> Cheers!
>
> 2012/1/25 <mike.li@thomsonreuters.com>
>
> Karl,
>
> Can you give a little more details on these 2 lines, what do they do?
>
> java -jar cmdline-jmxclient-0.10.3.jar - localhost:8080
> java.lang:type=3DMemory gc
>
> Thank you,
> Mike
>
> -----Original Message-----
> From: Karl Hiramoto [mailto:karl@hiramoto.org]
> Sent: Wednesday, January 25, 2012 12:26 PM
> To: user@cassandra.apache.org
> Subject: Re: Restart cassandra every X days?
>
>
> On 01/25/12 19:18, R. Verlangen wrote:
>> Ok thank you for your feedback. I'll add these tasks to our daily
>> cassandra maintenance cronjob. Hopefully this will keep things under
>> controll.
>
> I forgot to mention that we found that Forcing a GC also cleans up = some
> space.
>
>
> in a cronjob you can do this = with
> http://crawler.archive.org/cmdline-jmxclient/
>
>
> my cron




=


=



= --Apple-Mail=_54F1207E-4BDD-463F-867C-12585E13F335--