bdflush(8)                                                          bdflush(8)


       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 consid-
       ered 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  differ-
       ent  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

       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 dae-
       mons running at a time...


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

       -h   Print the usage message (help).

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

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

       -0   Max fraction of LRU list to examine for dirty blocks.

       -1   Max number of dirty blocks to write each time bdflush activated

       -2   Num of clean buffers to be loaded onto free list by  refill_freel-

       -3   Dirty block threshold for activating bdflush in refill_freelist

       -4   Percentage of cache to scan for free clusters

       -5   Time for data buffers to age before flushing

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

       -7   Time buffer cache load average constant

       -8   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 perfor-
       mance 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.

                                   Aug 1994                         bdflush(8)

Man(1) output converted with man2html