From owner-freebsd-questions@FreeBSD.ORG Thu Jun 5 21:18:32 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 9337E10656B0 for ; Thu, 5 Jun 2008 21:18:32 +0000 (UTC) (envelope-from kirk@strauser.com) Received: from kanga.honeypot.net (kanga.honeypot.net [206.29.77.83]) by mx1.freebsd.org (Postfix) with ESMTP id 4B41F8FC21 for ; Thu, 5 Jun 2008 21:18:32 +0000 (UTC) (envelope-from kirk@strauser.com) Received: from localhost (localhost [127.0.0.1]) by kanga.honeypot.net (Postfix) with ESMTP id 810CC5DD491; Thu, 5 Jun 2008 16:18:01 -0500 (CDT) X-Virus-Scanned: amavisd-new at honeypot.net Received: from kanga.honeypot.net ([127.0.0.1]) by localhost (kanga.honeypot.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YlEf6E5L9Cd1; Thu, 5 Jun 2008 16:17:58 -0500 (CDT) Received: from janus.daycos.com (janus.daycos.com [10.45.12.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by kanga.honeypot.net (Postfix) with ESMTPSA id AF3A75DCD79; Thu, 5 Jun 2008 16:17:57 -0500 (CDT) From: Kirk Strauser To: Kris Kennaway Date: Thu, 5 Jun 2008 16:17:53 -0500 User-Agent: KMail/1.9.9 References: <200806051508.29424.kirk@strauser.com> <4848523E.2010604@FreeBSD.org> In-Reply-To: <4848523E.2010604@FreeBSD.org> X-Face: T+/_{qmjgbosI0J/e83I~w[&VF'w)!((xEpj///^bA/6?jHHS?nq+T8_+`nh"WnEWCWG, \}]Y2$)) =?utf-8?q?vLVz4ACChrEcb=7DCO=5EtYmMG=5C=0A=09ts=2Em=3F=5B7=5B6OwE*dAJ*9f+m?= =?utf-8?q?X=2E7R32qeN=5EDJ=5C?=(k@evW?IRQCy.^ MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806051617.54400.kirk@strauser.com> 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 21:18:32 -0000 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? -- Kirk Strauser