Skip to contentSkip to conversation

DeskOpt - on fly task, i/o scheduler optimization

ANNOUNCE Michal Piotrowski 4 participants 6 messages Aug 31, 2007 – Sep 1, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

Here is something that might be useful for gamers and audio/video editors
http://www.stardust.webpages.pl/files/tools/deskopt/

You can easily tune CFS/CFQ scheduler params

sched_batch_wakeup_granularity_ns
sched_latency_ns
sched_min_granularity_ns
sched_runtime_limit_ns
sched_stat_granularity_ns
sched_wakeup_granularity_ns

back_seek_max
back_seek_penalty
fifo_expire_async
fifo_expire_sync
quantum
slice_async
slice_async_rq
slice_idle
slice_sync

+ nice levels

Results from Nexuiz benchmark

|-------------------------------------------------------------------------------------------|
|	                                      |    CFS + CFQ 	  |   CFS + CFQ + DeskOpt * |
|-------------------------------------------------------------------------------------------|
| timedemo demos/demo2                        |	41,395896833 fps  |   41,460051233 fps      |
| timedemo demos/demo2 + massive_intr 4 1000  |	18,343223633 fps  |   37,814504933 fps      |
| timedemo demos/demo2 + massive_intr 8 1000  |	9,334974533 fps   |   37,376611267 fps      |
|-------------------------------------------------------------------------------------------|

* default class for games

DeskOpt has many design flaws, but it works for me :)

Regards,
Michal

Signature · 2 lines
LOG
http://www.stardust.webpages.pl/log/
#2 lore raw
Quoted 5 lines · Arjan van de Ven
Quoted 2 lines · On Fri, 31 Aug 2007 17:35:38 +0200 Michal Piotrowski…

Hi,

Quoted 8 lines
Quoted 3 lines

Here is something that might be useful for gamers and audio/video editors http://www.stardust.webpages.pl/files/tools/deskopt/

question is how many of the things they changed can we just make default...

Good question.

If we want to change the default settings, we need to carefully benchmark all changes - it is not simple, because some things work different on desktop/server/embedded.

Regards,
Michal

Signature · 2 lines
LOG
http://www.stardust.webpages.pl/log/
#4 lore raw
Quoted 11 lines · Chris Snook
Quoted 6 lines · Michal Piotrowski

Hi,

Here is something that might be useful for gamers and audio/video editors
http://www.stardust.webpages.pl/files/tools/deskopt/

You can easily tune CFS/CFQ scheduler params

I would think that gamers and AV editors would want to be using deadline (or maybe even as), not cfq. How well does it work with other I/O schedulers?

Actually it does not support other i/o schedulers (early stage of development ;).

"Linux supports io scheduling priorities and classes since 2.6.13 with the CFQ io scheduler." (ionice man page)

So we can only tune
antic_expire est_time read_batch_expire read_expire write_batch_expire write_expire
for anticipatory and
fifo_batch front_merges read_expire write_expire writes_starved for deadline.

I'll have a look on it.

Quoted 3 lines

-- Chris

Regards,
Michal

Signature · 2 lines
LOG
http://www.stardust.webpages.pl/log/
#5 lore raw
In reply to Michal Piotrowski
Quoted 2 lines · Michal Piotrowski

Here is something that might be useful for gamers and audio/video editors
http://www.stardust.webpages.pl/files/tools/deskopt/

To make it double cool combine that with the generic genetic optimizer for parameters that was posted a couple of months ago.

Quoted 10 lines

You can easily tune CFS/CFQ scheduler params

sched_batch_wakeup_granularity_ns
sched_latency_ns
sched_min_granularity_ns
sched_runtime_limit_ns
sched_stat_granularity_ns
sched_wakeup_granularity_ns

Quoted 10 lines

back_seek_max
back_seek_penalty
fifo_expire_async
fifo_expire_sync
quantum
slice_async
slice_async_rq
slice_idle
slice_sync

You should probably add the device queue length too. That seems to often have a large impact on IO scheduling because on modern long queue controllers the Linux IO scheduler often doesn't have much to do because the device queue just eats it all up quickly.

-Andi