Re: Delaying writes to disk when there's no need

Chris Friesen (cfriesen@nortelnetworks.com)
Mon, 31 Mar 2003 17:22:33 -0500


Nick Piggin wrote:

> I haven't thought about this much, but it seems to me that
> doing writeout whenever the disk would otherwise be idle
> (and we have dirty memory to write out) would be a good
> solution.

The whole argument about waiting though is that there may be another write
coming to the same place, in which case you could save the cost of the first
write because it didn't have to be written.

Writing to disk isn't free, even if the disk would otherwise be idle. You have
the cost of the setup as well as the memory and pci bus traffic. You may have
disk bandwidth available but be already maxing out the PCI bus, in which case
your "free" disk write takes I/O away from other things.

Ultimately its all a tradeoff. Do you write now, or do you hold off and hope
that you can throw away some of the writes because new stuff will home in to
overwrite them?

Chris

-- 
Chris Friesen                    | MailStop: 043/33/F10
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

- 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/