From user-return-61057-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Fri May 11 07:23:31 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2C023180647 for ; Fri, 11 May 2018 07:23:31 +0200 (CEST) Received: (qmail 73633 invoked by uid 500); 11 May 2018 05:23:28 -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 73623 invoked by uid 99); 11 May 2018 05:23:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2018 05:23:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D1E7C1A22EB for ; Fri, 11 May 2018 05:23:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.1 X-Spam-Level: *** X-Spam-Status: No, score=3.1 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_LINEPADDING=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id qKcbDolBmF4W for ; Fri, 11 May 2018 05:23:26 +0000 (UTC) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4BE5A5F1E7 for ; Fri, 11 May 2018 05:23:26 +0000 (UTC) Received: by mail-io0-f176.google.com with SMTP id f21-v6so5667870iob.13 for ; Thu, 10 May 2018 22:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=6V0sa0c2xlk/JKSsovcMkVdzMPU/9v9VDwlLrX2Y+0A=; b=DWyNxhq4fA9PD3iY4MZ+7fxoVBpZeLskp3kIzgOfxFHOa30MR1MdzdxS0UA3qsKBSB iHPuzg10nT9ow6SmsTPF7tY2JHRIsPgfqIuIX1c10IpZjh88tyScTxAv19d+Gqnro3aB bAFmyp2se3dXwuwE7nVwmMtf0kLHEguoddosVF0viXKLf+ywVKZT8wq6H0FdXvP+Plot pSAnNixLT4bHpyM+7V2QsCnUhZeLYI/JrZoS81/cT6IlAPGZJIxnfXGhWLhBpZMxQ8pU jZBKplImH6oxl7iHGdY5g/xFDtYe6hWD1Eijsb14Q301OGQ77JbjmDbY3CRrXt/xlYOg 7dvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=6V0sa0c2xlk/JKSsovcMkVdzMPU/9v9VDwlLrX2Y+0A=; b=as50w6UMAfbc/65k0lWEtS2z7NguIDPDoduCA3VERj6wBejwSDc/whUfw4GKmXn1tw 5NUDmXn1xkm2Dz3V1pHj6WTBxVlgpHmXP+tR/56mOiMrVMdvyAGvGP8xYkKyDIwgDM4L 8a8pUInU7paUq/I2Xh89kexkiMvyAQvufkh/69+vosonsITcoqbaAdlM4j/1t0iuHscK oe8A3zfiS2C5hOGXlsYAyGh7ngp7wCiV72L6XKiRJM+AJeZkWtX2OLkvnAS6ZQZ2CoW8 UxYfALbB/rn2huGR/WDKx8yNZxYn+83TX5ilsiKE47ToUJvU20+fmXS6enJs5KOFGXnz vC9A== X-Gm-Message-State: ALKqPwcHFcokiCUIawlymksBiMHyL67UckpwXdYjmsZmKp64lvnAf0kV BIer5oaAbtSiN4NnqqGrBhw6Nplx+yPHcZMTd5uHeMBQ X-Google-Smtp-Source: AB8JxZr9VBqKkzm/mGElaJCbZoK++FfjOOAFE3b+zf3QTQyeQ+8QtHSdqBxAaAT6JS0F5U/iSo5o+q/Z51zTuY68zOc= X-Received: by 2002:a6b:957:: with SMTP id j84-v6mr4423627ioi.232.1526016200143; Thu, 10 May 2018 22:23:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:9399:0:0:0:0:0 with HTTP; Thu, 10 May 2018 22:22:59 -0700 (PDT) In-Reply-To: References: From: Jeff Jirsa Date: Fri, 11 May 2018 10:52:59 +0530 Message-ID: Subject: Re: Cassandra HEAP Suggestion.. Need a help To: cassandra Content-Type: multipart/alternative; boundary="00000000000087f8ac056be75524" --00000000000087f8ac056be75524 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable There's no single right answer. It depends a lot on the read/write patterns and other settings (onheap memtable, offheap memtable, etc). One thing that's probably always true, if you're using ParNew/CMS, 16G heap is a bit large, but may be appropriate for some read heavy workloads, but you'd want to make sure you start CMS earlier than default (set CMS initiating occupancy lower than default). May find it easier to do something like 12/3 or 12/4, and leave the remaining RAM for page cache. CASSANDRA-8150 has a bunch of notes for tuning GC configs ( https://issues.apache.org/jira/browse/CASSANDRA-8150 ), and Amy's 2.1 tuning guide is pretty solid too ( https://tobert.github.io/pages/als-cassandra-21-tuning-guide.html ) On Fri, May 11, 2018 at 10:30 AM, Mokkapati, Bhargav (Nokia - IN/Chennai) < bhargav.mokkapati@nokia.com> wrote: > Hi Team, > > > > I have 64GB of total system memory. 5 node cluster. > > > > xxxxxxxxxxxxx ~# free -m > > total used free shared buff/cache > available > > Mem: 64266 17549 41592 66 5124 > 46151 > > Swap: 0 0 0 > > xxxxxxxxxxxxx ~# > > > > and =E2=80=9Cegrep -c 'processor([[:space:]]+):.*' /proc/cpuinfo=E2=80=9D= giving 12 cpu > cores. > > > > Currently Cassandra-env.sh calculating MAX_HEAP_SIZE as =E2=80=988GB=E2= =80=99 and > HEAP_NEWSIZE as =E2=80=981200 MB=E2=80=99 > > > > I am facing Java insufficient memory issue and Cassandra service is > getting down. > > > > I going to hard code the HEAP values in Cassandra-env.sh as below. > > > > MAX_HEAP_SIZE=3D"16G" (1/4 of total RAM) > > HEAP_NEWSIZE=3D"4G" (1/4 of MAX_HEAP_SIZE) > > > > Is these values correct for my setup in production? Is there any > disadvantages doing this? > > > > Please let me know if any of you people faced the same issue. > > > > Thanks in advance! > > > > Best regards, > > Bhargav M > > > > > > > > > > > > > > > > > --00000000000087f8ac056be75524 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
There's no single right answer. It depends a lot on th= e read/write patterns and other settings (onheap memtable, offheap memtable= , etc).

One thing that's probably always true, if yo= u're using ParNew/CMS, 16G heap is a bit large, but may be appropriate = for some read heavy workloads, but you'd want to make sure you start CM= S earlier than default (set CMS initiating occupancy lower than default). M= ay find it easier to do something like 12/3 or 12/4, and leave the remainin= g RAM for page cache.=C2=A0

CASSANDRA-8150 has a b= unch of notes for tuning GC configs (=C2=A0https://issues.apache.org/jira/browse/CASS= ANDRA-8150 ), and Amy's 2.1 tuning guide is pretty solid too (=C2= =A0https://tobert.github.io/pages/als-cassandra-21-tuning-guide.html= )=C2=A0




<= /div>

On Fri, May = 11, 2018 at 10:30 AM, Mokkapati, Bhargav (Nokia - IN/Chennai) <b= hargav.mokkapati@nokia.com> wrote:

Hi Team,

=C2=A0

I have 64GB of total system memory. 5 node cluster.<= u>

=C2=A0

= xxxxxxxxxxxxx ~# free -m

= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 total=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 used=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 free=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 shared=C2=A0 bu= ff/cache=C2=A0=C2=A0 available

= Mem:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 64266=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 17549=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 41592= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 66=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 5124=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 46151<= /u>

= Swap:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0

= xxxxxxxxxxxxx ~#

= =C2=A0

and =E2=80=9Cegrep -c 'processor([[:space:]]+):.= *' /proc/cpuinfo=E2=80=9D giving 12 cpu cores.

=C2=A0

Currently Cassandra-env.sh calculating MAX_HEAP_SIZE= as =E2=80=988GB=E2=80=99 and HEAP_NEWSIZE as =E2=80=981200 MB=E2=80=99<= /u>

=C2=A0

I am facing Java insufficient memory issue and Cassa= ndra service is getting down.

=C2=A0

I going to hard code the HEAP values in Cassandra-en= v.sh as below.

=C2=A0

MAX_HEAP_SIZE=3D"16G"=C2=A0 (1/4 of total = RAM)

HEAP_NEWSIZE=3D"4G"=C2=A0=C2=A0=C2=A0=C2= =A0 (1/4 of MAX_HEAP_SIZE)

=C2=A0

Is these values correct for my setup in production? = Is there any disadvantages doing this? =C2=A0

=C2=A0

Please let me know if any of you people faced the sa= me issue.

=C2=A0

Thanks in advance!

=C2=A0

Best regards,

Bhargav M

= =C2=A0

= =C2=A0

= =C2=A0

= =C2=A0

= =C2=A0

= =C2=A0

= =C2=A0

= =C2=A0


--00000000000087f8ac056be75524--