Re: [RFC][PATCH 0/3] VM throttling: avoid blocking occasional writers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 23 Feb 2007 21:03:37 +0900
Tomoki Sekiyama <[email protected]> wrote:

> Hi,
> 
> I have observed a problem that write(2) can be blocked for a long time
> if a system has several disks and is under heavy I/O pressure. This
> patchset is to avoid the problem.
> 
> Example of the probrem:
> 
> There are two processes on a system which has two disks. Process-A
> writes heavily to disk-a, and process-B writes small data (e.g. log
> files) to disk-b occasionally. A portion of system memory, which is
> depends on vm.dirty_ratio (typically 40%), is filled up with Dirty
> and Writeback pages of disk-a.
> 
> In this situation, write(2) of process-B could be blocked for a very
> long time (more then 60 seconds), although the load of disk-b is quite
> low. In particular, the system would become quite slow, if disk-a is
> slow (e.g. backup to an USB disk).
> 
> This seems to be the same problem as discussed in LKML:
> http://marc.theaimsgroup.com/?t=115559902900003
> and
> http://marc.theaimsgroup.com/?t=117182340400003
> 
Interesting, but how about adjust this parameter like below instead of
adding new control knob ?(this kind of knob is not easy to use.)

==
                struct writeback_control wbc = {
                        .bdi            = bdi,
                        .sync_mode      = WB_SYNC_NONE,
                        .older_than_this = NULL,
                        .nr_to_write    = 0,
                        .range_cyclic   = 1,
                };
<snip>
                if (nr_reclaimable) {
			/* Just do what I can do */
			dirty_pages_on_device = count_dirty_pages_on_device_limited(bdi, writechunk);
			wbc.nr_to_write = dirty_pages_on_device.
			writeback_inodes(&wbc);
 
==

count_dirty_pages_on_device_limited(bdi, writechunk) above returns 
dirty pages on bdi. if # of dirty_pages on bdi is larger than writechunk,
just returns writechunk.

-Kame





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux