From owner-freebsd-arch Tue Feb 19 14:21:56 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mail.chesapeake.net (chesapeake.net [205.130.220.14]) by hub.freebsd.org (Postfix) with ESMTP id 934E337B402 for ; Tue, 19 Feb 2002 14:21:50 -0800 (PST) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id g1JMLkL52532; Tue, 19 Feb 2002 17:21:46 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Tue, 19 Feb 2002 17:21:46 -0500 (EST) From: Jeff Roberson To: Julian Elischer Cc: arch@freebsd.org Subject: Re: Prioritized bio patches. (Updated patch) In-Reply-To: Message-ID: <20020219171504.T12686-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG First of all, I updated the patch. When I merged it in from our sources I missed a one line change that fixed a race condition. I also changed the priority level of NORMAL to 6 so that I could avoid all of the -1's to index the low priority queue. Secondly, I ran a simple test of a kernel compile. The test system has one disk. I did a dd of /dev/zero to a file in a users home directory with a nice of 20 while doing a kernel compile. The original compile took 11 minutes and 32 seconds. The compile with the dd going took 15 minutes and 12 seconds. I originally did this work for VOD server. The idea being that the VOD data was guaranteed and the rest of the system would just have to wait. This was not based on process nice values. Each sub system had a hard coded priority, that in some cases correlated to a different sorting algorithm. When I saw the background fsck work I realized that this could be beneficial to everyone if it was tied to nice. Jeff On Mon, 18 Feb 2002, Julian Elischer wrote: > this is kind of cool > > Can you give any figures showing realtive effects on (say) buildworld > time when there is NICE work also on the system? > (I guess you must have doen it for a reason, so maybe you can give us some > examples of the result) > > regards, julian > > > On Mon, 18 Feb 2002, Jeff Roberson wrote: > > > I have developed an extension to the bio queue interface to support > > priorities. It may be useful in place of the nice value related sleep > > that is currently in bioqdisksort. There are 6 queues in each bio queue > > head. The first is the default sorted queue. It is used if the bio > > priority (bio_prio) is BIO_PRIO_DEFAULT. Then there are 5 unsorted queues > > for use with different nice levels. > > > > The priority is automatically picked at insert time based on the process > > nice value. Un-nice processes still use the default IO queue to prevent > > starvation. The lower priority IO is not sorted because it may be > > interrupted at any time by higher priority io, thus defeating the sort. > > This also saves a bit of structure bloat and processing time. > > > > The main advantage over the current solution is that, if the system has > > spare IO cycles, nice processes can run at full speed. Also, this was > > implemented in such a way that it is completely transparent to users of > > the bioq interfaces. Since cam keeps a deep queue of IOs it may want to > > adjust it's priorities for the IO as well. This would prevent a possible > > delay for high priority IO while cam works through a queue full of low > > priority IO. As it is though the response time should be reasonable. > > > > This patch does not introduce any higher priority levels. It would be > > easy to do, but I don't see any demand for it right now. The patch is > > available at http://www.chesapeake.net/~jroberson/prio.patch > > > > Thanks, > > Jeff > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-arch" in the body of the message > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message