Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 33107 invoked from network); 27 Sep 2010 20:14:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Sep 2010 20:14:15 -0000 Received: (qmail 20556 invoked by uid 500); 27 Sep 2010 20:14:14 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 20509 invoked by uid 500); 27 Sep 2010 20:14:13 -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 20500 invoked by uid 99); 27 Sep 2010 20:14:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 20:14:13 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.83.44] (HELO mail-gw0-f44.google.com) (74.125.83.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 20:14:05 +0000 Received: by gwb20 with SMTP id 20so2088806gwb.31 for ; Mon, 27 Sep 2010 13:13:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.44.1 with SMTP id w1mr9511539ybj.112.1285618420532; Mon, 27 Sep 2010 13:13:40 -0700 (PDT) Sender: scode@scode.org Received: by 10.151.82.10 with HTTP; Mon, 27 Sep 2010 13:13:39 -0700 (PDT) X-Originating-IP: [213.114.145.74] In-Reply-To: <4CA0F79A.9030101@pdf.com> References: <4C940305.7070905@pdf.com> <4C9805FD.6000802@pdf.com> <4C9D2015.40002@pdf.com> <4C9D3043.5060100@pdf.com> <4CA0F79A.9030101@pdf.com> Date: Mon, 27 Sep 2010 22:13:39 +0200 X-Google-Sender-Auth: qnyLgXEPUVyLbmtv2LkHAuwscEw Message-ID: Subject: Re: 0.7 memory usage problem From: Peter Schuller To: user@cassandra.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > You are saying I am doing 36000 inserts per second, when I am inserting 6= 00 > rows, I thought that every row goes into one Node, so the work is done fo= r a > row not a column, so my assumption is NOT true, the work is done on a col= umn > level? so if I reduce the number of columns I will get a "substantial" > improvement in performance? I am not sure about actual numbers, but in general, there is a cost on a per-column basis. I'm pretty sure it's lower than the per-row cost, but it is still not free and should be on the same order of magnitude as rows (I haven't benchmarked with this in mind; someone correct me if I'm wrong). I.e., you can't expect to put an arbitrary amount of columns into a batch mutation, even if it affects just one row, and not have it affect performance. Consider that individual columns are subject to conflict resolution, consistency guarantees and to indexed access. Regarding reduction of column: You will definitely get a substantial performance improvement in terms of "row mutations per second" by decreasing the number of columns mutated in each row; however that is comparing apples and oranges since you would be inserting less data. > Also, what do you mean by "distributing the client load across the > cluster",=C2=A0 I am doing the writing on Node1, the reading on Node2, an= d the > maintenance on Node3 (disabled the maintenance for now). > Do you think its better if I do writes on all 3 Nodes and reads on all 3 > Nodes as well? The typical approach to real production use is to distribute requests to all nodes in some kind of pseudo-random/round robin fashion. Smart clients might keep track of up/down status of nodes and possibly even to weighting based on performance characteristics of each node. But the general idea is - spread the load out across all nodes. Note however that depending on actual situation it need not matter much. For example if you are no where near CPU bound nor network bound on the Cassandra side, evening out the load of the RPC traffic does not make much of a difference. But as a general recommendation, distributing the load across machines is a good default choice of behavior. (Of course not doing so should not cause the stack overflow you're seeing, so this is a separate issue.) --=20 / Peter Schuller