How to debug high system load?

Paweł Brodacki pawel.brodacki at gmail.com
Sun Jul 15 13:55:45 UTC 2012


2012/7/15 suvayu ali <fatkasuvayu+linux at gmail.com>:
> Hi Heinz,
>
> Sorry for the late response.
>
> On Thu, Jul 12, 2012 at 7:31 PM, Heinz Diehl <htd at 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.


More information about the users mailing list