On Thursday 30 August 2001 18:49, bfe wrote:
[...]
> Is there a way under linux to improve access to a bench of disks ?
> If I understand well the operating system, it makes an intermediary
> copy in a cache memory before to copy it in the user RAM.
Yes, at least if you use the normal read()/write() API. (There's no other
way to implement that without accessing the disk in "hard sync" mode,
which would be terribly inefficient.)
I'm not sure what the state of mmap() is, but it could theoretically
bypass the coping.
> The result is a double copy of buffer
Yes.
> therefore the data rate divided by 2.
No, not by far, unless your CPU and memory subsystem is crawling at the
same speed as the disk DMA. The *CPU* does the copying, and it's all
inside system RAM (the DMA moves it there), which has a bandwidth in the
GB/s range on your kind of machines.
> Is there a mean to bypass this double copy ??
You could try mmap(), but I don't think that's the real problem here.
Make sure that DMA on the controller is supported and enabled. Without
DMA, you'll hit the dreaded system bus bottleneck, which easilly eats
your CPU alive, while still delivering poor transfer rates.
(On IDE interfaces, DMA is disabled by default due to crappy support on
some devices, but I wouldn't think that's the case with any mature SCSI
interface driver...)
BTW: This is a video game killer, as it applies to the AGP bus as well.
It makes software rendering dog slow if you don't have a driver
that can use busmaster DMA to grab frames out of system RAM. The bus
and the cards are designed for massive DMA transfers (for pumping
graphics from texture caches and the like), not CPU access, so CPU
access is not optimized.
BTW2: Not using DMA for hard disk access also kills real time performance
with Linux/lowlatency, as the CPU driven block transfers can take
up to milliseconds to complete.
//David Olofson --- Programmer, Reologica Instruments AB
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------------> http://www.linuxdj.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> [EMAIL PROTECTED] -'
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/