From owner-freebsd-hackers Wed Feb 10 15:47:17 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA09978 for freebsd-hackers-outgoing; Wed, 10 Feb 1999 15:47:17 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (castles202.castles.com [208.214.165.202]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA09965 for ; Wed, 10 Feb 1999 15:47:09 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (LOCALHOST [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id PAA01160; Wed, 10 Feb 1999 15:42:55 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199902102342.PAA01160@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Tony Finch cc: hackers@FreeBSD.ORG Subject: Re: PIPE_BUF In-reply-to: Your message of "Wed, 10 Feb 1999 18:14:08 GMT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 10 Feb 1999 15:42:54 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I've been looking at the Apache code for doing buffered writes to > logs, which it attempts to do in such a way that log records are not > split across buffer boundaries. It therefore buffers up to PIPE_BUF > bytes to be written in one go. > > Unfortunately, on FreeBSD this doesn't win us much because our log > format averages over 200 bytes and PIPE_BUF is only 512 bytes, so > we'll only be writing at most a couple of records at a time. Other > systems have PIPE_BUF sizes like 4K (Linux), 5K (Solaris), and 10K > (IRIX). > > What do I need to worry about if I rebuild the system with a bigger > PIPE_BUF? > > (Actually, I don't really care about the buffer boundary thing so if > changing PIPE_BUF is painful I'll just compile Apache to use a bigger > buffer regardless of PIPE_BUF.) If it's actually writing into a pipe, it should write as much as possible at once under FreeBSD to get best performance. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message