The easiest way to get memlock to work after putting the jna jar in your classpath is just run this before:
ulimit -a unlimited in your init script or before starting cassandra. The default for max locked memory is 32KB on older kernels, and 64KB on newer ones. -Chris On Mar 22, 2011, at 12:52 PM, Adi wrote: > On Tue, Mar 22, 2011 at 3:44 PM, ruslan usifov <ruslan.usi...@gmail.com> > wrote: > > > 2011/3/22 Adi <adi.pan...@gmail.com> > I have been going through the mailing list and compiling suggestions to > address the swapping due to mmap issue. > > 1) Use JNA (done but) > Are these steps also required: > - Start Cassandra with CAP_IPC_LOCK (or as "root"). (not done) > > And what is CAP_IPC_LOCK? > > I saw that suggestion in > https://issues.apache.org/jira/browse/CASSANDRA-1214. > > I do not yet know how to run cassandra or a java process with that privilege, > still researching and hoping my sysadmin knows better. > > http://www.lids.org/lids-howto/node50.html > Allow locking of shared memory segments > Allow mlock and mlockall (which doesn't really have anything to do with IPC) >