Re: very low performance on SCSI disks if device node is in tmpfs

From: Richard B. Johnson
Date: Tue May 25 2004 - 17:04:15 EST


On Tue, 25 May 2004, Andrew Morton wrote:

> Olaf Hering <olh@xxxxxxx> wrote:
> >
> > Any ideas why the location of the device node makes such a big
> > difference? I always wondered why my firewire is so dog slow with 2.6.
> > Now I know the reason: /dev is in tmpfs.
> > I dont see that with IDE disks, only with SCSI.
>
> This is truly bizarre. Reading /dev/sda I get 24MB/sec at 700 context
> switches/sec. Reading /mnt/tmpfs/sda it's 14MB/sec, 7000 switches/sec.
> /mnt/ramfs/sda is slow too. /mnt/hda5/sda is fast.
>
>
> I'd assumed that the kernel got the backing_dev_info's screwed up and the
> tmpfs node isn't doing readahead but that appears to not be the case
> (/dev/sda is still fast with zero readahead).
>
>
> You really, really get the weird-bug-of-the-month award for this one. I'll
> poke at it some more later on.
> -

Try the attached utility to compare the open time on devfs and on
the regular fs.

I note that opening a file on a RAM disk seems to take a lot
longer than on a physical device. This might be paging time.

Anyway, this might give some hints of what's causing the
problem.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.

Attachment: open_time.tar.gz
Description: Binary data