On Tue, Mar 23, 1999 at 01:49:18PM +0100, Mateu Batle i Sastre wrote:
> Hi everybody,
>
> I'm trying to get the maximum transfer datarate from several SCSI disks
> from a user application. I think the problem now is that all the transfers
> go through the buffer cache, which implies a lot of memory copy and this
> bounds the maximum I/O. It should be possible to access the SCSI disks
> bypassing the buffer cache of the block devices.
No. Memory is much faster than disk I/O. Evene the fastest disks are one
order of magnitude slower than RAM. And this is only for throughput.
Disk: 10MB/s; RAM: 100MB/s (and faster if in L2/L1 cache)
Additional seek times for RAM are about zero and disk is about 10ms!
Disk: 10ms; RAM: Cache line miss (60ns).
Unless you have a very special application, the idea of bypassing the buffer
cache makes no sense at all.
> Is there any easy way to do this ?
You have to get patches. See Doug's posting.
> My first option would be to use some special flag when openning the file
> to avoid going through the buffer cache. But I have not found anything
> similar.
In most cases, you will profit from the buffer cache, because the buffering
it does for you, is helpful. Unless you have an own cache with a very
careful and specialized design, you don't want to bypass the buffer cache.
> If not, I would have to modify the sd.c to to perform direct transfers
> without using the buffer cache.
You can do it by issueing SCSI commands using sg, if you really want to.
--
Dipl.Phys. Kurt Garloff <[EMAIL PROTECTED]> [Dortmund, FRG]
Plasma physics, high perf. computing [Linux-ix86,-axp, DUX]
PGP key: see mailheader / key servers [Linux SCSI driver: DC390]
PGP signature