Re: kernel 2.6.13 buffer strangeness - FIXED

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

 





Nate Diller wrote:

just found the culprit. guess i should have read the code the first time. get_dirty_limits() in drivers/block/page_writeback.c has a hard-coded upper limit to dirty_ratio. it's capped to half of the unmapped pages, so maybe 30-40% of your system's memory. so if you are brave, just remove the "/ 2" parts from the 'if (dirty_ratio > unmapped_ratio / 2) dirty_ratio = unmapped_ratio / 2;' check, and you can have all the OOM goodness you want.

Well well well.

Thank you Nate!

I changed that bit of code to:

if (dirty_ratio > unmapped_ratio - 10) dirty_ratio = unmapped_ratio - 10;

and added a couple of sanity checks so that it couldn't get below 5 or above 95.

Then set /proc/sys/vm/dirty_ratio to 95 and dirty_background_ratio to 1.

Guess what? Now my video streams for 120 seconds before being throttled. This is *much better*.
It's now quite feasible to reach 30 seconds by finding a faster disk and/or adding another 512M
or RAM.

I guess the hard-coded limit is in there for a reason, but I sure wish it was adjustable without
this sort of hacking.

regards, Anthony

--
Anthony Wesley
Director and IT/Network Consultant
Smart Networks Pty Ltd
Acquerra Pty Ltd

[email protected]
Phone: (02) 62595404 or 0419409836
-
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]
  Powered by Linux