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 D77C418062 for ; Tue, 27 Oct 2015 21:57:43 +0000 (UTC) Received: (qmail 47034 invoked by uid 500); 27 Oct 2015 21:57:37 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 46996 invoked by uid 500); 27 Oct 2015 21:57:37 -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 46986 invoked by uid 99); 27 Oct 2015 21:57:37 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Oct 2015 21:57:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 64A8FC09DF for ; Tue, 27 Oct 2015 21:57:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.001 X-Spam-Level: *** X-Spam-Status: No, score=3.001 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=3, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=thelastpickle_com.20150623.gappssmtp.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id pd1qaDxkqtVo for ; Tue, 27 Oct 2015 21:57:24 +0000 (UTC) Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id A965A20F43 for ; Tue, 27 Oct 2015 21:57:24 +0000 (UTC) Received: by obcqt19 with SMTP id qt19so182545712obc.3 for ; Tue, 27 Oct 2015 14:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thelastpickle_com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ARiRYWve70NwJQ9DIKMYvgAoFVXMZaHF7A8tPVLjVz8=; b=Uq2lDQPhohUcDVdD65iWtWRfSWPZfPrnmrg83PhU4Esmm2oeI6oTHyMEDkWSPTghru adEd/sUTps1cvN8d1PM3B5KKcRdqovdce1TgokuIGCqQMl3xQCjPPyHOD/oj1gSgqNFt PZT+2cwIyh9MiEMloVwe/y56IVkinz0znVeAugjq8PRoWTq7Pk9gFW/oGS5MvSyySO1u vSfBnGmOFnIKHwNMkRkbeoSKt+tqDXr6tGZ1Q1lJqMcRQMaW3NYCZrfbaOGpqu3kQL+7 CxVai2MJwt23/eu2D811qc+NLCmdWXIjPc9nBvskzZdt0qkscC9aoXuS3RtJXfS+7Te0 UO0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=ARiRYWve70NwJQ9DIKMYvgAoFVXMZaHF7A8tPVLjVz8=; b=Gm0c71sUd23a+d6VnYpfopGB/Q4nJNq0JY56eQiuhz6t+hv8aIWDQ4+2uFSVApgGxh Ga5P1RUaYr8uby3Ktx4vdvsMU3OfbR6Iy5sOJZr0gFefbDXu68ZtV7D0Kv+ennVIbG2Z CrGFOS2Py45loDRTWQhO4T6dU7JkU7MsXOHuB7+gwcgHbeagOMhJz6oNEhBKyc/4pqVR FmxUgsiewwZIv3o8k3EFZq/FRGIZUPHefDwELNAEYTQKq52xqSHdN5abntl6wZZOaFb+ P8lQ60cRhGDhKdPYj5Kq3VR3JaeEks1N1EDp+L6s/1cZ2nTrH1pqvmOc6zDOLYWsI+aa OMnA== X-Gm-Message-State: ALoCoQm7fpMCuQbN1+9+Wj+IkyzvEjk62WXs07SY/uvpPCV+MTeLFnea/s8UrrrtsN29XDjymrZk MIME-Version: 1.0 X-Received: by 10.182.65.138 with SMTP id x10mr29910452obs.39.1445983043938; Tue, 27 Oct 2015 14:57:23 -0700 (PDT) Received: by 10.202.89.67 with HTTP; Tue, 27 Oct 2015 14:57:23 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Oct 2015 16:57:23 -0500 Message-ID: Subject: Re: memtable flush size with LCS From: Nate McCall To: Cassandra Users Content-Type: multipart/alternative; boundary=001a11c1bb24af87e805231d29d7 --001a11c1bb24af87e805231d29d7 Content-Type: text/plain; charset=UTF-8 The sstable_size_in_mb can be thought of a target for the compaction process moving the file beyond L0. Note: If there are more than 32 SSTables in L0, it will switch over to doing STCS for L0 (you can disable this behavior by passing -Dcassandra.disable_stcs_in_l0=true as a system property). With a lot of overwrites, the settings you want to tune will be gc_grace_seconds in combination with tombstone_threhsold, tombstone_compaction_interval and maybe unchecked_tombstone_compaction (there are different opinions about this last one, YMMV). Making these more aggressive and increasing your sstable_size_in_mb will allow for potentially capturing more overwrites in a level which will lead to less fragmentation. However, making the size too large will keep compaction from triggering on further out levels which can then exacerbate problems particulary if you have long-lived TTLs. In general, it is very workload specific, but monitoring the histogram for the number of ssables used in a read (via org.apache.cassandra.metrics.ColumnFamily.$KEYSPACE.$TABLE.SSTablesPerReadHistogram.95percentile or shown manually in nodetool cfhistograms output) after any change will help you narrow in a good setting. See http://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html?scroll=compactSubprop__compactionSubpropertiesLCS for more details. On Tue, Oct 27, 2015 at 3:42 PM, Dan Kinder wrote: > > Hi all, > > The docs indicate that memtables are triggered to flush when data in the commitlog is expiring or based on memtable_flush_period_in_ms. > > But LCS has a specified sstable size; when using LCS are memtables flushed when they hit the desired sstable size (default 160MB) or could L0 sstables be much larger than that? > > Wondering because I have an overwrite workload where larger memtables would be helpful, and if I need to increase my LCS sstable size in order to allow for that. > > -dan -- ----------------- Nate McCall Austin, TX @zznate Co-Founder & Sr. Technical Consultant Apache Cassandra Consulting http://www.thelastpickle.com --001a11c1bb24af87e805231d29d7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The sstable_size_in_mb can be thought of a target for the = compaction process moving the file beyond L0.

