From user-return-21978-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Thu Nov 3 08:16:47 2011 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 D8C5870B1 for ; Thu, 3 Nov 2011 08:16:47 +0000 (UTC) Received: (qmail 54592 invoked by uid 500); 3 Nov 2011 08:16:45 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 54532 invoked by uid 500); 3 Nov 2011 08:16:42 -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 54524 invoked by uid 99); 3 Nov 2011 08:16:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 08:16:42 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mac.miklas@googlemail.com designates 209.85.216.172 as permitted sender) Received: from [209.85.216.172] (HELO mail-qy0-f172.google.com) (209.85.216.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 08:16:37 +0000 Received: by qyl16 with SMTP id 16so775577qyl.10 for ; Thu, 03 Nov 2011 01:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=F8H4aG+NLJc5UWrckLWfPmYn907limzhWdGOQAwknTc=; b=gjzspg5z/xu2ipvDTeJi7hGMod7gCqMNyXtPZrIypx6U10lO/wn5Ye7E1yJ7/EbzoF Mrv73Dn7B+Lh8GHi1oMItIlh4tzBdBxCML+AmcuxmLaIXlXDEVIo3Fv8hk4sFpVuRhgR h7yq7TUzqiORP6zEAUMLYSippTTNQSUSCrtB8= MIME-Version: 1.0 Received: by 10.182.73.36 with SMTP id i4mr1629917obv.24.1320308176823; Thu, 03 Nov 2011 01:16:16 -0700 (PDT) Received: by 10.182.37.225 with HTTP; Thu, 3 Nov 2011 01:16:16 -0700 (PDT) Reply-To: m.miklas@gmx.net In-Reply-To: References: <167836318403381239@unknownmsgid> Date: Thu, 3 Nov 2011 09:16:16 +0100 Message-ID: Subject: Re: Cassandra 1.x and proper JNA setup From: Maciej Miklas To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d04446bc1dfa44004b0d033e0 --f46d04446bc1dfa44004b0d033e0 Content-Type: text/plain; charset=UTF-8 According to source code, JNA is being used to call malloc and free. In this case each cached row will be serialized into RAM. We must be really careful when defining cache size - to large size would cause out of memory. Previous Cassandra releases has logic that would decrease cache size if heap is low. Currently each row will be serialized without any memory limit checks - assuming that I understood it right. Those properties: reduce_cache_sizes_at: 0.85 reduce_cache_capacity_to: 0.6 are not used anymore - at least not when JNA is enabled, witch is default from Cassandra 1.0 On Wed, Nov 2, 2011 at 1:53 PM, Maciej Miklas wrote: > I've just found, that JNA will be not used from 1.1 release - > https://issues.apache.org/jira/browse/CASSANDRA-3271 > I would be also nice to know what was the reason for this decision. > > Regards, > Maciej > > > On Wed, Nov 2, 2011 at 1:34 PM, Viktor Jevdokimov < > Viktor.Jevdokimov@adform.com> wrote: > >> Up, also interested in answers to questions below. >> >> >> Best regards/ Pagarbiai >> >> Viktor Jevdokimov >> Senior Developer >> >> Email: Viktor.Jevdokimov@adform.com >> Phone: +370 5 212 3063 >> Fax: +370 5 261 0453 >> >> J. Jasinskio 16C, >> LT-01112 Vilnius, >> Lithuania >> >> >> >> Disclaimer: The information contained in this message and attachments is >> intended solely for the attention and use of the named addressee and may be >> confidential. If you are not the intended recipient, you are reminded that >> the information remains the property of the sender. You must not use, >> disclose, distribute, copy, print or rely on this e-mail. If you have >> received this message in error, please contact the sender immediately and >> irrevocably delete this message and any copies.-----Original Message----- >> From: Maciej Miklas [mailto:mac.miklas@googlemail.com] >> Sent: Tuesday, November 01, 2011 11:15 >> To: user@cassandra.apache.org >> Subject: Cassandra 1.x and proper JNA setup >> >> Hi all, >> >> is there any documentation about proper JNA configuration? >> >> I do not understand few things: >> >> 1) Does JNA use JVM heap settings? >> >> 2) Do I need to decrease max heap size while using JNA? >> >> 3) How do I limit RAM allocated by JNA? >> >> 4) Where can I see / monitor row cache size? >> >> 5) I've configured JNA just for test on my dev computer and so far I've >> noticed serious performance issues (high cpu usage on heavy write load), so >> I must be doing something wrong.... I've just copied JNA jars into >> Cassandra/lib, without installing any native libs. This should not work at >> all, right? >> >> Thanks, >> Maciej >> >> > --f46d04446bc1dfa44004b0d033e0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable According to source code, JNA is being used to call malloc and free. In thi= s case each cached row will be serialized into RAM.
We must be really c= areful when defining cache size - to large size would cause out of memory. = Previous Cassandra releases has logic that would decrease cache size if hea= p is low.
Currently each row will be serialized without any memory limit checks - ass= uming that I understood it right.

Those properties:
=C2=A0=C2=A0= reduce_cache_sizes_at: 0.85
=C2=A0=C2=A0 reduce_cache_capacity_to: 0.6<= br>are not used anymore - at least not when JNA is enabled, witch is defaul= t from Cassandra 1.0


On Wed, Nov 2, 2011 at 1:53 PM, Maciej M= iklas <ma= c.miklas@googlemail.com> wrote:
I've just found, that JNA will be not used from 1.1 release - https://issues.apache.org/jira/browse/CASSANDRA-3271
I would be als= o nice to know what was the reason for this decision.

Regards,
Maciej


On Wed, Nov 2, 2011 at 1:34 = PM, Viktor Jevdokimov <Viktor.Jevdokimov@adform.com> wrote:
Up, also interested in answers to questions = below.


Best regards/ Pagarbiai

Viktor Jevdokimov
Senior Developer

Email: Vi= ktor.Jevdokimov@adform.com
Phone: +370 5 212 3063
Fax: +370 5 261 0453

J. Jasinskio 16C,
LT-01112 Vilnius,
Lithuania



Disclaimer: The information contained in this message and attachments is in= tended solely for the attention and use of the named addressee and may be c= onfidential. If you are not the intended recipient, you are reminded that t= he information remains the property of the sender. You must not use, disclo= se, distribute, copy, print or rely on this e-mail. If you have received th= is message in error, please contact the sender immediately and irrevocably = delete this message and any copies.-----Original Message-----
From: Maciej Miklas [mailto:mac.miklas@googlemail.com]
Sent: Tuesday, November 01, 2011 11:15
To: user@cas= sandra.apache.org
Subject: Cassandra 1.x and proper JNA setup

Hi all,

is there any documentation about proper JNA configuration?

I do not understand few things:

1) Does JNA use JVM heap settings?

2) Do I need to decrease max heap size while using JNA?

3) How do I limit RAM allocated by JNA?

4) Where can I see / monitor row cache size?

5) I've configured JNA just for test on my dev computer and so far I= 9;ve noticed serious performance issues (high cpu usage on heavy write load= ), so I must be doing something wrong.... I've just copied JNA jars int= o Cassandra/lib, without installing any native libs. This should not work a= t all, right?

Thanks,
Maciej



--f46d04446bc1dfa44004b0d033e0--