public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* File System Performance
@ 2001-11-12 13:54 Ben Israel
  2001-11-12 16:33 ` Andrew Morton
                   ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From: Ben Israel @ 2001-11-12 13:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: John O'Neil

My System:
Pentium III 800MHz
128M SDRAM
Aug 2001 MSC Linux
XFS File System

My Results:
hdparm /dev/hda

/dev/hda:
 multcount    =  0 (off)
 I/O support  =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 nowerr       =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 3739/255/63, sectors = 60074784, start = 0

hdparm -t /dev/hda

/dev/hda:
 Timing buffered disk reads:  64 MB in  2.71 seconds = 23.62 MB/sec

time cp -r /usr/src/linux-2.4.6 tst

real 0m47.376s
user 0m0.180s
sys 0m2.710s

du -bs tst
144187392 tst

Actual Performance
2*144MB/48s=6MB/sec

Notes:
1) for consistent results; data size should exceed file cache.
2) cp reads and writes files: so 2*3MB/sec = 6MB/sec fileio on a 24MB/sec
drive

My Questions:
Is there a way of identifying what the file system is doing here?
Is there a way to improve it?
What tools are there to identify and time the raw disk io done by the file
system?






^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: File System Performance
@ 2001-11-12 22:36 Grant Erickson
  0 siblings, 0 replies; 44+ messages in thread
From: Grant Erickson @ 2001-11-12 22:36 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Lionel Bouton, linux-kernel

On Mon, 12 Nov 2001, Linus Torvalds wrote:
> On Mon, 12 Nov 2001, Lionel Bouton wrote:
> >
> > Seems not the case with gnu tar : write isn't even called once on the fd
> > returned by open("/dev/null",...). In fact a "grep write" on the strace 
> > output is empty in the "tar cf /dev/null" case. Every file in the tar-ed
> > tree is stat-ed but no-one is read-ed.
> 
> Wow. What a sleazy optimization - it can't be anything but a special case.
> 
> How do they do it anyway? By matching on the name Or by knowing what the
> minor/major numbers of /dev/null are supposed to be on that particular  
> operating system?
  
>From src/buffer.c in tar-1.13.19 in open_archive():
  
        [ ... ]
  
        #if !MSDOS
  
          /* Detect if outputting to "/dev/null".  */
          {
            static char const dev_null[] = "/dev/null";
            struct stat dev_null_stat;
  
            dev_null_output =
              (strcmp (archive_name_array[0], dev_null) == 0
               || (! _isrmt (archive)
                   && S_ISCHR (archive_stat.st_mode)
                   && stat (dev_null, &dev_null_stat) == 0
                   && archive_stat.st_dev == dev_null_stat.st_dev
                   && archive_stat.st_ino == dev_null_stat.st_ino));
          }
  
        [ ... ]

Regards,

Grant


-- 
 Grant Erickson                       University of Minnesota Alumni
  o mail:erick205@umn.edu                                 1996 BSEE
  o http://www.umn.edu/~erick205                          1998 MSEE


^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2001-11-16 23:14 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-12 13:54 File System Performance Ben Israel
2001-11-12 16:33 ` Andrew Morton
2001-11-12 17:50   ` Ben Israel
2001-11-12 19:46     ` Andrew Morton
2001-11-12 19:59       ` Richard Gooch
2001-11-12 23:07         ` Mike Fedyk
2001-11-13  0:04           ` Richard Gooch
2001-11-13  0:08             ` Mike Fedyk
2001-11-13  0:26               ` Richard Gooch
2001-11-13  0:47                 ` Mike Castle
2001-11-13  1:28                 ` Mike Fedyk
2001-11-13  6:34                   ` Richard Gooch
2001-11-13 20:56                     ` Andreas Dilger
2001-11-13  7:45             ` Andreas Dilger
2001-11-12 20:06       ` Steve Lord
2001-11-12 20:41         ` Andrew Morton
2001-11-12 21:27           ` Steve Lord
2001-11-12 21:43             ` Andrew Morton
2001-11-12 21:45               ` Steve Lord
2001-11-12 21:48               ` Linus Torvalds
2001-11-12 22:11                 ` Lionel Bouton
2001-11-12 19:41                   ` Gérard Roudier
2001-11-12 22:14                   ` Linus Torvalds
2001-11-12 22:30                     ` Ragnar Kjørstad
2001-11-12 22:36                     ` Andrew Morton
2001-11-12 23:04                       ` Mike Castle
2001-11-13  9:56                         ` Peter Wächtler
2001-11-13  9:41                     ` Henning P. Schmiedehausen
2001-11-12 22:16                 ` Andrew Morton
2001-11-12 22:26                   ` Steve Lord
2001-11-12 22:32                   ` Lionel Bouton
2001-11-12 22:45                     ` Alan Cox
2001-11-12 22:39                   ` Alan Cox
2001-11-12 22:39                     ` Xavier Bestel
2001-11-12 22:46                   ` Mike Castle
2001-11-12 21:53             ` Lionel Bouton
2001-11-13  0:17           ` Andreas Dilger
2001-11-13  0:40             ` Peter J . Braam
2001-11-13 20:46               ` Andreas Dilger
2001-11-16 22:07                 ` Peter J . Braam
2001-11-16 23:14                   ` Mike Fedyk
2001-11-12 16:40 ` Ben Israel
2001-11-12 17:29 ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2001-11-12 22:36 Grant Erickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox