Tuesday, June 26, 2007

Linchi Shea : How did Random I/Os Outperform Sequential I/Os?

Linchi Shea : How did Random I/Os Outperform Sequential I/Os?
Granted, the I/O path I was working with was not a traditional hard disk. It was a LUN presented from a SAN with a large amount of cache, and to simplify to some extent, the LUN was a RAID 0 stripe set across 12 virtualized drives with a rather large stripe unit size (960K). But how should I explain why 8K random I/Os could outperform 8K sequential I/Os?
After some discussions with a storage professional, we came up with a theory consisting of the following three key factors:
Random I/Os were able to effectively hash I/Os across multiple drives that make up the RAID 0 device.
Relatively large RAID 0 stripe unit size of 960K caused 8K sequential I/Os to cluster around the same drives. Note that it would take 120 sequential I/Os to fill a single 960K stripe.
A base amount of cache was assigned to each drive in RAID 0. And when random I/Os were hashed across 12 drives, the I/Os benefited from larger amount of cache.
Do I have solid proof that these three factors were the root cause of 8K random I/Os outperforming 8K sequential I/Os? No, I don't. But I do have some circumstantial evidence supporting the theory.

No comments: