Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 1763 invoked from network); 18 Feb 2011 00:48:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Feb 2011 00:48:35 -0000 Received: (qmail 41832 invoked by uid 500); 18 Feb 2011 00:48:33 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 41778 invoked by uid 500); 18 Feb 2011 00:48:32 -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 41770 invoked by uid 99); 18 Feb 2011 00:48:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 00:48:32 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a44.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 00:48:27 +0000 Received: from homiemail-a44.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a44.g.dreamhost.com (Postfix) with ESMTP id 0E9D8118058 for ; Thu, 17 Feb 2011 16:48:06 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=to:from :subject:date:message-id:content-type:mime-version:in-reply-to; q=dns; s=thelastpickle.com; b=Au/ka8KpzzDEUf7ZNOcyPUbN4OSJ15h16 ogYOsTmd/PXviTNMxLzQQAZ3Lr6wCCIMfC01S9aJsD8+LnqHQuushnBmpwuw7jJI 5bjaQMVL994g2HKgDNYh4dQclHOd8jm+BhgeKFvhaso1nzau1ZBenczOIv88FZbt I62xZjTMo4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=to :from:subject:date:message-id:content-type:mime-version: in-reply-to; s=thelastpickle.com; bh=nqTmFY7RWgxiHXN2G7NkMM4XfY8 =; b=gVmjcP2Lo1iQnavl0PHLwDfnkocy4y6aC4rlEbQtR+vECNmXMbXW7LGV3cG vUwT8f3LUR4ucKa/CJ/4uIUiYHIZMbYivvYPqtBGH0GGEvMDasiBI/lRhC/Cm8Sm UWBl739x3l5R7Sv6csLB9B9TKg8BEGtVPnTGMt31OIGOJ99M= Received: from localhost (webms.mac.com [17.148.16.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a44.g.dreamhost.com (Postfix) with ESMTPSA id 003D5118057 for ; Thu, 17 Feb 2011 16:48:05 -0800 (PST) To: user@cassandra.apache.org From: Aaron Morton Subject: Re: memory consuption Date: Fri, 18 Feb 2011 00:48:04 GMT X-Mailer: MobileMe Mail (1C3224) Message-id: <3ee12311-35e2-6a66-e7ad-a91b5b61b798@me.com> Content-Type: multipart/alternative; boundary=Apple-Webmail-42--56021ffe-c9bc-ce6f-dec1-8eb3e0e3ead6 MIME-Version: 1.0 In-Reply-To: --Apple-Webmail-42--56021ffe-c9bc-ce6f-dec1-8eb3e0e3ead6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; format=flowed Jonathan,=A0=0A=0AWhen you get time could you please explain that a little= more. Got a feeling I'm about to learn something :)=0A=0AThanks=0AAaron=0A= =0A=0AOn 18 Feb, 2011,at 01:36 PM, Jonathan Ellis wrot= e:=0A=0APlease note that this won't affect the actual memory in use, only = how=0Athe OS reports it.=0A=0AOn Thu, Feb 17, 2011 at 6:15 PM, Aaron Morto= n wrote:=0A> Looks like you are using virtual me= mory for memmapped files. Change the=0A> disk_access_mode to standard if y= ou want to reduce the overall memory=0A> usage.=0A> Aaron=0A> On 18 Feb, 2= 011,at 09:34 AM, Victor Kabdebon =0A> wrote:=0A= >=0A> Sorry I forgot to say that this is the partial result of :=0A> ps au= x | grep cassandra=0A> Best regards=0A>=0A> 2011/2/17 Victor Kabdebon =0A>>=0A>> Oh right but Cassandra doesn't really re= spect that, I thought there was=0A>> another option to set that.=0A>> Just= for your information, I set xms and xmx very low with a small amount=0A>>= of data. I am waiting to be able to connect jconsole, I don't know why it= is=0A>> not reachable at the moment. Here is my result :=0A>>=0A>> 105 =A0= =A0 =A026115 =A00.2 273 1125328 755316 ? =A0 =A0 =A0Sl =A0 Feb09 =A023:58= =0A>> /usr/bin/java -ea -Xms64M -Xmx128M=0A>>=0A>>=0A>> 2011/2/17 Aaron Mo= rton =0A>>>=0A>>> bin/cassandra.in.sh=0A>>> set X= ms and Xmx in the JVM_OPTS=0A>>> Aaron=0A>>>=0A>>>=0A>>> On 18 Feb, 2011,a= t 09:10 AM, Victor Kabdebon =0A>>> wrote:=0A>>>= =0A>>>=0A>>> Is it possible to change the maximum JVM heap memory use in 0= 6.X ?=0A>>>=0A>>> 2011/2/17 Aaron Morton =0A>>>>= =0A>>>> What are you using for disk_access_mode ?=0A>>>> Have you tried re= ducing the JVM head size?=0A>>>> Have you added the Jna.jar file to lib/ ?= This will allow Cassandra to=0A>>>> lock the JVM memory.=0A>>>>=0A>>>> Aa= ron=0A>>>>=0A>>>>=0A>>>> On 17/02/2011, at 9:20 PM, ruslan usifov wrote:=0A>>>>=0A>>>>=0A>>>>=0A>>>>=0A>>>>=0A>>>> 2011/2/1= 6 Aaron Morton =0A>>>>>=0A>>>>> JVM heap memory i= s controlled by the settings in conf/Cassandra-env.sh=0A>>>>>=0A>>>>> Memo= ry mapped files will use additional virtual memory, is controlled=0A>>>>> = in conf/Cassandra.yaml disk_access_mode=0A>>>>>=0A>>>>=0A>>>> And??? JVM m= emory heap in cassandra 0.7 is by default half of memory is=0A>>>> system = in my case 4GB, here is a part of cassandra-env.sh:=0A>>>>=0A>>>> calculat= e_heap_size()=0A>>>> {=0A>>>> =A0=A0=A0 case "`uname`" in=0A>>>> =A0=A0=A0= =A0=A0=A0=A0 Linux)=0A>>>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 system_memory= _in_mb=3D`free -m | awk '/Mem:/ {print $2}'`=0A>>>> =A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 MAX_HEAP_SIZE=3D$((system_memory_in_mb / 2))M=0A>>>> =A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 return 0=0A>>>> =A0=A0=A0=A0=A0=A0=A0 ;;=0A>>>> =A0=A0= =A0=A0=A0=A0=A0 FreeBSD)=0A>>>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 system_m= emory_in_bytes=3D`sysctl hw.physmem | awk '{print=0A>>>> $2}'`=0A>>>> =A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 MAX_HEAP_SIZE=3D$((system_memory_in_bytes / 10= 24 / 1024 / 2))M=0A>>>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0=0A>>>> = =A0=A0=A0=A0=A0=A0=A0 ;;=0A>>>> =A0=A0=A0=A0=A0=A0=A0 *)=0A>>>> =A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 MAX_HEAP_SIZE=3D1024M=0A>>>> =A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 return 1=0A>>>> =A0=A0=A0=A0=A0=A0=A0 ;;=0A>>>> =A0=A0=A0 esac=0A= >>>> }=0A>>>>=0A>>>>=0A>>>>=0A>>>> I set all this options by default. All = my nodes have 8GB of memory. And=0A>>>> i affraid that after some time all= my nodes goes to hard swap, and only=0A>>>> reboot help them :-(((=0A>>>>= =0A>>>> PS: as i understand that down sometime of cassandra is normal?=0A>= >>=0A>>=0A>=0A>=0A=0A=0A=0A-- =0AJonathan Ellis=0AProject Chair, Apache Ca= ssandra=0Aco-founder of DataStax, the source for professional Cassandra su= pport=0Ahttp://www.datastax.com=0A --Apple-Webmail-42--56021ffe-c9bc-ce6f-dec1-8eb3e0e3ead6 Content-Type: multipart/related; type="text/html"; boundary=Apple-Webmail-86--56021ffe-c9bc-ce6f-dec1-8eb3e0e3ead6 --Apple-Webmail-86--56021ffe-c9bc-ce6f-dec1-8eb3e0e3ead6 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1;
Jonathan, 

When you get time could you = please explain that a little more. Got a feeling I'm about to learn someth= ing :)

Thanks
Aaron


O= n 18 Feb, 2011,at 01:36 PM, Jonathan Ellis <jbellis@gmail.com> wrote= :

Please note that this won't affect the actual memory = in use, only how
=0Athe OS reports it.
=0A
=0AOn Thu, Feb 17, 201= 1 at 6:15 PM, Aaron Morton <aaron@thelastpickle.com&g= t; wrote:
=0A> Looks like you are using virtual memory for memmapped= files. Change the
=0A> disk_access_mode to standard if you want to = reduce the overall memory
=0A> usage.
=0A> Aaron
=0A> On= 18 Feb, 2011,at 09:34 AM, Victor Kabdebon <victor.ka= bdebon@gmail.com>
=0A> wrote:
=0A>
=0A> Sorry I f= orgot to say that this is the partial result of :
=0A> ps aux | grep= cassandra
=0A> Best regards
=0A>
=0A> 2011/2/17 Victor = Kabdebon <victor.kabdebon@gmail.com>
=0A>= ;>
=0A>> Oh right but Cassandra doesn't really respect that, I= thought there was
=0A>> another option to set that.
=0A>&g= t; Just for your information, I set xms and xmx very low with a small amou= nt
=0A>> of data. I am waiting to be able to connect jconsole, I = don't know why it is
=0A>> not reachable at the moment. Here is m= y result :
=0A>>
=0A>> 105      26115 &nb= sp;0.2 273 1125328 755316 ?      Sl   Feb09  23:5= 8
=0A>> /usr/bin/java -ea -Xms64M -Xmx128M
=0A>>
=0A&= gt;>
=0A>> 2011/2/17 Aaron Morton <aaron@thel= astpickle.com>
=0A>>>
=0A>>> bin/cassandra.= in.sh
=0A>>> set Xms and Xmx in the JVM_OPTS
=0A>>>= ; Aaron
=0A>>>
=0A>>>
=0A>>> On 18 Feb= , 2011,at 09:10 AM, Victor Kabdebon <victor.kabdebon@= gmail.com>
=0A>>> wrote:
=0A>>>
=0A>&= gt;>
=0A>>> Is it possible to change the maximum JVM heap m= emory use in 0.6.X ?
=0A>>>
=0A>>> 2011/2/17 Aaron= Morton <aaron@thelastpickle.com>
=0A>>&g= t;>
=0A>>>> What are you using for disk_access_mode ?=0A>>>> Have you tried reducing the JVM head size?
=0A>= >>> Have you added the Jna.jar file to lib/ ? This will allow Cas= sandra to
=0A>>>> lock the JVM memory.
=0A>>>&g= t;
=0A>>>> Aaron
=0A>>>>
=0A>>>&= gt;
=0A>>>> On 17/02/2011, at 9:20 PM, ruslan usifov <ruslanusifov@gmail.com> wrote:
=0A>>>>
= =0A>>>>
=0A>>>>
=0A>>>>
=0A&g= t;>>>
=0A>>>> 2011/2/16 Aaron Morton <aaron@thelastpickle.com>
=0A>>>>>
=0A>&= gt;>>> JVM heap memory is controlled by the settings in conf/Cass= andra-env.sh
=0A>>>>>
=0A>>>>> Memory = mapped files will use additional virtual memory, is controlled
=0A>&= gt;>>> in conf/Cassandra.yaml disk_access_mode
=0A>>>= >>
=0A>>>>
=0A>>>> And??? JVM memory h= eap in cassandra 0.7 is by default half of memory is
=0A>>>>= ; system in my case 4GB, here is a part of cassandra-env.sh:
=0A>>= ;>>
=0A>>>> calculate_heap_size()
=0A>>>&= gt; {
=0A>>>>     case "`uname`" in
=0A&g= t;>>>         Linux)
=0A>= ;>>>           =   system_memory_in_mb=3D`free -m | awk '/Mem:/ {print $2}'`
=0A>= ;>>>           =   MAX_HEAP_SIZE=3D$((system_memory_in_mb / 2))M
=0A>>>>= ;             retur= n 0
=0A>>>>         ;;=0A>>>>         FreeBSD)<= br>=0A>>>>         &nb= sp;   system_memory_in_bytes=3D`sysctl hw.physmem | awk '{print<= br>=0A>>>> $2}'`
=0A>>>>    &nbs= p;        MAX_HEAP_SIZE=3D$((system_mem= ory_in_bytes / 1024 / 1024 / 2))M
=0A>>>>    = ;         return 0
=0A>>&= gt;>         ;;
=0A>>>&g= t;         *)
=0A>>>> &n= bsp;           MAX_HEAP_= SIZE=3D1024M
=0A>>>>       &n= bsp;     return 1
=0A>>>>   &= nbsp;     ;;
=0A>>>>    = esac
=0A>>>> }
=0A>>>>
=0A>>>&g= t;
=0A>>>>
=0A>>>> I set all this options by= default. All my nodes have 8GB of memory. And
=0A>>>> i af= fraid that after some time all my nodes goes to hard swap, and only
=0A= >>>> reboot help them :-(((
=0A>>>>
=0A>&= gt;>> PS: as i understand that down sometime of cassandra is normal?=
=0A>>>
=0A>>
=0A>
=0A>
=0A
=0A
= =0A
=0A--
=0AJonathan Ellis
=0AProject Chair, Apache Cassandra=0Aco-founder of DataStax, the source for professional Cassandra support=
=0Ahttp://www.datastax.com
=0A
--Apple-Webmail-86--56021ffe-c9bc-ce6f-dec1-8eb3e0e3ead6-- --Apple-Webmail-42--56021ffe-c9bc-ce6f-dec1-8eb3e0e3ead6--