Subject: Coallesce disk I/O (was RE: Interactive responsiveness under heavy I/O load)
To: , <tech-kern@NetBSD.org>
From: Gordon Waidhofer <email@example.com>
Date: 01/26/2004 15:16:28
Disk I/O performance can be **dramatically** improved
by I/O coallescing. My experience with a proprietary
operating system proved this many times over. Linux
coallesces disk I/Os.
When there are multiple bufs (struct bufs) on the
disk queue doing the same command (read/write) and
accessing consecutive disk addresses, the bufs are
turned into one I/O and use scatter/gather. Error
recovery amounts to bursting the chain and retrying
the bufs individually. It works best if I/Os can be
scheduled in batches, ala strategy_list(bp) rather
than one at a time ala strategy(bp).
There was a reference in the "LFS on BSD" paper
(Seltzer, et al) to a Berkeley project around
the same time that added I/O coallescing to
stock FFS. The performance rivaled LFS. I've
never been able to find a paper on that project.
Anybody know more?
Is anybody working on coallesced disk I/Os?
I've only given it a cursory look. I want
to find a way to add coallescing without
tearing-up the whole struct buf subsystem.
It works best if done very near the device
driver. I'm hoping to find a way for the
device drivers to do some sort of "just in time"
coallescing. That way, the struct bufs and
queues would be fine the way they are.
No new data structures need be added or maintained.
It'll be the later part of the year before
I can really wade in.