Re: Writing on raw device with software RAID 0 is slow

Douglas Gilbert (dougg@torque.net)
Thu, 01 Mar 2001 11:47:23 -0500



Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Ben LaHaise wrote:
> On Thu, 1 Mar 2001, Stephen C. Tweedie wrote:
>
> > Yep. There shouldn't be any problem increasing the 64KB size, it's
> > only the lack of accounting for the pinned memory which stopped me
> > increasing it by default.
>
> Actually, how about making it a sysctl? That's probably the most
> reasonable approach for now since the optimal size depends on hardware.

Something else may slow down raw IO. A buffer
that looks contiguous in the user space typically looks
quite splintered from the kernel's perspective. This
means that a buffer of 64 KB in the user space ends
up being a scatter gather list of 16 elements (assuming
PAGE_SIZE of 4KB) en route to the IDE or SCSI subsystem.

Now one SCSI adapter that I have examined must push each
scatter gather element through its firmware to the DMA
engine which can only hold one element at a time.
That takes time.

Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/