Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B9711DFB2 for ; Tue, 25 Sep 2012 08:27:09 +0000 (UTC) Received: (qmail 88970 invoked by uid 500); 25 Sep 2012 08:27:08 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 88836 invoked by uid 500); 25 Sep 2012 08:27:08 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 88816 invoked by uid 99); 25 Sep 2012 08:27:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 08:27:08 +0000 Date: Tue, 25 Sep 2012 19:27:08 +1100 (NCT) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: <887653083.120993.1348561628165.JavaMail.jiratomcat@arcas> Subject: [jira] [Resolved] (CASSANDRA-4506) Block insert request when heap is soon full MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne resolved CASSANDRA-4506. ----------------------------------------- Resolution: Duplicate dupe of CASSANDRA-4510 (due to jira bug) > Block insert request when heap is soon full > ------------------------------------------- > > Key: CASSANDRA-4506 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4506 > Project: Cassandra > Issue Type: Wish > Components: Core > Affects Versions: 1.1.3 > Environment: Debian squeeze 32bit > Reporter: Tommy Cheng > Labels: heap, memory, oom > > I have 256MB memory Debian to do the stress test (it is easier to find out the problem) > This is my setting excepts the default > MAX_HEAP_SIZE="192M" > HEAP_NEWSIZE="16M" > commitlog_segment_size_in_mb: 4 > flush_largest_memtables_at: 0.5 (too few memory, flush it earlier...) > concurrent_reads: 16 > concurrent_writes: 8 > memtable_total_space_in_mb: 64 > commitlog_total_space_in_mb: 4 > memtable_flush_queue_size: 6 > in_memory_compaction_limit_in_mb: 4 > concurrent_compactors: 1 > stream_throughput_outbound_megabits_per_sec: 400 > rpc_timeout_in_ms: 60000 > And this is my schema > create keyspace PT > with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' > and strategy_options = [{replication_factor:1}]; > use PT; > create column family cheque > with comparator = UTF8Type > and key_validation_class = UTF8Type > and default_validation_class = UTF8Type > and column_metadata = [ > {column_name: acct_no, validation_class: UTF8Type, > index_name:cheque_acct_no_idx, index_type:KEYS } > {column_name: date, validation_class: UTF8Type, > index_name:cheque_date_idx, index_type:KEYS } > {column_name: bank, validation_class: UTF8Type, > index_name:cheque_bank_idx, index_type:KEYS } > {column_name: amount, validation_class: LongType, > index_name:cheque_amout_idx, index_type:KEYS } > {column_name: receipt, validation_class: UTF8Type, > index_name:cheque_receipt_idx, index_type:KEYS } > {column_name: create_timestamp, validation_class: LongType, > index_name:cheque_create_timestamp_idx, index_type:KEYS} > {column_name: image, validation_class: BytesType} > ]; > I tried to insert a 50KB file per record using hector 1.1.0 > I did not set any swap as it is not recommended. > GC is working and telling me 0.80 heap is used, blahblahblah, the number finally reach 0.99 and of course OOM happens > So my question is the following > Can the server block the incoming insert when the heap size used is 0.95, is it feasible? > I know hector will retry when timeoutexception happens. so it is good to implement blocking features instead of throttling in client problem. > Sorry for my poor english and i am completely cassandra newbie, so my wish may not valid. > Thanks! -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira