Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

Staircase scheduler sucks

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
39 posts
  • 1
  • 2
  • Next
Author
Message
petrjanda
Veteran
Veteran
User avatar
Posts: 1557
Joined: Fri Sep 05, 2003 10:04 pm
Location: Brno, Czech Republic
Contact:
Contact petrjanda
Website

Staircase scheduler sucks

  • Quote

Post by petrjanda » Sat Oct 01, 2005 7:02 am

Everytime I use a kernel with staircase cpu scheduler, watching movies (mpeg4, divx or xvid) and compiling, the movie becomes absolutely unwatchable. When I use a kernel running ingosched, i can do both at the time. wtf is wrong? both kernels have exactly the same configuration except the cpu scheduler. Now, I noticed an interesting anomally, the movie is unplayable on in mplayer. totem is no problem.
There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta
Top
frostschutz
Advocate
Advocate
User avatar
Posts: 2978
Joined: Tue Feb 22, 2005 11:23 am
Location: Germany

  • Quote

Post by frostschutz » Sat Oct 01, 2005 9:18 am

That's the whole purpose of CPU schedulers, ain't it? :roll:
Top
Wietze
n00b
n00b
User avatar
Posts: 37
Joined: Fri Jun 10, 2005 6:42 pm

  • Quote

Post by Wietze » Sat Oct 01, 2005 3:38 pm

What is ?
Making movies unwatchable ?
(Not offending, just wanting to know what you mean)
Top
petrjanda
Veteran
Veteran
User avatar
Posts: 1557
Joined: Fri Sep 05, 2003 10:04 pm
Location: Brno, Czech Republic
Contact:
Contact petrjanda
Website

  • Quote

Post by petrjanda » Sat Oct 01, 2005 4:02 pm

Wietze wrote:What is ?
Making movies unwatchable ?
(Not offending, just wanting to know what you mean)
If i start any sort of a compilation, such as emerging while watching a movie it becomes totally unwatchable, out of sync and choppy. This is on the staircase scheduler. If i put ingosched under the same stress, the movie is actually watchable, though not perfect. This is in mplayer.
There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta
Top
Wietze
n00b
n00b
User avatar
Posts: 37
Joined: Fri Jun 10, 2005 6:42 pm

  • Quote

Post by Wietze » Sat Oct 01, 2005 4:25 pm

petrjanda wrote:
Wietze wrote:What is ?
Making movies unwatchable ?
(Not offending, just wanting to know what you mean)
If i start any sort of a compilation, such as emerging while watching a movie it becomes totally unwatchable, out of sync and choppy. This is on the staircase scheduler. If i put ingosched under the same stress, the movie is actually watchable, though not perfect. This is in mplayer.
I was replying to frostschutz
Top
frostschutz
Advocate
Advocate
User avatar
Posts: 2978
Joined: Tue Feb 22, 2005 11:23 am
Location: Germany

  • Quote

Post by frostschutz » Sat Oct 01, 2005 6:01 pm

Wietze wrote:What is ?
Making movies unwatchable ?
(Not offending, just wanting to know what you mean)
Sorry, I was being sarcastic.

The original poster is trying to run two very CPU intensive tasks (compiler and mplayer) at the same time and noticed that results are different when using different cpu schedulers. And that's the whole point of having cpu schedulers - if they all behaved the same way, there would be no point in having them, would there?
petrjanda wrote:wtf is wrong?
*shrug* Who knows? Maybe it's a bug in the scheduler, there have been bugs in the past... no one but the author (or similarly experienced kernel programmer) may know. Maybe staircase is just not cut out for the task you want to use it with. staircase has a few settings that can be changed in /sys/cpusched/staircase/ , like setting compute to 1... you could try fiddling with them and see if it changes anything.

Personally, I'd say you already have a scheduler that works, so why not use it?
Or is there any particular reason you want to stick with staircase?

