From owner-freebsd-hackers Mon Apr 30 6:49:23 2001 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 E93FB37B422 for ; Mon, 30 Apr 2001 06:49:19 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f3UDn3311496; Mon, 30 Apr 2001 06:49:03 -0700 (PDT) Date: Mon, 30 Apr 2001 06:49:03 -0700 From: Alfred Perlstein To: =?iso-8859-1?Q?=AAL=AD^=B6W?= Cc: Freebsd-Hackers Subject: Re: write() vs aio_write() Message-ID: <20010430064903.B18676@fw.wintelcom.net> References: <20010430063101.Z18676@fw.wintelcom.net> <200104301340.VAA25665@cslab.csie.ntu.edu.tw> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <200104301340.VAA25665@cslab.csie.ntu.edu.tw>; from r88074@csie.ntu.edu.tw on Mon, Apr 30, 2001 at 09:39:43PM +0800 X-all-your-base: are belong to us. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * ªL­^¶W [010430 06:47] wrote: > > * ªL­^¶W [010430 06:17] wrote: > > Dear all: > > > > Because write() use buffer cache, I want to know whether aio_write() > is > > better than write() in FreeBSD 4.1 . Is aio_write() > > > > outperform write() ? Or any related performance comparison between the > two > > system call ???? > > aio_write is for doing async aio. meaning you can ask the kernel to > move data for you from a memory location to a file descriptor while > you proceed on with doing other work. if you don't have any other > work to do then aio is probably just going to slow you down. > > > Now I am trying to implement a Proxy Server. I want to use asynchrounos I/O > so that > the Proxy Server can do other things than blocking on I/O operation. Is it a > good idea to > use aio_write or aio_read on Proxy Server ??? It's a good idea to use it for disk IO, probably not a good idea for network IO. -- -Alfred Perlstein - [alfred@freebsd.org] Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message