{"id":435,"date":"2020-08-18T19:23:47","date_gmt":"2020-08-18T20:23:47","guid":{"rendered":"http:\/\/www.linux-tutorial.info\/?page_id=77"},"modified":"2020-08-22T19:26:39","modified_gmt":"2020-08-22T20:26:39","slug":"this-is-the-page-title-toplevel-268","status":"publish","type":"page","link":"http:\/\/www.linux-tutorial.info\/?page_id=435","title":{"rendered":"The bdflush Kernel Daemon"},"content":{"rendered":"\n<title>The bdflush Kernel Daemon<\/title>\n<p>\nThe <tt>bdflush<\/tt> kernel daemon is a simple kernel daemon that provides a dynamic\nresponse to the system having too many dirty buffers; buffers that contain data\nthat must be written out to disk at some time.\nIt is started as a kernel thread at system startup time and, rather confusingly,\nit calls itself &#8220;kflushd&#8221; and that is the name that you will see  if you use\nthe <font face=\"helvetica\">ps<\/font> command to show the processes in the system.\nMostly this daemon sleeps waiting for the number of dirty buffers in the\nsystem to grow too large.\nAs buffers are allocated and discarded the number of dirty buffers in the system\nis checked.\nIf there are too many as a percentage of the total number of buffers in the system then\n<tt>bdflush<\/tt> is woken up.\nThe default threshold is 60{3f0b0cf5c640d99e599990c4a720721a04ec3a009b1323dd81fc335ceb655a63} but, if the system is desperate for buffers, <tt>bdflush<\/tt>\nwill be woken up anyway. This value can be seen and changed using the\n<command>update<\/command> command:\n<pre>\n# update -d\nbdflush version 1.4\n0:    60 Max fraction of LRU list to examine for dirty blocks\n1:   500 Max number of dirty blocks to write each time bdflush activated\n2:    64 Num of clean buffers to be loaded onto free list by refill_freelist\n3:   256 Dirty block threshold for activating bdflush in refill_freelist\n4:    15 Percentage of cache to scan for free clusters\n5:  3000 Time for data buffers to age before flushing\n6:   500 Time for non-data (dir, bitmap, etc) buffers to age before flushing\n7:  1884 Time buffer cache load average constant\n8:     2 LAV ratio (used to determine threshold for buffer fratricide).\n<\/pre>\n<p>\nAll of the dirty buffers are linked into the <tt>BUF_DIRTY<\/tt> LRU list whenever they\nare made dirty by having data written to them and <tt>bdflush<\/tt> tries to write a\nreasonable number of them out to their owning disks.\nAgain this number can be seen and controlled by the <command>update<\/command>\ncommand and the default is 500 (see above).<p>\n","protected":false},"excerpt":{"rendered":"<p>The bdflush Kernel Daemon The bdflush kernel daemon is a simple kernel daemon that provides a dynamic response to the system having too many dirty buffers; buffers that contain data that must be written out to disk at some time. &hellip; <a href=\"http:\/\/www.linux-tutorial.info\/?page_id=435\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-435","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=435"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/435\/revisions"}],"predecessor-version":[{"id":733,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/435\/revisions\/733"}],"wp:attachment":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}