Note: If there are mo= re than 32 SSTables in L0, it will switch over to doing STCS for L0 (you ca= n disable this behavior by passing -Dcassandra.disable_stcs_in_l0=3Dtrue as= a system property).

With a lot of overwrites, the settings you want= to tune will be gc_grace_seconds in combination with tombstone_threhsold, = tombstone_compaction_interval and maybe unchecked_tombstone_compaction (the= re are different opinions about this last one, YMMV). Making these more agg= ressive and increasing your sstable_size_in_mb will allow for potentially c= apturing more overwrites in a level which will lead to less fragmentation. = However, making the size too large will keep compaction from triggering on = further out levels which can then exacerbate problems particulary if you ha= ve long-lived TTLs.

In general, it is very workload specific, but m= onitoring the histogram for the number of ssables used in a read (via org.a= pache.cassandra.metrics.ColumnFamily.$KEYSPACE.$TABLE.SSTablesPerReadHistog= ram.95percentile or shown manually in nodetool cfhistograms output) after a= ny change will help you narrow in a good setting.

See http://docs.datastax.com/= en/cql/3.1/cql/cql_reference/compactSubprop.html?scroll=3DcompactSubprop__c= ompactionSubpropertiesLCS for more details.

On Tue, Oct 27, 201= 5 at 3:42 PM, Dan Kinder <dkinde= r@turnitin.com> wrote:
>
> Hi all,
>
> The d= ocs indicate that memtables are triggered to flush when data in the commitl= og is expiring or based on memtable_flush_period_in_ms.
>
> But= LCS has a specified sstable size; when using LCS are memtables flushed whe= n they hit the desired sstable size (default 160MB) or could L0 sstables be= much larger than that?
>
> Wondering because I have an overwri= te workload where larger memtables would be helpful, and if I need to incre= ase my LCS sstable size in order to allow for that.
>
> -dan



--
-----------------
Nate McCall
Austin, TX
@z= znate

Co-Founder & Sr. Technical Consultant
Apache Cassandra = Consulting
http://www.thelastpi= ckle.com
--001a11c1bb24af87e805231d29d7--