From owner-freebsd-current@FreeBSD.ORG Mon Oct 30 20:58:00 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FAAD16A407; Mon, 30 Oct 2006 20:58:00 +0000 (UTC) (envelope-from Peter.Ross@alumni.tu-berlin.de) Received: from omta04ps.mx.bigpond.com (omta04ps.mx.bigpond.com [144.140.83.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7162A43E37; Mon, 30 Oct 2006 20:54:42 +0000 (GMT) (envelope-from Peter.Ross@alumni.tu-berlin.de) Received: from klein.bigpond.com ([143.238.13.186]) by omta04ps.mx.bigpond.com with ESMTP id <20061030205440.PBPZ22756.omta04ps.mx.bigpond.com@klein.bigpond.com>; Mon, 30 Oct 2006 20:54:40 +0000 Received: from klein.bigpond.com (localhost [127.0.0.1]) by klein.bigpond.com (8.13.8/8.13.8) with ESMTP id k9UKsUdW000785; Tue, 31 Oct 2006 07:54:33 +1100 (EST) (envelope-from Peter.Ross@alumni.tu-berlin.de) Received: from localhost (petros@localhost) by klein.bigpond.com (8.13.8/8.13.8/Submit) with ESMTP id k9UKsHYK000782; Tue, 31 Oct 2006 07:54:26 +1100 (EST) (envelope-from Peter.Ross@alumni.tu-berlin.de) X-Authentication-Warning: klein.bigpond.com: petros owned process doing -bs Date: Tue, 31 Oct 2006 07:54:16 +1100 (EST) From: Peter Ross X-X-Sender: petros@localhost To: Massimo Lusetti In-Reply-To: <1162199366.4309.6.camel@massimo.datacode.it> Message-ID: <20061030210629.H778@localhost> References: <45425D92.8060205@elischer.org> <200610281132.21466.davidxu@freebsd.org> <20061028105454.S69980@fledge.watson.org> <20061028194125.GL30707@riyal.ugcs.caltech.edu> <20061028204357.A83519@fledge.watson.org> <1162199366.4309.6.camel@massimo.datacode.it> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: "freebsd-current@freebsd.org" , Paul Allen , Robert Watson , Julian Elischer , David Xu Subject: Re: Comments on the KSE option X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2006 20:58:00 -0000 On Mon, 30 Oct 2006, Massimo Lusetti wrote: > On Sat, 2006-10-28 at 20:47 +0100, Robert Watson wrote: > > > significantly slower than multi-process ones. Many programmers believe that > > threading is necessarily faster than using multiple processors, so I think > > we're fundamentally forced to deal with the way they do use them, rather than > > how they should use them. > > I'm in sync with your opinion but speaking from the point of view of a > programmer which use FreeBSD i would like to say that enforcing (or at > least try to) good understanding of issues and good programming practice > is a good thing(TM), so if FreeBSD as an O.S. and as a community try to > enforce me to have good programming attitudes i really would like to > follow that. I'm not a kernel developer, and not even a 'real' developer, I am just a sys admin who hopes to get the best from the OS. At the moment I am responsible for a bunch of servers to run a homegrown Java application. So sorry if my thoughts here sound a bit naive. The way the JVM exposes the threads to the OS just seems as a "natural" way to me, especially if you are program for more then one OS. I understand it as "leave it to the OS to sort things out. It should know how to use the resources". I administrate SMP servers running a resource-hungry Java/tomcat app. The JVM has several hundred threads, e.g. 100 for every DB connection in a connection pool. It is difficult to imagine that a thread, a "light-weight process" causes more kernel congestion than a process. I doubt it is the programmer's fault, I would think there is something wrong withg the implementation. What means fairness in this context? (Simplification here) I don't hope that the sshd gets half of the CPU if I login. I just hope that I get a share to type a kill command if necessary;-) A webhoster running apaches in 20 jails has other preferences. He wishes that every apache gets close to 5% of the ressources if they all busy, not one who slows everything else down just because it is particularely hungry and spawned new processes. Tha are two very common scenarios with very different requirements, I think. But the OS has to cater for both, and it also should give the admin some utilities he can use to control and manipulate the behaviour. (BTW: It also needs some transperency and documentation for developers and administrators. E.g. even if I am an experienced administrator with Solaris, Linux and FreeBSD background, I do not feel competent at this point to give good advice what thread library and related kernel options to use.) Just my 2 cents. Peter