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 476DB7966 for ; Thu, 28 Jul 2011 10:18:19 +0000 (UTC) Received: (qmail 7045 invoked by uid 500); 28 Jul 2011 10:18:14 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 6958 invoked by uid 500); 28 Jul 2011 10:17:46 -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 6424 invoked by uid 99); 28 Jul 2011 10:17:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2011 10:17:39 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [67.192.241.151] (HELO smtp151.dfw.emailsrvr.com) (67.192.241.151) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2011 10:17:32 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp5.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 4E4EF584B9 for ; Thu, 28 Jul 2011 06:17:11 -0400 (EDT) X-Virus-Scanned: OK Received: from smtp192.mex07a.mlsrvr.com (unknown [67.192.133.128]) by smtp5.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTPS id 35B3858063 for ; Thu, 28 Jul 2011 06:17:11 -0400 (EDT) Received: from 34093-MBX-C15.mex07a.mlsrvr.com ([192.168.1.17]) by 207038-HUB10.mex07a.mlsrvr.com ([192.168.1.203]) with mapi; Thu, 28 Jul 2011 05:17:11 -0500 From: Stephen Henderson To: "user@cassandra.apache.org" Date: Thu, 28 Jul 2011 05:17:10 -0500 Subject: memory_locking_policy parameter in cassandra.yaml for disabling swap - has this variable been renamed? Thread-Topic: memory_locking_policy parameter in cassandra.yaml for disabling swap - has this variable been renamed? Thread-Index: AcxNDikmTwxUNEuIRrKxVkivRpIE0w== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_AC6CDD3FAD22434F92D66C5E6979E28001E4F636FB34093MBXC15me_" MIME-Version: 1.0 --_000_AC6CDD3FAD22434F92D66C5E6979E28001E4F636FB34093MBXC15me_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, We've started having problems with cassandra and memory swapping on linux w= hich seems to be a fairly common issue (in our particular case after about = a week all swap space will have been used up and we have to restart the pro= cess). It sounds like the general consensus is to just disable swap completely, bu= t the recently released "Cassandra High Performance Cookbook" from Packt ha= s instructions for "Stopping cassandra from using swap without disabling it= system wide". We've tried following the instructions but it refers to a "m= emory_locking_policy" variable in cassandra.yaml which throws an "unknown p= roperty" error on startup and I can't find any reference to it in any of th= e cassandra docs. I've copied the summarised instructions below, does anyone know if this is = something that ever worked or is there a different variable to set which do= es the same thing? (we're using 0.7.4 at present and it looks like the book= was written for 0.7.0-beta-1.10 so it might have been something which was = abandoned during beta?) --- Disabling Swap Memory system-wide may not always be desirable. For example,= if the system is not dedicated to running Cassandra, other processes on th= e system may benefit from Swap Memory. This recipe shows how to install the= Java Native Architecture, which allows Java to lock itself in memory makin= g it inevitable. 1. Place the jna.jar and platform.jar in the $CASSANDRA_HOME/lib directory: 2. Enable memory_locking_policy in $CASSANDRA_HOME/conf/cassandra.yaml: "= memory_locking_policy: required" 3. Restart your Cassandra instance. 4. Confirm this configuration has taken effect by checking to see if a larg= e portion of memory is Unevictable: $ grep Unevictable /proc/meminfo Unevictable: 1024 Kb --- Thanks, Stephen Stephen Henderson - Lead Developer (Onsite), Cognitive Match stephen.henderson@cognitivematch.com | http://www.cognitivematch.com T: +44 (0) 203 205 0004 | F: +44 (0) 207 526 2226 --_000_AC6CDD3FAD22434F92D66C5E6979E28001E4F636FB34093MBXC15me_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

We’v= e started having problems with cassandra and memory swapping on linux which= seems to be a fairly common issue (in our particular case after about a we= ek all swap space will have been used up and we have to restart the process= ).

 

It sounds like the general consensus is to just disable swap complete= ly, but the recently released “Cassandra High Performance Cookbook= 221; from Packt has instructions for “Stopping cassandra from using s= wap without disabling it system wide”. We’ve tried following th= e instructions but it refers to a “memory_locking_policy” varia= ble in cassandra.yaml which throws an “unknown property” error = on startup and I can’t find any reference to it in any of the cassand= ra docs.

 

I’ve copied the summarised instructions below, does anyo= ne know if this is something that ever worked or is there a different varia= ble to set which does the same thing? (we’re using 0.7.4 at present a= nd it looks like the book was written for 0.7.0-beta-1.10 so it might have = been something which was abandoned during beta?)

---

Disabling Swap Memory system-wide may not always be desirable. Fo= r example, if the system is not dedicated to running Cassandra, other proce= sses on the system may benefit from Swap Memory. This recipe shows how to i= nstall the Java Native Architecture, which allows Java to lock itself in me= mory making it inevitable.

 

1. Place the jna.jar and platform.jar in the $= CASSANDRA_HOME/lib directory:

2. Enable = memory_locking_policy in $CASSANDRA_HOME/conf/cassandra.yaml:   &= #8220;memory_locking_policy: required”

3. Restart your Cassandra instance.

4. Confirm this configuration has taken effect by checking to see if a lar= ge portion of memory is Unevictable:

$ g= rep Unevictable /proc/meminfo

Unevictabl= e:        1024 Kb

---

 

 

Thanks,

Stephen

 

Stephen Henderson – Lead Developer (Onsite), Cognitive Match

stephen.henderson@cognitivematch.com | http://www.c= ognitivematch.com

T: +44 (0) 203 205 0004 | F: +44 (0) 207 526= 2226

 

= --_000_AC6CDD3FAD22434F92D66C5E6979E28001E4F636FB34093MBXC15me_--