On Thu, 15 Sep 2005 08:03 am, Andrea Arcangeli wrote:
> I wrote a patch to try avoiding making dirty about half the ram of the
> computer when a single task is writing to disk (like during untarring or
> rsyncing). I try to detect how many pages this task wrote durign the
> last dirty_ratio_centisecs (sysctl configurable), and I assume that
> those pages are already dirty (since they'll be soon anyway).
>
> This way a write-hog task will not lock dirty half the cache for no good
> reason and other tasks will be allowed to use the dirty cache to avoid
> blocking during writes. It's not like the write will not be noticeable,
> but it should become substantially more responsive.
>
> I did a basic test to verify that the performance of the write-hog task
> didn't suffer, the bandwidth remains the same (difference of 2 seconds
> over 1 min and 20sec of workload). [though this should be tested in
> other configurations, it may not be stable yet, the dirty level can go
> down to zero to the point of nr_reclaimable reaching 0, hence the check
> needed to avoid locking up in blk_congestion_wait]
>
> /proc/<pid>/future_pages tells about the current prediction.
> /proc/sys/vm/dirty_ratio_centisecs enables/disables the feature, setting
> it to 0 makes the kernel behave like current mainline, no difference,
> setting it close to zero means almost disabled, large values means very
> enabled, a reasonable value is 5 sec, predicting too much in the future
> may not lead the best results in real life as you can guess ;).
Nice idea!
I suspect the reason 5 seconds is good is probably because it's the same value
as dirty_writeback_centisecs.
I think this patch will sit nicely in my tree thanks :).
Cheers,
Con
-
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]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|