From owner-freebsd-stable@FreeBSD.ORG Thu Feb 4 13:31:40 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CF29106568B for ; Thu, 4 Feb 2010 13:31:40 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id CFD048FC14 for ; Thu, 4 Feb 2010 13:31:39 +0000 (UTC) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 3E699DC7A9 for ; Thu, 4 Feb 2010 08:31:39 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Thu, 04 Feb 2010 08:31:39 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=5iwrJhRmv8wkRkYdP+KdSfhHmaQ=; b=Ol2kdSTAhYMmTaueXlFHXE/ibtW+uSKSFQ0bv9AEgnimczIRyZP551VyUeV8sUxV3VzbGaR65S2HyLRwbz/WvAdBKTQjyo51rxNSTZD2biGTGflBh84ereZZCMWac8Do9sgIUoSSrVoe6vDQSmBAKZTO03jlurfFxPAp+MqTKgA= X-Sasl-enc: DbS7eU9YpcW8BZsK4OCeXB8Fv07pzxiHojCRYDyidRyO 1265290298 Received: from anglepoise.lon.incunabulum.net (cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id C637D483A for ; Thu, 4 Feb 2010 08:31:38 -0500 (EST) Message-ID: <4B6ACC38.2030708@incunabulum.net> Date: Thu, 04 Feb 2010 13:31:36 +0000 From: Bruce Simpson User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.7) Gecko/20100124 Thunderbird/3.0.1 MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <4B685EBA.4020501@minibofh.org> <4B695A1A.1000505@incunabulum.net> <4B696360.3070209@minibofh.org> In-Reply-To: <4B696360.3070209@minibofh.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: ionice in FreeBSD? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 13:31:40 -0000 On 02/03/10 11:52, Jordi Espasa Clofent wrote: > >> So I guess my question is, 'why do you need I/O scheduling, and what >> aspect of system performance are you trying to solve with it' ? > > > Some shell-scripts based on dd or rsync, for example. Even a daily > antivirus (ClamAV) scanner means an extensive I/O. > Even just renicing the processes should help here. The thread(s) will still be scheduled to run when they need running, although it will reduce the rate at which the process(es) involved can saturate the kernel with I/O requests. Currently the FreeBSD kernel doesn't really make a distinction between I/O transactions per process, because of how the unified VM buffer cache works. read() and write() are satisfied from VM; VFS will cause a vm_object to be created for each opened vnode, so read() will be satisfied by the same set of vm_page's as for mmap(). The vnode_pager's getpages() routine will eventually read into physical pages, using BIO requests (although it's usually the filesystem which actually does this). The net effect is that VFS shares its buffers with VM, and this does have some piecemeal benefit as the BIO subsystem will read from the physical medium in large chunks. It isn't impossible to account for I/O per-process. The Xen hypervisor has a similiar problem for per-domain I/O accounting. Currently, Domain 0 is responsible for block I/O, and it can be difficult for its scheduler to tell things apart for similar reasons. There have been previous research forks of FreeBSD to implement I/O scheduling; Eclipse/BSD from Bell Labs was one of them. It might be a good Google Summer of Code project for an interested computer science student. cheers, BMS