bdflush − kernel daemon to flush dirty buffers back to disk.


bdflush [opt]


bdflush is used to start the kernel daemon to flush dirty buffers back to disk. The actual dirty work is in a kernel function, and bdflush actually forks a new process which then calls the kernel function that will never return.

bdflush actually forks a second daemon as well, and this one acts like a more traditional update process, except that buffers are not considered ready to be written until they have aged a bit. The clock starts when the buffer is brelsed with the dirty bit set, and the buffer will not be written back until an interval passes. The interval is different for data buffers and for metadata buffers (like directories, bitmaps, indirect blocks, etc), and the current settings are displayed by bdflush when you run it with arguments on the command line. The defaults are 30 seconds for data buffers and 5 seconds for metadata buffers.

The two daemons are normally started in /etc/rc with one command:


Note that you need to have both daemons running because each one serves a different purpose. Note also that this command should be run before any major I/O is performed. In particular, update should be called before any filesystems are fsck’ed or mounted read-write.

When bdflush is called by a user without superuser priveledges, it calls flush() and sync() and then exits. Mustn’t have 20 update daemons running at a time...



Display kernel parameters. Using this option prevents the daemon from starting.


Print the usage message (help).


If bdflush defaults to the old update behavior, call sync this often. ( In seconds ) Default:30.


Call flush this often. ( In seconds ) Default:5.


Max fraction of LRU list to examine for dirty blocks.


Max number of dirty blocks to write each time bdflush activated


Num of clean buffers to be loaded onto free list by refill_freelist


Dirty block threshold for activating bdflush in refill_freelist


Percentage of cache to scan for free clusters


Time for data buffers to age before flushing


Time for non-data (dir, bitmap, etc) buffers to age before flushing


Time buffer cache load average constant


LAV ratio (used to determine threshold for buffer fratricide)


bdflush was written as a quick hack by Eric Youngdale <>. The main goal was to improve kernel performance by making the flushing of dirty buffers more intelligent, and add support for buffer clustering. Feel free to improve it. Various other hacks by Phil Bostley <> and Daniel Quinlan <>.


If there are, they are most likely in the kernel code.