From owner-freebsd-current@FreeBSD.ORG Mon Aug 22 12:48:30 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA86D16A41F; Mon, 22 Aug 2005 12:48:30 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 759E743D5A; Mon, 22 Aug 2005 12:48:30 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id 9B48D46B8C; Mon, 22 Aug 2005 08:48:29 -0400 (EDT) Date: Mon, 22 Aug 2005 13:48:29 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Divacky Roman In-Reply-To: <20050822083320.GA32668@stud.fit.vutbr.cz> Message-ID: <20050822134710.T896@fledge.watson.org> References: <20050821084546.GA77111@stud.fit.vutbr.cz> <20050821175406.GA36164@xor.obsecurity.org> <20050822074002.GA31176@stud.fit.vutbr.cz> <20050822074932.GA2264@beatrix.daedalusnetworks.priv> <20050822083320.GA32668@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org, Giorgos Keramidas , Kris Kennaway Subject: Re: [PATCH]: fdalloc optimization X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2005 12:48:31 -0000 On Mon, 22 Aug 2005, Divacky Roman wrote: >> By running an application that opens (and keeps open) many files, i.e. >> a program that creates many temporary files, keeps them open and then >> closes them all at once before exiting? > > I did: > > gettimeofday(&t1, NULL); > for (; i>0; i--) { > if (open("/dev/null", O_RDONLY) == -1) { > perror(NULL); > break; > } > } > gettimeofday(&t2, NULL); src/tools/tools/syscall_timing provides a number of simple micro-benchmarks of common system calls, including several that allocate file descriptors (such as pipe creation, socket allocation, etc). Run about ten sets each of {before,after}, drop the first entry for each ("warmup"), and then use ministat to compare the results on a couple of key system calls? Robert N M Watson