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

Re: Reducing HDD writing affect on whole system.



Hi Sthu,

Am Samstag, 15. Oktober 2011 schrieb Sthu Deus:
> Thank You for Your time and answer, Henrique:
> >Well, *any* issue with the disk subsystem will cause such problems to
> >get several orders of magnitude worse, so yes, one must *first* make
> >sure the disks are operating at the expected speed.
> 
> How I can be sure the HDD is "operating at the expected speed"?
> 
> >After you are sure the hardware is operating at its proper speed, you
> >can start tunning the kernel and IO tasks.   There is indeed such a
> >thing as an IO priority per process, but due to CFQ/writeback issues,
> >tuning that might not be enough.  You also have to tune the kernel to
> >not leave too many outstanding pages.   And some filesystems are
> >better than others for certain workloads.
> 
> Let me make it clearer a bit *my* situation.
> 
> For now I'm speaking about simple desktop environment - nothing special
> w/ the HDD/FS - just SATA disk w/ EXT4 on it. I experience freezes on
> any applications while, say, I copy a a big file - say just a DVD.iso -
> I do not think it is normal absolutely. And as You pointed out that the

Thats a typical workload where certain kernels have lots of problems with 
interactivity. I think its best to use at least kernel 2.6.37. At some 
kernel version CFQ gained a low_latency mode which is enabled by default. 
Best would probably be to update to the most recent backport kernel. But 
as thats just a wild guess its better to first find out what the actual 
problem is:

> discs can work not at their optimal speed (hardware issue) then I would
> like to find out that. - I have read that the devices do tune
> themselves pretty well for the optimal performance, though. So, how I
> check that?

Please do you what you do when you experience slow operation, run vmstat 1 
and post the output of at least 15 lines here. Also describe what exactly 
you do, what stuff is running - for example which desktop environment 
with/or without desktop search for example - and if commands are involved 
post examples.

Then also include at least the following:

- hdparm -I /dev/sda | egrep -i "(model|transport:|likely used|DMA:)" 
(replace sda by whatever your drive is)
- lspci -nn | egrep -i "(ide|sata)"
- grep -i "model name" /proc/cpuinfo
- uname -a

Try to preserve formatting or use a pastebin.

> >ionice from util-linux can set the process IO priority.  There are
> >other utilites that can also do that.
> 
> Is it "nice" :) if I put the following
> 
> ionice -c 2 -n 7 mc
> 
> to /etc/rc.local
> 
> ? Or should put it in some other place - the idea is to run all the mc
> processes w/ lower IO priorities.

Please do not tune before you understand whats going on.

> >I couldn't readly find any up-to-date (well, up-to-2.6.32) guide on
> >how to tune the VM subsystem (which controls the writeback) to refer
> >you to, please look for documentation on how to mess with
> >the /proc/sys/vm/* tunables.
> 
> OK.

I advise against tuning those as long as you do not understand the 
mechanics behind them. 

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7


Reply to: