From owner-freebsd-java@FreeBSD.ORG Sat Jan 30 18:43:26 2010 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0D1F1065672 for ; Sat, 30 Jan 2010 18:43:26 +0000 (UTC) (envelope-from spatula@spatula.net) Received: from mail-iw0-f198.google.com (mail-iw0-f198.google.com [209.85.223.198]) by mx1.freebsd.org (Postfix) with ESMTP id B3EDE8FC23 for ; Sat, 30 Jan 2010 18:43:26 +0000 (UTC) Received: by iwn36 with SMTP id 36so3282757iwn.3 for ; Sat, 30 Jan 2010 10:43:25 -0800 (PST) MIME-Version: 1.0 Sender: spatula@spatula.net Received: by 10.231.167.65 with SMTP id p1mr745893iby.20.1264875307075; Sat, 30 Jan 2010 10:15:07 -0800 (PST) In-Reply-To: <201001301816.16987.pieter@degoeje.nl> References: <201001301816.16987.pieter@degoeje.nl> Date: Sat, 30 Jan 2010 10:15:07 -0800 X-Google-Sender-Auth: a76e73c1140a51ad Message-ID: From: Nicklas Johnson To: Pieter de Goeje , freebsd-java@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: OpenJDK 6/7 kqueue based NIO provider X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 18:43:27 -0000 I looked into this a long time ago and opened a PR for it for the regular JDK port, for exactly the reasons you cited. At the time I looked into what it would take but I lacked the time and expertise to make the changes myself. Specifically I never figured out how to build the JDK without a multi-hour compilation cycle when I was just making one or two lines of code changes. I was too busy to invest much time in figuring it out unfortunately. http://www.freebsd.org/cgi/query-pr.cgi?pr=java/115773 is the PR. It'd be great if you were able to make it happen and if it could be backported to the regular JDK port. Nick 2010/1/30 Pieter de Goeje > Hi, > > I'm looking for a kqueue based implementation of java.nio.Selector. > > If it doesn't exit yet, I'll have to create it myself. I've already looked > at > the code for the EPoll provider and it doesn't seem too hard to create a > kqueue based one. I will have to figure out how to interface with native > libraries though. > > The reason is obviously performance. I created a simple nio based echo > server > and a kqueue client in C, which creates about 50K simultaneous connections. > Java is completely CPU bound and can only reply to about 100 connections > per > second due to immense poll(2) overhead, and it takes ages for all 50K > connections to be accepted by the server. > > Input welcome :-) > > -- > Pieter > > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > -- "Courage isn't just a matter of not being frightened, you know. It's being afraid and doing what you have to do anyway." -- Doctor Who - Planet of the Daleks This message has been brought to you by Nick Johnson 2.3b1 and the number 6. http://healerNick.com/ http://morons.org/ http://spatula.net/