(Just in case, if you want to use it because it's said to improve performance by 130%, forget it. No cpu scheduler can do that.)
Top
curtis119
Bodhisattva
Bodhisattva
User avatar
Posts: 2160
Joined: Mon Mar 10, 2003 4:41 pm
Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.

  • Quote

Post by curtis119 » Sat Oct 01, 2005 9:10 pm

frostschutz wrote:
Wietze wrote:What is ?
Making movies unwatchable ?
(Not offending, just wanting to know what you mean)
Sorry, I was being sarcastic.

The original poster is trying to run two very CPU intensive tasks (compiler and mplayer) at the same time and noticed that results are different when using different cpu schedulers. And that's the whole point of having cpu schedulers - if they all behaved the same way, there would be no point in having them, would there?
petrjanda wrote:wtf is wrong?
*shrug* Who knows? Maybe it's a bug in the scheduler, there have been bugs in the past... no one but the author (or similarly experienced kernel programmer) may know. Maybe staircase is just not cut out for the task you want to use it with. staircase has a few settings that can be changed in /sys/cpusched/staircase/ , like setting compute to 1... you could try fiddling with them and see if it changes anything.

Personally, I'd say you already have a scheduler that works, so why not use it?
Or is there any particular reason you want to stick with staircase?

(Just in case, if you want to use it because it's said to improve performance by 130%, forget it. No cpu scheduler can do that.)
:lol: :lol: :lol:

This made me laugh at the Original Poster so hard. I mean, DUH! That's why you have a choice of schedulars. That's like having to move a ton of dirt from point A to point B and having a choice of a 1/2 ton pickup or a yugo to do the job, which one would you choose? I mean come on! Use your common sense for $DIETY sakes.

petrjanda, how long have you been using Linux? How long have you been on this forum? If this were a n00b asking these questions I would give a good solid technical answer but you .... All I can do is laugh at you. Sorry.
Gentoo: it's like wiping your ass with silk.
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Sat Oct 01, 2005 9:52 pm

Since the topic of schedulers came up, I might as well ask here.

There are 3 available in my kernel, and all 3 were compiled into the kernel*. Is there a way to tell which is in use, and is there a way to switch without recompiling the kernel?

* Don't ask me why all 3 are there, I didn't set it. Just happened to stumble upon it the other day.
Quis separabit? Quo animo?
Top
frostschutz
Advocate
Advocate
User avatar
Posts: 2978
Joined: Tue Feb 22, 2005 11:23 am
Location: Germany

  • Quote

Post by frostschutz » Sat Oct 01, 2005 10:00 pm

You could try your luck with

Code: Select all

find /sys -name "*sched*"
(this works for I/O schedulers that are part of the vanilla kernel), I guess it's similar for CPU schedulers (at least they can be changed on runtime) but I don't know the exact filename right now sorry :-)
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Sat Oct 01, 2005 10:18 pm

Code: Select all

# find /sys/ -name "*sched*" -print
/sys/block/sda/queue/iosched
/sys/block/sda/queue/scheduler
/sys/block/hdb/queue/iosched
/sys/block/hdb/queue/scheduler
/sys/block/hdc/queue/iosched
/sys/block/hdc/queue/scheduler
/sys/block/hda/queue/iosched
/sys/block/hda/queue/scheduler
Not sure how to interpret that. Nothing in the I/O scheduler help section mentions anything more specifically.

The schedulers are:
Anticipatory I/O scheduler
Deadline I/O scheduler
CFQ I/O scheduler.

Not that important really, I was just curious.

Thanks.
Quis separabit? Quo animo?
Top
frostschutz
Advocate
Advocate
User avatar
Posts: 2978
Joined: Tue Feb 22, 2005 11:23 am
Location: Germany

  • Quote

Post by frostschutz » Sat Oct 01, 2005 10:34 pm

Err, well, you'll have to look at the file's contents, I guess... apparently you can configure different I/O schedulers for each hard disk (haven't actually tried that). I'm using CFQ for everything so that's what the /sys/block/hdx/queue/scheduler files are saying.
Top
neuron
Advocate
Advocate
User avatar
Posts: 2371
Joined: Tue May 28, 2002 7:43 pm

  • Quote

Post by neuron » Sat Oct 01, 2005 10:51 pm

cat /sys/block/hdb/queue/scheduler


and original poster, are you running the compiling task on nice level? if your not, that's why.. it should chop, as it should be getting 50% of your resources. (on one of them it might be getting 0 one nanosecond, a 100 the next, then 0 again, and that could also cause chopping).
Top
petrjanda
Veteran
Veteran
User avatar
Posts: 1557
Joined: Fri Sep 05, 2003 10:04 pm
Location: Brno, Czech Republic
Contact:
Contact petrjanda
Website

  • Quote

Post by petrjanda » Sun Oct 02, 2005 12:47 am

I was rather interested in technical aspect of things: Why does Staircase give "more" cpu time to compiling instead of mplayer when its meant to be desktop oriented ala responsiveness etc(hence why is said wtf is wrong?), This isn't a question which scheduler is simply overall "better" since ingosched has always performed better for me. Thanks.
Last edited by petrjanda on Sun Oct 02, 2005 12:52 am, edited 1 time in total.
There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta
Top
petrjanda
Veteran
Veteran
User avatar
Posts: 1557
Joined: Fri Sep 05, 2003 10:04 pm
Location: Brno, Czech Republic
Contact:
Contact petrjanda
Website

  • Quote

Post by petrjanda » Sun Oct 02, 2005 12:49 am

neuron wrote:cat /sys/block/hdb/queue/scheduler


and original poster, are you running the compiling task on nice level? if your not, that's why.. it should chop, as it should be getting 50% of your resources. (on one of them it might be getting 0 one nanosecond, a 100 the next, then 0 again, and that could also cause chopping).
well i was interested in WHY Staircaise chops the video to total unwatchability, and ingosched chops it and its still watchable.
There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta
Top
neuron
Advocate
Advocate
User avatar
Posts: 2371
Joined: Tue May 28, 2002 7:43 pm

  • Quote

Post by neuron » Sun Oct 02, 2005 1:26 am

well ingosched could be using more resouces on scheduling, resulting in both tasks "taking longer" to finish, but lower latency, that'd be one reason to use one over the other (note, only a wild wild theory, not backed up by facts).
Top
curtis119
Bodhisattva
Bodhisattva
User avatar
Posts: 2160
Joined: Mon Mar 10, 2003 4:41 pm
Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.

  • Quote

Post by curtis119 » Sun Oct 02, 2005 1:36 am

petrjanda wrote: well i was interested in WHY Staircaise chops the video to total unwatchability, and ingosched chops it and its still watchable.

Ahhhh you didn't say that in your original post.
petrjanda wrote: Everytime I use a kernel with staircase cpu scheduler, watching movies (mpeg4, divx or xvid) and compiling, the movie becomes absolutely unwatchable. When I use a kernel running ingosched, i can do both at the time. wtf is wrong? both kernels have exactly the same configuration except the cpu scheduler.
See? You sound like you are bitching because the two scedulars have different behaviour. Which is EXACTLY what they are supposed to do. They are designed to have different behaviour ON PURPOSE so you can choose which one works best in your situation.

Sorry if I offended you by laughing at you but I feel I am vindicated.
Gentoo: it's like wiping your ass with silk.
Top
petrjanda
Veteran
Veteran
User avatar
Posts: 1557
Joined: Fri Sep 05, 2003 10:04 pm
Location: Brno, Czech Republic
Contact:
Contact petrjanda
Website

  • Quote

Post by petrjanda » Sun Oct 02, 2005 1:48 am

curtis119 wrote:
petrjanda wrote: well i was interested in WHY Staircaise chops the video to total unwatchability, and ingosched chops it and its still watchable.

Ahhhh you didn't say that in your original post.
petrjanda wrote: Everytime I use a kernel with staircase cpu scheduler, watching movies (mpeg4, divx or xvid) and compiling, the movie becomes absolutely unwatchable. When I use a kernel running ingosched, i can do both at the time. wtf is wrong? both kernels have exactly the same configuration except the cpu scheduler.
See? You sound like you are bitching because the two scedulars have different behaviour. Which is EXACTLY what they are supposed to do. They are designed to have different behaviour ON PURPOSE so you can choose which one works best in your situation.

Sorry if I offended you by laughing at you but I feel I am vindicated.
Thats ok. I thought its a public knowledge around the gentoo forums that Staircase is desktop/multimedia oriented , more responsiveness etc, thus I assumed (without having much technical knowledge of how Stairase works) that it would give multimedia applications such as mplayer "more" cpu time than to a non-desktop process like compiling. Of course I know I can renice it to make the movie watchable, but why should I when I specifically opted for a desktop scheduler such as staircase?
There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta
Top
neuron
Advocate
Advocate
User avatar
Posts: 2371
Joined: Tue May 28, 2002 7:43 pm

  • Quote

Post by neuron » Sun Oct 02, 2005 2:07 am

a scheduler can't know what on your system is multimedia and what isn't, all it can try to do is schedule as well as possible, ie spread resources as per nice levels. If you run compile tasks on the same priority as your multimedia tasks, they should get as much resources as them, and if they constantly request more they will get more.

The way staircase works is very simply by giving a process cpu time based on it's nice level if I remember correctly, so if a process is on nice'd 20 it'll get 20 times less resouces than a process that isn't.

A multimedia/desktop scheduler will be more tuned for latency than others will, a server system for example might schedule "slower" and not give you a good desktop experience, but better overall performance (although a tiny improvement if any at all).
Top
petrjanda
Veteran
Veteran
User avatar
Posts: 1557
Joined: Fri Sep 05, 2003 10:04 pm
Location: Brno, Czech Republic
Contact:
Contact petrjanda
Website

  • Quote

Post by petrjanda » Sun Oct 02, 2005 3:45 am

neuron wrote:a scheduler can't know what on your system is multimedia and what isn't, all it can try to do is schedule as well as possible, ie spread resources as per nice levels. If you run compile tasks on the same priority as your multimedia tasks, they should get as much resources as them, and if they constantly request more they will get more.

The way staircase works is very simply by giving a process cpu time based on it's nice level if I remember correctly, so if a process is on nice'd 20 it'll get 20 times less resouces than a process that isn't.

A multimedia/desktop scheduler will be more tuned for latency than others will, a server system for example might schedule "slower" and not give you a good desktop experience, but better overall performance (although a tiny improvement if any at all).
Shouldnt the correct way to do it be that cpu cycles hungry application like emerge/compiling should not be allowed to overstep(by asking for more) their allocated cpu time at the expense of usability of other applications like mplayer? There should be some kind of automatic nicing. Most people use, even gentoo users, the GUI for GUI applications, and not for compiling unless you do emerge sync; emerge -uD world every 2-3 hours(maybe im dreaming?) I yet have to wait for the time where clicking forward and back in firefox will not make an mp3 playing in the background skip. This occurs on both Staircaise and Ingo sched. Are these problems even related to a scheduler or is it just bad programming on the part of mplayer/beep-media-player respectively or something completely else?
There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta
Top
curtis119
Bodhisattva
Bodhisattva
User avatar
Posts: 2160
Joined: Mon Mar 10, 2003 4:41 pm
Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.

  • Quote

Post by curtis119 » Sun Oct 02, 2005 4:08 am

In /etc/make.conf add this line:

Code: Select all

PORTAGE_NICENESS=10
Change the "10" to whatever you want it to be. Portage will automatically nice any apps that it calls, like gcc, to that level (@any devs reading this - is this correct? Or does it only nice the actual emerge process itself?).
Gentoo: it's like wiping your ass with silk.
Top
aaronf0
Tux's lil' helper
Tux's lil' helper
Posts: 121
Joined: Wed Dec 08, 2004 9:03 pm

  • Quote

Post by aaronf0 » Sun Oct 02, 2005 6:13 am

well i noticed that portage never plays nice with any of the hardcore desktop kernels. they work too well, and portage gets way over-prioritized. -ck-sources seems nice, but compling and multitasking heavy stuff just donest work. gentoo-sources seems to have a nice balance of speed and scheduling...
Top
ExZombie
Apprentice
Apprentice
Posts: 170
Joined: Sat May 29, 2004 2:05 pm

  • Quote

Post by ExZombie » Sun Oct 02, 2005 7:14 am

As was said before, CPU scheduler can't know what you are running and what your preferences are. You should tell it what you want it to do with a particular program, and niceness is the way to do so. And since it is not practical to call 'nice' for everything you run, you would do best to use something like this. It works nicely for me (pun intended), but is not the only app of it's kind. Find the one that suits you.
Top
petrjanda
Veteran
Veteran
User avatar
Posts: 1557
Joined: Fri Sep 05, 2003 10:04 pm
Location: Brno, Czech Republic
Contact:
Contact petrjanda
Website

  • Quote

Post by petrjanda » Sun Oct 02, 2005 7:30 am

ExZombie wrote:As was said before, CPU scheduler can't know what you are running and what your preferences are. You should tell it what you want it to do with a particular program, and niceness is the way to do so. And since it is not practical to call 'nice' for everything you run, you would do best to use something like this. It works nicely for me (pun intended), but is not the only app of it's kind. Find the one that suits you.
Great! This is something ive been looking for! Thx.

EDIT: Im not noticing much changes. Ive added emerge, rsync and others as badexes and mplayer, and others as goodexes and there isnt much difference. in fact id say its worse than it was before. :(
There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta
Top
PrakashP
Veteran
Veteran
User avatar
Posts: 1249
Joined: Mon Oct 27, 2003 4:10 pm
Location: C.C.A.A., Germania

  • Quote

Post by PrakashP » Sun Oct 02, 2005 8:11 am

@pjp

The topic was about *CPU* schedulers and you started about *I/O* schedulers... :roll:

@petrjanda

I also dislike the staircase one. For me the one in vanilla works quite OK. staircase has all kinds of side effect if you don't nice things (and nice values have a different meaning with this scheduler too). Perhaps you have to put your video to sched-iso (or alike) under staircase (look for schedtool). Well, for me it was too much hassle w/o noticing much (or any) improvements.

BTW, there is a patch from Peter Williams (I guess) called plugsched which enabled selctioning of different CPU schedulers - I guess even at run-time or at least boot-time.
Top
syg00
l33t
l33t
Posts: 907
Joined: Mon Aug 23, 2004 5:30 am
Location: Brisbane, AUS

  • Quote

Post by syg00 » Sun Oct 02, 2005 9:09 am

FWIW there is a (potential) solution in *early* development.
The CKRM (class-based kernel resource management) is designed to allow you to specify (from userspace) limits on things like CPU usage, memory, I/O, socket usage ...
Define classes of work, and within that sub-classes. What's important to you (at a particular time) will be honoured regardless of scheduler.
It is currently in active re-write to reduce the kernel impact in response to kernel developer concerns.
Testing to follow.

Is probably more aimed at commercial/server systems, but I can see application generally - stay tuned, looks promising ...
Top
Post Reply
  • Print view

39 posts
  • 1
  • 2
  • Next

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy