tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 5.1 RAID5 write performance

On Thu, 5 May 2011, Edgar Fuß wrote:

The block device writes through the buffer cache which has its own
idea of block sizes which is either the filesystem block size stored
in the disklabel for that partition or 2048 bytes as a default.
Yes, I'm aware of that. But that shouldn't lead to a hundredfold loss of throughput, should it?

Well, depending on how the raidframe code actually works, it could certainly slow things down quite a bit. Assuming you are trying to write 64k blocks to the block device and a 2K buffer cache size, that means the one write of 64k blocks will be split into 32 buffers, with the data copied from the user address space to the buffers. Then each of those buffers would be written to the raid device. The raidframe driver might them be reading the full data strip into buffers, updating the 2K portion corresponding to the request, and then writing the full data strip back to the disk. [Note that I don't really know if the raidframe driver actually works that way, but it would certainly account for a massive slowdown].

Writing to the raw device will map the 64k buffer being written to the raid device and pass that entire buffer to the raidframe driver. If the data is aligned on a strip boundary, then the raidframe driver could write that directly to the disk (or perhaps just a copy to a raidframe buffer which would then be written directly to the disk).

Michael L. Hitch              
Computer Consultant
Information Technology Center
Montana State University        Bozeman, MT     USA

Home | Main Index | Thread Index | Old Index