From owner-svn-src-head@FreeBSD.ORG Sun Nov 2 23:34:49 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B507106567B; Sun, 2 Nov 2008 23:34:49 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.187]) by mx1.freebsd.org (Postfix) with ESMTP id 95CB18FC0C; Sun, 2 Nov 2008 23:34:48 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by fk-out-0910.google.com with SMTP id k31so2633342fkk.11 for ; Sun, 02 Nov 2008 15:34:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=nKCfvk3zTG9Q9PJ5dHy4qxepaA0pLmZmsrjW2TVD60Y=; b=o785SX5OzwT+9VNOjHZJFCEOum8eiX/jJInQyeFsh1hV6eGIsJKHPP5BLPfYOh1ABw p8/64H8ndg/kjnI01ME7oFzn2qo1LUmVEC4hg7YRwAEW7B6kSnnNlHaMIf/t1b54mvVI cCUPH7dqbNkyOVYWKK7DpfaAckXE3GSP34DBE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=xqWH3uqgKIuHyysqCNKmiBj01sKw9YHNXCSbvdIMuiViXZ5ZM2m8zZyQKoEvczFH00 Nlmmtvz6tBmfI/MoFL2cj7yU4d2DPgGYtxNam9j737peM/HPEOUysPdnj5Rd6KvxsyqL +CN9pPjiNyOa0a/beqAY6RVNGW3rtF+jyP/lE= Received: by 10.181.144.10 with SMTP id w10mr4014237bkn.30.1225668887307; Sun, 02 Nov 2008 15:34:47 -0800 (PST) Received: by 10.181.145.4 with HTTP; Sun, 2 Nov 2008 15:34:47 -0800 (PST) Message-ID: <9bbcef730811021534gb114db9x16a2d6c9a3ecee8b@mail.gmail.com> Date: Mon, 3 Nov 2008 00:34:47 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Giorgos Keramidas" In-Reply-To: <877i7pdzva.fsf@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200810301405.m9UE5wwZ053250@svn.freebsd.org> <877i7pdzva.fsf@kobe.laptop> X-Google-Sender-Auth: 6bee4d96ae049a8c X-Mailman-Approved-At: Sun, 02 Nov 2008 23:38:16 +0000 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184471 - in head/bin: cat cp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Nov 2008 23:34:49 -0000 2008/10/31 Giorgos Keramidas : > Nice :) > > I didn't notice this in -hackers, but it may be worth letting the buffer > size grow above 1 MB when we have more than, say, 512 MB of memory. By > running dd(1) with buffer sizes of 1, 2, 4, 6, 8, 10, 12, 14, and 16 MB > there are larger buffer sizes that reduce involuntary context switches > even more. > > My laptop (with more than 2 GB or memory), with powerd disabled, running > in single user mode, and copying a file of 200 MB using the script: >... > got the following results for sizes < 10 MB: >... As I read it, for x memory you have y context switches: 64 kB - 11194 (old, pre-patch behaviour) 1 MB - 1493 2 MB - 1381 4 MB - 1342 6 MB - 1292 8 MB - 1275 16 MB - 1246 The difference between the best and the worst is 247 context switches (total, not per second). > It looks like it's probably worth pushing the limit up to 8 MB when we > have lots of memory :) Yes, it's an improvement, but who will ever notice? :) I have no strong reason against increasing the buffer for cp to even 8 MB but I really think it's not worth it at this point. In the patch, I've actually allowed the buffer size to grow to 2 MB if MAXPHYS ever gets bumped up (and would gladly increase *this* limit up). I think that, at this point, increasing MAXPHYS will give better performance than increasing this particular buffer.