From owner-freebsd-hackers Sat Apr 22 0:51:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 91BCB37B70D for ; Sat, 22 Apr 2000 00:51:36 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e3M8K5i09504; Sat, 22 Apr 2000 01:20:05 -0700 (PDT) Date: Sat, 22 Apr 2000 01:20:05 -0700 From: Alfred Perlstein To: Kevin Day Cc: hackers@FreeBSD.ORG Subject: Re: Double buffered cp(1) Message-ID: <20000422012005.A204@fw.wintelcom.net> References: <200004220255.VAA29433@celery.dragondata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200004220255.VAA29433@celery.dragondata.com>; from toasty@dragondata.com on Fri, Apr 21, 2000 at 09:55:19PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Kevin Day [000421 20:24] wrote: > > Has anyone attempted to create a double buffered version of cp(1)? When > copying from one disk to another, disk activity seems to ping-pong between > the two, rather than keeping both active at the same time. > > If I were to fork and do something similar to afio, or maybe even doing > something weird like using sendfile(it's faster than it sounds, and > zero-copy), does anyone think I'd see any kind of speed boost? > > I'm effectively getting a little less than half the performance of just > writing files filled with zero's, so I'm guessing this is where the > bottleneck is, correct? extend (using truncate) and then mmap() the destination file, then read() directly into the mmap()'d portion. I'd like to see what numbers you get. :) -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message