From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Olaf Hering <olh@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: very low performance on SCSI disks if device node is in tmpfs
Date: Tue, 25 May 2004 15:14:26 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.53.0405251457450.582@chaos> (raw)
In-Reply-To: <20040525184732.GB26661@suse.de>
On Tue, 25 May 2004, Olaf Hering 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.
>
> (none):/# /sbin/hdparm -tT /dev/sdb
>
> /dev/sdb:
> Timing buffer-cache reads: 2532 MB in 2.00 seconds = 1264.93 MB/sec
> Timing buffered disk reads: 48 MB in 3.12 seconds = 15.41 MB/sec
> (none):/# /sbin/hdparm -tT /tmp/sdb
>
> /tmp/sdb:
> Timing buffer-cache reads: 2328 MB in 2.00 seconds = 1163.01 MB/sec
> Timing buffered disk reads: 82 MB in 3.03 seconds = 27.03 MB/sec
>
> This happens also with 2.6.1-mm kernels. I attach the profile with
> devnode in tmpfs and on disk.
>
> --
> USB is for mice, FireWire is for men!
>
You are not actually reading or writing from the 'device'-files.
They are just a trick to associate a major/minor number with
a device. After that initial open, the fd is the handle by which
the device is accessed, not the device-files. Given this, it
doesn't make any difference if the device-file is generated
dynamically as in devfs or statically with `mknod`. Unless you
have a bench mark program that does:
do {
open();
write();
close();
open();
read();
close();
} while(forever);
If that's what the program does, it's probably not a good example
to be used as a bench-mark. If the program does that, and you
want to optimize for that, then the way a read is handled (for the
open in devfs), would need to be optimized to use non-paged memory
because it is possible, in principle, to have to page in the contents
of devfs for each access. Right now, kmalloc(GFP_KERNEL) is being
used and that's pagable.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.
next prev parent reply other threads:[~2004-05-25 19:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-25 18:47 Olaf Hering
2004-05-25 19:14 ` Richard B. Johnson [this message]
2004-05-25 19:34 ` Olaf Hering
2004-05-25 19:44 ` Richard B. Johnson
2004-05-25 20:02 ` Oliver Neukum
2004-05-25 21:48 ` Andrew Morton
2004-05-25 21:57 ` Richard B. Johnson
2004-05-25 21:59 ` Andrew Morton
2004-05-25 22:41 ` Andrew Morton
2004-05-26 0:05 ` Linus Torvalds
2004-05-26 0:10 ` viro
2004-05-26 0:14 ` Andrew Morton
2004-05-26 9:53 ` Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.53.0405251457450.582@chaos \
--to=root@chaos.analogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olh@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®