A better update policy
Jeffrey C. Mogul · 1994
Some file systems can delay writing modified partially-filled data block results in a delayed write, while a modification that fills a block results in an immediate, although asynchronous, write. The data to disk, in order to reduce disk traffic and over-ULTRIX ™ operating system can be configured to be head. Prudence dictates that such delays be bounded, even more aggressive, delaying all writes of modified in case the system crashes. We refer to an algorithm data. used to decide when to write delayed data back to Without some bound on the age of a delayeddisk as an update policy. Traditional UNIX ® systems write block, a system crash could cause loss of aruse a periodic update policy, writing back all bitrary data. Users would not tolerate this, so the file delayed-write data once every 30 seconds. Periodic system does push delayed-write data out to disk, after update is easy to implement but performs quite badly a while. We use the term update policy to describe in some cases. This paper describes an approximate the algorithm that decides what to write out, and implementation of an interval periodic update policy, when. in which each individual delayed-write block is written when its age reaches a threshold. Interval peri-odic update adds little code to the kernel and can perform much better than periodic update. In particular, interval periodic update can avoid the huge variances in read response time caused by using peri-odic update with a large buffer cache. UNIX systems have traditionally used a simple periodic update (or ‘‘PU’’) policy: once every 30 seconds, all dirty blocks in the file system’s buffer cache are placed on the output queue for the ap-propriate disk. Recent analytical and simulation results, presented by Carson and Setia [2], showed that the PU policy actually performs worse in many cases than the write-through (WT) policy (in which 1.