From owner-freebsd-java@freebsd.org Wed Apr 12 23:00:29 2017 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DAC7D3B388 for ; Wed, 12 Apr 2017 23:00:29 +0000 (UTC) (envelope-from kmisuth@ethome.sk) Received: from smtpout8.dnsserver.eu (smtpout8.dnsserver.eu [92.240.253.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 638A9253 for ; Wed, 12 Apr 2017 23:00:28 +0000 (UTC) (envelope-from kmisuth@ethome.sk) Received: from [92.240.253.67] (helo=smtp3s109.dnsserver.eu) by smtpout8.dnsserver.eu with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1cyQsl-000PYC-O1 for freebsd-java@FreeBSD.org; Thu, 13 Apr 2017 00:36:59 +0200 Received: from [92.240.253.173] (helo=roundcube.dnsserver.eu) by smtp3s109.dnsserver.eu with esmtpa (Exim 4.83 (FreeBSD)) (envelope-from ) id 1cyQsl-000Duw-AP for freebsd-java@FreeBSD.org; Thu, 13 Apr 2017 00:36:59 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 13 Apr 2017 00:36:59 +0200 From: Kamil Misuth To: freebsd-java@FreeBSD.org Subject: State of Java NIO/KQueue Reply-To: kmisuth@ethome.sk Mail-Reply-To: kmisuth@ethome.sk Message-ID: <57b20c2254bea4d79844d133f362c129@pop3-imap.dnsserver.eu> X-Sender: kmisuth@ethome.sk User-Agent: Roundcube Webmail/1.2.0 X-SA-Exim-Connect-IP: 92.240.253.173 X-SA-Exim-Mail-From: kmisuth@ethome.sk X-SA-Exim-Scanned: No (on smtp3s109.dnsserver.eu); SAEximRunCond expanded to false X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 23:00:29 -0000 Greetings, I am trying out Apache Ignite on FreeBSD 11 with OpenJDK (7/8) and would really like to make it work well. Ignite uses NIO for inter node communication. When debugging I was able to confirm that KQueueSelectorImpl is used. For the purpose of testing I've used loopback interface with multiple aliases, however, for bigger payloads the communication seriously slows down from time to time and nodes would experience >3 second delay on reading side (I have no hard evidence collected yet). Interestingly, this would not happen for small payloads like serveral bytes. I went thought Ignite's selector loop and it looks OKish. I've tested my sample code on CentOS 7 with epoll selector using loopback in similar fashion and everything worked well even for larger payload with no hiccups. Some old Zookeeper docs would say NIO on FreeBSD is broken but then I also came across this https://issues.apache.org/jira/browse/ZOOKEEPER-1509 . So, my questions are: 1) How stable is KQueueSelectorImpl in current version of OpenJDK 8/7? 2) What would be the best way to start examining what's happening where for locating the possible bottle neck? 3) Could this be something buffer related? Thanks, Kamil