# # Tell the kernel to use up to 10% of the RAM as cache for writes # On systems with lot of ram can be lowered even more. # Write cache is not free, and overuse of RAM for it # can cause low memory conditions simultaneously with IO clog. # # The infamous issues with writing to USB Flash drives partially caused by # write cache being too big. vm.dirty_ratio=10 # Instruct kernel to use up to 5% of RAM before slowing down the process that's writing # Works in congestion with previous setting. And serving same purpose: protect system responsiveness. vm.dirty_background_ratio=5 # ******** Options below is for information purposes and possible future enablement. ********** # The value controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects (VFS cache). # Lowering it from the default value of 100 makes the kernel less inclined to reclaim VFS cache (do not set it to 0, this may produce out-of-memory conditions) #vm.vfs_cache_pressure=50 # Contains, as a bytes of total available memory that contains free pages and reclaimable # pages, the number of pages at which a process which is generating disk writes will itself start # writing out dirty data. #vm.dirty_bytes = 268435456 # Contains, as a bytes of total available memory that contains free pages and reclaimable # pages, the number of pages at which the background kernel flusher threads will start writing out # dirty data. #vm.dirty_background_bytes = 134217728 # This tunable is used to define when dirty data is old enough to be eligible for writeout by the # kernel flusher threads. It is expressed in 100'ths of a second. Data which has been dirty # in-memory for longer than this interval will be written out next time a flusher thread wakes up # (Default is 3000). #vm.dirty_expire_centisecs = 3000 # The kernel flusher threads will periodically wake up and write old data out to disk. This # tunable expresses the interval between those wake-ups, in 100'ths of a second (Default is 500). # vm.dirty_writeback_centisecs = 1500 # Increase writeback interval for xfs # fs.xfs.xfssyncd_centisecs = 10000 # Set the maximum watches on files #fs.inotify.max_user_watches = 524288 # Set size of file handles and inode cache #fs.file-max = 2097152