Skip to contentSkip to conversation

Writing on raw device with software RAID 0 is slow

DISCUSSION Douglas Gilbert 1 participant 1 message Mar 1, 2001

lore
Share & tools
lore
#0 lore raw

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

Quoted 8 lines · Ben LaHaise
Quoted 3 lines · Stephen C. Tweedie

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