Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DB1F9200CB1 for ; Sun, 25 Jun 2017 00:03:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D9C6E160BF3; Sat, 24 Jun 2017 22:03:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2C9AA160BE6 for ; Sun, 25 Jun 2017 00:03:10 +0200 (CEST) Received: (qmail 45457 invoked by uid 500); 24 Jun 2017 22:03:09 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 45445 invoked by uid 99); 24 Jun 2017 22:03:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jun 2017 22:03:09 +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 E2FEAC14D0 for ; Sat, 24 Jun 2017 22:03:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 6Cn-9gh-tvFZ for ; Sat, 24 Jun 2017 22:03:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id E2C8E5FDAD for ; Sat, 24 Jun 2017 22:03:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8E247E0DFE for ; Sat, 24 Jun 2017 22:03:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A454B240D1 for ; Sat, 24 Jun 2017 22:03:00 +0000 (UTC) Date: Sat, 24 Jun 2017 22:03:00 +0000 (UTC) From: "Jason Brown (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8457) nio MessagingService MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 24 Jun 2017 22:03:11 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-8457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16062157#comment-16062157 ] Jason Brown commented on CASSANDRA-8457: ---------------------------------------- bq. Nit: there has been a few Netty minor released since the one in the branch, maybe worth upgrading (since we change it anyway). there were a few unstable netty releases so I skipped those. 4.1.12 is good, but I need a fix in {{Lz4FrameEncoder}} which should be in 4.1.13. bq. MessageOutHandler.AUTO_FLUSH_THRESHOLD feels like a magic constants. At least a comment on why it's a reasonable value would be nice. I've added a comment to the constant, but the value was the value that should have been for the {{Lz4FrameEncoder}} (16k). The value from the [existing code|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/net/OutboundTcpConnection.java#L85] is 64k, so I've reinstated that. Note that the previous {{OTC.BUFFER_SIZE}} can be seen also as a flush threshold, as well, as it is a [parameter to the output stream|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/net/OutboundTcpConnection.java#L471]. Also discovered that {{OTC.BUFFER_SIZE}} is configurable, and made the new version configurable, as well. bq. OutboundHandshakeHandler.WRITE_IDLE_MS: what's the rational behind 10 seconds? Not saying it feels wrong per-se, but wondering if there is more than a gut-feeling to it, and I'd kind of suggest exposing a system property to change that default. I believe 10 seconds was a value [~aweisberg] and I came up with, but I've made it configurable now. bq. There is still a few TODO:JEB in the code: would be good to resolve/clear them if we're going to a more final branch. Done, most of them I had already done on the CASSANDRA-12229 branch, but now backported to this one. bq. Largely a nit, but its a tad confusing that OutboundConnectionParams contains a OutboundMessagingConnection. It feels like saying "The parameters you need for an outbound connection is ... an outbound connection". Maybe a simple renaming would make this clearer, though it feels maybe this could be cleanup up a bit further. Hmm, yeah. I need the {{OutboundMessagingConnection}} for {{ChannelWriter#handleMessageFuture()}} so it can react to the outcome of attempting to send the message. wrt a cleanup, the least-worst idea I have is to move the error handling functionality of {{ChannelWriter#handleMessageFuture()}} to {{OutboundMessageConnection}}, as that's the only thing in {{ChannelWriter}} that requires {{OutboundMessageConnection}}. In {{OutboundConnectionParams}} we can pass a reference to an "error consumer" (not fully thought out but something like {{BiConsumer}}, that's a function on {{OutboundMessageConncetion}}), and {{ChannelWriter#handleMessageFuture()}} can invoke that instead of having a reference to a {{OutboundMessageConncetion}}. wdyt? bq. The handling of "backlogged" messages and channel writability feels a bit complex. For instance, it looks like MessageOutHandler.channelWritabilityChanged can potentially silently drop a message every time it's called. Good catch, fixed. bq. The CI links listed with the branch a bunch of comments ago are completely out of dates. updated the ticket with a pointer to the circleci utests. bq. Some basic benchmark results wouldn't hurt either ... Attaching to this ticket, as it's a non-trivial martrix to test all the combinations of compression, coalescing, jdk-based TLS, and openssl-based TLS. bq. Maybe you could create a parent ticket of which this and CASSANDRA-12229 would be sub-tasks where we could focus the testing/benchmarking/final discussions on the whole thing? done as CASSANDRA-13628 > nio MessagingService > -------------------- > > Key: CASSANDRA-8457 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8457 > Project: Cassandra > Issue Type: New Feature > Reporter: Jonathan Ellis > Assignee: Jason Brown > Priority: Minor > Labels: netty, performance > Fix For: 4.x > > > Thread-per-peer (actually two each incoming and outbound) is a big contributor to context switching, especially for larger clusters. Let's look at switching to nio, possibly via Netty. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org