From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937368AbYD1TmS (ORCPT ); Mon, 28 Apr 2008 15:42:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1765693AbYD1TmC (ORCPT ); Mon, 28 Apr 2008 15:42:02 -0400 Received: from mx1.redhat.com ([66.187.233.31]:36902 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765614AbYD1TmA (ORCPT ); Mon, 28 Apr 2008 15:42:00 -0400 Subject: Re: stat benchmark From: Alexander Larsson To: Carl Henrik Lunde Cc: Soeren Sandmann , Theodore Tso , linux-kernel@vger.kernel.org In-Reply-To: References: <20080425194845.GE21193@mit.edu> Content-Type: text/plain Date: Mon, 28 Apr 2008 21:41:36 +0200 Message-Id: <1209411696.14721.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.21.92 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2008-04-28 at 02:13 +0200, Carl Henrik Lunde wrote: > On Mon, Apr 28, 2008 at 1:29 AM, Soeren Sandmann wrote: > [...] > > For a directory of ~2360 files, chunks of a 1000 files is actually > > surprisingly worse than statting all of the files at once: > > > > Time to stat 1000 files: 1.008735 s > > Time to stat 1000 files: 0.738936 s > > Time to stat 366 files: 0.217002 s > > > > I guess this just shows that seeks really is pretty much all that > > matters. Glib should maybe use a larger chunk size. > > I agree, if I remember correctly I did not find a directory on my local > disk where the best result was to sort a chunk instead of the complete > directory. I don't think that is expected either. The reason for the chunking is to avoid unlimited memory use on large directories.