poelzi / ulatencyd

daemon to minimize latency on a linux system using cgroups
GNU General Public License v3.0
243 stars 30 forks source link

Foreground tasks suffer #17

Open corneil opened 13 years ago

corneil commented 13 years ago

If the idea behind ulatencyd is to improve the user-experience then it needs to ensure the process that has input focus is the most important. I still find that now and then video playback may suffer at the cost of a background download or filecopy.

poelzi commented 13 years ago

yes, foreground apps become most cpu power. do you have cgroup io enabled ?

CONFIG_BLK_CGROUP=y CONFIG_IOSCHED_CFQ=y CONFIG_CFQ_GROUP_IOSCHED=y

The new io optimizer tries to detect io bottleneck situation and enables then the random io grouping, which helps a lot to ensure fair io on high load on the cost of sub optimal disk read optimization on the harddrive. thats the reason the grouping is normally disabled and gets only enabled when the load is high. the active program gets a higher io weight in any case, if the cgroup io is available.

if you still get this issue with cfq group sched enabled, could you please provide some testcase how to reporduce ?

this needs of course cfq to be enabled as the io scheduler. I do not force them to be, so if you use deadline, there is no cgroup iosched for that available.

corneil commented 13 years ago

How do I enable cgroup io? I have been searching but could not find any straightforward documentation...

poelzi commented 13 years ago

easiest way is to append the list of options to the kernel config. i think it uses the last occurence, but i'm not sure. By hand you need io scheduling in general->cgroups (something like that) and in block->io scheduing->cfq group scheduling But io scheduling is only in 2.6.37+ kernels.

corneil commented 13 years ago

Does this imply a kernel compile?

corneil commented 13 years ago

I found this script and it seems to improve things. I will update in a day or so.

http://www.webupd8.org/2010/11/script-to-automatically-apply-200-lines.html

poelzi commented 13 years ago

the script adds the autogrouping, thats what ulatencyd replaces. they changed a lot in 2.6.38 since the proove of concept patch. ulatencyd disables autogrouping on start, but this patch may not contain that feature, so it may clash horribly. i will add some more ioprio settings, tho.

poelzi commented 13 years ago

is this still an issue in 0.5.0 ?