From owner-freebsd-performance@FreeBSD.ORG Fri Dec 22 02:08:10 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from [127.0.0.1] (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id A119B16A40F; Fri, 22 Dec 2006 02:08:09 +0000 (UTC) (envelope-from davidxu@freebsd.org) Message-ID: <458B3E0C.6090104@freebsd.org> Date: Fri, 22 Dec 2006 10:08:12 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20061204 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Kirkwood References: <458B3651.8090601@paradise.net.nz> In-Reply-To: <458B3651.8090601@paradise.net.nz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-performance@freebsd.org Subject: Re: Cached file read performance X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2006 02:08:10 -0000 Mark Kirkwood wrote: > I recently did some testing on the performance of cached reads using two > (almost identical) systems, one running FreeBSD 6.2PRE and the other > running Gentoo Linux - the latter acting as a control. I initially > started a thread of the same name on -stable, but it was suggested I > submit a mail here. > > My background for wanting to examine this is that I work with developing > database software (postgres internals related) and cached read > performance is pretty important - since we typically try hard to > encourage cached access whenever possible. > > Anyway on to the results: I used the attached program to read a cached > 781MB file sequentially and randomly with a specified block size (see > below). The conclusion I came to was that our (i.e FreeBSD) cached read > performance (particularly for smaller block sizes) could perhaps be > improved... now I'm happy to help in any way - the machine I've got > running STABLE can be upgraded to CURRENT in order to try out patches > (or in fact to see if CURRENT is faster at this already!)... > > Best wishes > > Mark > I suspect in such a test, memory copying speed will be a key factor, I don't have number to back up my idea, but I think Linux has lots of tweaks, such as using MMX instruction to copy data. Regards, David Xu