[Novalug] thinking about switching to maildir
Nino R. Pereira
ninorpereira at gmail.com
Fri Apr 6 12:49:18 EDT 2012
Jon,
that's interesting, I didn't know.
Snippets of info like this make it worthwhile to lurk.
Nino
On 04/06/2012 12:40 PM, Jon LaBadie wrote:
> On Fri, Apr 06, 2012 at 03:37:33AM -0400, James Ewing Cottrell 3rd wrote:
>> Opening many small files is WAY more expensive than reading one
>> sequential file. They will take more reads, and all but one open and
>> close are extra overhead. Plus, each name must be looked up in the
>> directory.
>>
> Pathname resolution, an early step in opening any file/device can be
> expensive. Back in my UNIX kernel days :) a lot of work was being
> done on two kernel functions, namei() and iget() which are called
> for each component of a pathname. It had been determined that those
> two functions alone consumed about 5% of all cpu cycles.
>
> That overhead is the basis for recommending you chdir to a directory when
> you will be working on many files in a directory. Resolve the full path
> only once for the chdir rather than a full path resolution for each file.
> Pathname resolution has been greatly improved since then, but the
> recommendation is still valid.
More information about the Novalug
mailing list