Hi Paweł and Heinz,
On Sun, Jul 15, 2012 at 03:55:45PM +0200, Paweł Brodacki wrote:
2012/7/15 suvayu ali <fatkasuvayu+linux(a)gmail.com>:
> Hi Heinz,
>
> Sorry for the late response.
>
> On Thu, Jul 12, 2012 at 7:31 PM, Heinz Diehl <htd(a)fritha.org> wrote:
>> On 12.07.2012, Suvayu Ali wrote:
(...)
>> If you're using cfq as your scheduler, try this in rc.local:
>>
>> echo "32" > /sys/block/sda/queue/iosched/quantum
>> echo "0" > /sys/block/sda/queue/iosched/slice_idle
>> echo "1" > /sys/block/sda/queue/iosched/low_latency
>> echo "51200" > /sys/block/sda/queue/nr_requests
>>
>> Together with this in /etc/sysctl.conf:
>>
>> vm.dirty_ratio = 10
>> vm.dirty_background_ratio = 5
>>
>
> I tend not to try things that I don't understand. Could please outline
> briefly what the above suggestions do? I would like to understand before
> I try them out.
>
> Thanks,
>
When vm.dirty_ratio percent of total system memory is taken up by
dirty pages (data waiting to be saved to disk), the process which is
generating disk writes will itself start writing out dirty data. It
means, that program will be made to stop using system buffers to hide
cost of writes, and to write the data to the disk.
When vm.dirty_background_ratio of total system memory is taken up by
dirty pages, the pdflush background writeback daemon will start
writing out dirty data.
If you keep these lower, the system will try to prevent accumulation
of large amounts of data to write. Therefore, when sync comes, you
will not have to wait for the accumulated data to be written to disk.
vm tunables are explained here:
https://www.kernel.org/doc/Documentation/sysctl/vm.txt.
Thanks for the nice explanation. But sadly this doesn't help either.
Earlier the load average on login would be ~ 1-1.5. With these changes,
it starts at ~ 2 and after about 5 minutes settles to ~ 1-1.2. For
example now my laptop has been running for 50 minutes and load is
hovering over 1. :(
--
Suvayu
Open source is the future. It sets us free.