BackupPC-users

Re: [BackupPC-users] Which FS?

2009-09-01 00:21:22
Subject: Re: [BackupPC-users] Which FS?
From: Holger Parplies <wbppc AT parplies DOT de>
To: higuita <higuita AT GMX DOT net>
Date: Tue, 1 Sep 2009 03:32:00 +0200
Hi,

higuita wrote on 2009-08-31 23:45:54 +0100 [Re: [BackupPC-users] Which FS?]:
> On Mon, 31 Aug 2009 15:42:50 -0500, Les Mikesell <lesmikesell AT gmail DOT 
> com> wrote:
> > [...]
> > And, assuming you have enough disk activity to keep the cache out of 
> > date, that 'ls -l' will have to move the disk head to the directory 
> > location and then the inode to get the data - if you list many files in 
> 
>       wrong, the ls -l doesnt need to move to the files inode to do
>       anything, the directory have all the necessary info.

sorry, but that is just not true. 'ls -l' needs to do a stat() to determine
file type, permissions, nlinks, owner, group, file size, and file modification
time (in order of appearance). All of these are contained in the inode (stat()
basically returns the contents of the inode, except for the block numbers,
which are none of user-space's business). I believe, some newer file systems
cache the file type in the directory entry, but you *can't* cache any of the
other values, as they may be changed through other links to the same file.

Inode data may be cached by the system, so repeating an 'ls -l' of the same
directory will be faster the second time, but that's not what you usually do.
As Les wrote, assuming you have enough disk activity to keep the cache out of
date [which also depends on how much memory you have and whether you need it
for other purposes], 'ls -l' will cause more disk activity than on a 'normal'
directory. Sorting the stat() calls by inode number would help, but I doubt
'ls' is optimized for such an unusual usage case (but I haven't checked, so I
might be wrong).

Regards,
Holger

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>