From owner-freebsd-questions@FreeBSD.ORG Thu Jun 5 22:25:38 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 757E31065679 for ; Thu, 5 Jun 2008 22:25:38 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B4AC38FC18; Thu, 5 Jun 2008 22:25:37 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <484867E3.3070705@FreeBSD.org> Date: Fri, 06 Jun 2008 00:25:39 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Kirk Strauser References: <200806051508.29424.kirk@strauser.com> <4848523E.2010604@FreeBSD.org> <200806051617.54400.kirk@strauser.com> In-Reply-To: <200806051617.54400.kirk@strauser.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Poor read() performance, and I can't profile it X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2008 22:25:38 -0000 Kirk Strauser wrote: > On Thursday 05 June 2008, Kris Kennaway wrote: >> Kirk Strauser wrote: > >> ktrace(1) and check for the buffer size in use. It is probably too >> small. >> >> Kris > > It seems to be doing a lot of read()s with 4096-byte buffers. Is that what > you mean? It's also doing a lot of lseek()s to what is likely the current > position anyway (example: seek to 0x00, read 16 bytes, seek to 0x10, etc.). > Would that make a difference, or should that be a NOP? No, if it's reading in 16 byte units it will explain the terrible performance. Kris