Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
The 2.6.25 kernel: Does CFS provide incr. responsivenes?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Nordog
Apprentice
Apprentice


Joined: 08 Jul 2005
Posts: 151
Location: Reykjavík, Iceland

PostPosted: Mon Apr 21, 2008 7:13 pm    Post subject: The 2.6.25 kernel: Does CFS provide incr. responsivenes? Reply with quote

I just slapped together a box for my collegue, composed of hardware slightly inferior to my own Gentoo machine, and just to test whether everything was working correctly I installed ubuntu (could have been anything, but a Ubuntu Hardy Heron beta CD was lying around the office). I felt that the new box with Ubuntu was significantly snappier than my own despite lagging behind in hardware, and I was wandering if it had anything to do with the fact that it has Linux 2.6.25 and thus the CFS?
_________________
Gentoo 2007.0 on a Dell Inspiron e1505/6400 notebook
Intel core 2 duo 2.0 GHz with 2 GB ram
Ati Mobility Radeon x1400
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Mon Apr 21, 2008 7:34 pm    Post subject: Reply with quote

It might help a little, or maybe even a lot under specific circumstances, the only way to be sure is to test it :)

Another thing to look at is what nice level the X server is run at - traditionally the X server was given a bit higher priority than normal apps, but I believe the recommendation now is to not do that.

GUI performance can also be impacted by the video card's acceleration support, but this is more of an issue on really old hardware.

There's really a ton of factors that can influence the actual (or percieved) performance. Another one might be the kernel's tick rate (or using the tickless kernel option). This may be a bigger deal for video playback since you want to make sure the video player gets scheduled at least once per frame, and plain 100hz with a few other apps using the CPU might not be enough to accomplish this.
Back to top
View user's profile Send private message
Nordog
Apprentice
Apprentice


Joined: 08 Jul 2005
Posts: 151
Location: Reykjavík, Iceland

PostPosted: Tue Apr 22, 2008 12:05 am    Post subject: Reply with quote

ah, so it's probably just more likely that the ubuntu guys have done some tweaking of their own (in the Xorg niceness and kernel ticks like you say).

I'm sorta the basic Gentoo user: I use some appropriate profile, add some use flags, compile my kernel in accordance with the hardware and that's it. I have never done any tweaking of my own, probably just because I wasn't aware of what was available to tweak :)

I just had a quick look but I couldn't see any recent Gentoo tweaking for the desktop. After seeing users of other distros getting all preachy about Gentoo not being faster than other distros, perhaps people have become sky and reluctant to write such a guide. Just a thought.
_________________
Gentoo 2007.0 on a Dell Inspiron e1505/6400 notebook
Intel core 2 duo 2.0 GHz with 2 GB ram
Ati Mobility Radeon x1400
Back to top
View user's profile Send private message
Baronek
n00b
n00b


Joined: 22 Apr 2008
Posts: 1

PostPosted: Tue Apr 22, 2008 9:02 am    Post subject: Reply with quote

Nordog wrote:
ah, so it's probably just more likely that the ubuntu guys have done some tweaking of their own (in the Xorg niceness and kernel ticks like you say).


Yeah, ubuntu done much tweaking, like:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/188226
that makes broken that:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/194029

[if you do not like reading, they compiled kernel so that even synergy cannot go smoothly - and they are NOT gonna repair that - it is to late in the dev cycle :)]

And with their policy to wait for release so the bugs wont get updated because SRU policy or sth.
Honestly, it is worse then gentoo :)

So perhaps CFS is fast and responsive, but certainly not under ubuntu.
Back to top
View user's profile Send private message
Akkara
Bodhisattva
Bodhisattva


Joined: 28 Mar 2006
Posts: 6702
Location: &akkara

PostPosted: Tue Apr 22, 2008 9:06 am    Post subject: Reply with quote

Quote:
I felt that the new box with Ubuntu was significantly snappier than my own despite lagging behind in hardware


The difference could also be due to different filesystems on the two machines.

Or possibly that your well-used box's disk is more fragmented than the freshly-installed one.
Back to top
View user's profile Send private message
aidanjt
Veteran
Veteran


Joined: 20 Feb 2005
Posts: 1118
Location: Rep. of Ireland

PostPosted: Tue Apr 22, 2008 9:20 am    Post subject: Reply with quote

doubt it's fs releated, more likely is the ubuntu kernel configuration/patchset is better geared towards desktops, since that's the primary target. And the last two kernel versions have made large strides in more dynamic scheduling advancement which is handy for desktops.
_________________
juniper wrote:
you experience political reality dilation when travelling at american political speeds. it's in einstein's formulas. it's not their fault.
Back to top
View user's profile Send private message
Paapaa
l33t
l33t


Joined: 14 Aug 2005
Posts: 955
Location: Finland

PostPosted: Tue Apr 22, 2008 10:25 am    Post subject: Re: The 2.6.25 kernel: Does CFS provide incr. responsivenes? Reply with quote

Nordog wrote:
I felt that the new box with Ubuntu was significantly snappier than my own despite lagging behind in hardware, and I was wandering if it had anything to do with the fact that it has Linux 2.6.25 and thus the CFS?


Usually different schedulers/SLUBS/SLOBS/SLABS/etc. don't give you "significant" difference. Usually they give you measurable difference but nothing you can easily identify just using the desktop.

Significant difference might mean that something is wrong in you other setup. Try to find out exactly what is snappier and what is not. Do programs start faster? Do you get better UI response (no flicker etc.)? Or what.
_________________
Paludis, the way packages are meant to be managed.
Back to top
View user's profile Send private message
Nordog
Apprentice
Apprentice


Joined: 08 Jul 2005
Posts: 151
Location: Reykjavík, Iceland

PostPosted: Tue Apr 22, 2008 11:59 am    Post subject: Reply with quote

Well, I would say that both boxes start up around as fast. Programs start up much faster on the Ubuntu box (a difference of 1-2 seconds in the case of Amarok) and the UI is snappier also, but all in all it's the fast loading of the programs that stands out. I should note that is a difference in filesystems: The gentoo box users reiserfs but the Ubuntu box uses the default one, Ext3 I think.
_________________
Gentoo 2007.0 on a Dell Inspiron e1505/6400 notebook
Intel core 2 duo 2.0 GHz with 2 GB ram
Ati Mobility Radeon x1400
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Tue Apr 22, 2008 12:06 pm    Post subject: Reply with quote

One thing that has been going awry with recent kernels is CONFIG_FAIR_GROUP_SCHED. It sounds like you'd want to have it set, but experience seems to be showing that for a desktop/laptop (non-server) machine you clearly want it off.

I would also check the "swappiness" setting in /etc/sysctl.conf as a frequent "desktop tweak." The default, and good server value is 100, but many desktop/laptop tweaks set it to 10, or even 0. (I've got it at 25, myself, no logic, just conservatism and not wanting to deviate too far from default.)
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Paapaa
l33t
l33t


Joined: 14 Aug 2005
Posts: 955
Location: Finland

PostPosted: Tue Apr 22, 2008 12:23 pm    Post subject: Reply with quote

Nordog wrote:
Well, I would say that both boxes start up around as fast. Programs start up much faster on the Ubuntu box (a difference of 1-2 seconds in the case of Amarok) and the UI is snappier also, but all in all it's the fast loading of the programs that stands out. I should note that is a difference in filesystems: The gentoo box users reiserfs but the Ubuntu box uses the default one, Ext3 I think.


Do you get the same effect when starting the program the second time? (It should be in cache by then). Or only when you start it the first time?
_________________
Paludis, the way packages are meant to be managed.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Tue Apr 22, 2008 3:42 pm    Post subject: Reply with quote

There's also prelinking which can speed up program startup, especially for things with tons of libraries like KDE apps, etc.

About the comment about a fresh install vs fragmented filesystem... I notice this on gentoo systems I install - after a fresh format and copy, things start a bit faster. It's not as bad as windows with regards to the eventual slow-down, but it is there.
Back to top
View user's profile Send private message
Nordog
Apprentice
Apprentice


Joined: 08 Jul 2005
Posts: 151
Location: Reykjavík, Iceland

PostPosted: Tue Apr 22, 2008 4:21 pm    Post subject: Reply with quote

Quote:
Do you get the same effect when starting the program the second time? (It should be in cache by then). Or only when you start it the first time?


The ubuntu box is faster the first time around but after that they are pretty much as fast. However, I notice that the Gentoo box needs some time to paint all of the contents but with the Ubuntu box everything appears simultaneously.

Quote:
One thing that has been going awry with recent kernels is CONFIG_FAIR_GROUP_SCHED. It sounds like you'd want to have it set, but experience seems to be showing that for a desktop/laptop (non-server) machine you clearly want it off.

I would also check the "swappiness" setting in /etc/sysctl.conf as a frequent "desktop tweak." The default, and good server value is 100, but many desktop/laptop tweaks set it to 10, or even 0. (I've got it at 25, myself, no logic, just conservatism and not wanting to deviate too far from default.)


The box has 4 gb of ram and rarely swaps unless I'm punishing it with some Finite Element calculations. Do you think this would still help?

Just to clarify, I'm actually happy with my Gentoo box, I was just interested in knowing whether my perception of the Ubuntu box being snappier had something to do with the fact that it has the CFS. But I'm still enjoying where this thread is going :)
_________________
Gentoo 2007.0 on a Dell Inspiron e1505/6400 notebook
Intel core 2 duo 2.0 GHz with 2 GB ram
Ati Mobility Radeon x1400
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Tue Apr 22, 2008 5:30 pm    Post subject: Reply with quote

Nordog wrote:
The ubuntu box is faster the first time around but after that they are pretty much as fast.

How long has the machine been up before running the test? Have both machines been up the same amount of time? If a machine has been up long enough for cron stuff to have run and cached stuff?
Nordog wrote:
However, I notice that the Gentoo box needs some time to paint all of the contents but with the Ubuntu box everything appears simultaneously.

What kind of graphics card? Have you compared the /etc/X11/xorg.conf between the 2?

I think the biggest problem with this comparison will be in getting apples (or oranges) on both sides.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
lightvhawk0
Guru
Guru


Joined: 07 Nov 2003
Posts: 388

PostPosted: Thu Apr 24, 2008 8:22 pm    Post subject: Reply with quote

BradN wrote:
There's also prelinking which can speed up program startup, especially for things with tons of libraries like KDE apps, etc.

About the comment about a fresh install vs fragmented filesystem... I notice this on gentoo systems I install - after a fresh format and copy, things start a bit faster. It's not as bad as windows with regards to the eventual slow-down, but it is there.


With my experiences with prelinking it slows down programs quite a bit on older hardware.

Also with my raid0 setup I've noticed a clear slow down, but with deadline it seems pretty speedy to me.
_________________
If God has made us in his image, we have returned him the favor. - Voltaire
Back to top
View user's profile Send private message
Evincar
Apprentice
Apprentice


Joined: 13 Feb 2007
Posts: 217
Location: Madrid

PostPosted: Fri Apr 25, 2008 11:02 am    Post subject: Reply with quote

Nordog wrote:
Quote:
Do you get the same effect when starting the program the second time? (It should be in cache by then). Or only when you start it the first time?


The ubuntu box is faster the first time around but after that they are pretty much as fast. However, I notice that the Gentoo box needs some time to paint all of the contents but with the Ubuntu box everything appears simultaneously.

Quote:
One thing that has been going awry with recent kernels is CONFIG_FAIR_GROUP_SCHED. It sounds like you'd want to have it set, but experience seems to be showing that for a desktop/laptop (non-server) machine you clearly want it off.

I would also check the "swappiness" setting in /etc/sysctl.conf as a frequent "desktop tweak." The default, and good server value is 100, but many desktop/laptop tweaks set it to 10, or even 0. (I've got it at 25, myself, no logic, just conservatism and not wanting to deviate too far from default.)


The box has 4 gb of ram and rarely swaps unless I'm punishing it with some Finite Element calculations. Do you think this would still help?

Just to clarify, I'm actually happy with my Gentoo box, I was just interested in knowing whether my perception of the Ubuntu box being snappier had something to do with the fact that it has the CFS. But I'm still enjoying where this thread is going :)


All that sounds to me like:

A) The Ubuntu box file system works better, I have heard that ResierFS only performs good in tons of small files, like maybe the portage tree.

B) The Ubuntu box has a much better GPU/driver pairing. When I say "better" I don't mean "more modern", "more expensive" or "fancier", just one that works better. A Intel IGP is a much weaker card than a 1900XT, but it performs orders of magnitude better in a classic Linux desktop...
_________________
<@Chin^> My sister caught me jacking off the other week and calls me a pervert
<@Chin^> just the other day i walked into my room and caught my sister masturbating
<@Chin^> So she calls me a pervert again?!?
<@Chin^> there is no justice in the world...
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Fri Apr 25, 2008 5:46 pm    Post subject: Reply with quote

Ubuntu? Tweaking to be faster? You must be kidding me!

I installed Hardy Heron this morning and in addition to having a serious lack of QA, it's also even slower than old Ubuntu. Maybe it's just my drivers, but I don't think they should get SLOWER with newer releases. My God, it's like using Windows 95.
Back to top
View user's profile Send private message
Nordog
Apprentice
Apprentice


Joined: 08 Jul 2005
Posts: 151
Location: Reykjavík, Iceland

PostPosted: Fri Apr 25, 2008 7:47 pm    Post subject: Reply with quote

Evincar wrote:
Nordog wrote:
Quote:
Do you get the same effect when starting the program the second time? (It should be in cache by then). Or only when you start it the first time?


The ubuntu box is faster the first time around but after that they are pretty much as fast. However, I notice that the Gentoo box needs some time to paint all of the contents but with the Ubuntu box everything appears simultaneously.

Quote:
One thing that has been going awry with recent kernels is CONFIG_FAIR_GROUP_SCHED. It sounds like you'd want to have it set, but experience seems to be showing that for a desktop/laptop (non-server) machine you clearly want it off.

I would also check the "swappiness" setting in /etc/sysctl.conf as a frequent "desktop tweak." The default, and good server value is 100, but many desktop/laptop tweaks set it to 10, or even 0. (I've got it at 25, myself, no logic, just conservatism and not wanting to deviate too far from default.)


The box has 4 gb of ram and rarely swaps unless I'm punishing it with some Finite Element calculations. Do you think this would still help?

Just to clarify, I'm actually happy with my Gentoo box, I was just interested in knowing whether my perception of the Ubuntu box being snappier had something to do with the fact that it has the CFS. But I'm still enjoying where this thread is going :)


All that sounds to me like:

A) The Ubuntu box file system works better, I have heard that ResierFS only performs good in tons of small files, like maybe the portage tree.

B) The Ubuntu box has a much better GPU/driver pairing. When I say "better" I don't mean "more modern", "more expensive" or "fancier", just one that works better. A Intel IGP is a much weaker card than a 1900XT, but it performs orders of magnitude better in a classic Linux desktop...


I must admit, the Ubuntu box has a 8000 series nvidia graphics card but the Gentoo box only has a 7000 series card. That's the only real advantage it has since it is worse in terms of cpu speed and ram speed. However, that's probably what sets it apart from the gentoo machine.

I never really thought that the GPU made that much of a difference in terms of speed when opening and closing windows. I thought that bottlenecks like reading from the harddrive cancelled those effects out.
_________________
Gentoo 2007.0 on a Dell Inspiron e1505/6400 notebook
Intel core 2 duo 2.0 GHz with 2 GB ram
Ati Mobility Radeon x1400
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Sat Apr 26, 2008 7:17 am    Post subject: Reply with quote

Ubuntu does other things beside kernel tweaking. Like linking things with -Wl,-O1 all over the place (--as-needed too, as well as DT_GNU_HASH, not sure)

I guess that has more influence on how fast apps load.
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Tue Apr 29, 2008 1:19 am    Post subject: Reply with quote

back to CFS.

When Ingo Molnar posted the first CFS patches I started to test them (and I mean test. With feedback and additional 'could you try this' patches).

And holy shit, CFs made the desktop a lot 'better'. Games - no real difference. But the desktop? That was a very pleasant improvement. Idle&under load.

But for ubuntu being faster:
I am sure they use prelink
Maybe they use preloading
They patch around a lot.

Prelink is great. Preloading - I don't know.

Hm, oh - and in 2d intel hardware (aka onboard graphics) is reported to be faster than nvidia hardware.
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Tue Apr 29, 2008 11:44 am    Post subject: Reply with quote

energyman76b wrote:
back to CFS.

When Ingo Molnar posted the first CFS patches I started to test them (and I mean test. With feedback and additional 'could you try this' patches).

And holy shit, CFs made the desktop a lot 'better'. Games - no real difference. But the desktop? That was a very pleasant improvement. Idle&under load.


So can you give a more informed perspective on kernel configuration for the scheduler?

I don't know if it's default or not, but many have seen poor responsiveness and been told to turn off "fair group scheduling" to make it better. But finding some responses on the Ubuntu lists, over there they seem to indicate that rather than turn off fair group scheduling, you need to go even farther. Apparently fair group scheduling can be done by user or by cgroup, and the thing we all think of as "bad" is by user. They say we should be turning on cgroups, and then turning on fair group scheduling by cgroups, not by user. At that point, it will act as if fair group scheduling is turned off, but will have some extra infrastructure in place so that a scheduling daemon can be run to move tasks into the correct cgroup, giving greater and more flexible control.

What's your take?
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Tue Apr 29, 2008 5:12 pm    Post subject: Reply with quote

[ ] Group CPU scheduler

as you can see 'off'. Everything with 'group' is off ;)
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Tue Apr 29, 2008 6:26 pm    Post subject: Reply with quote

For now that's what I'm doing.

Here's a better reference on the "scheduling daemon" thing: http://lwn.net/Articles/240474/

Next time I build a new kernel, I may try enabling all of the pieces, and see if it feels degraded. From what I've read, if you fully enable the pieces and then don't start a scheduling daemon, it will act just like all of the group scheduling stuff is turned off. That would be interesting to see, but it will be even more interesting to see when scheduling policy daemons start to show up.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Evincar
Apprentice
Apprentice


Joined: 13 Feb 2007
Posts: 217
Location: Madrid

PostPosted: Wed Apr 30, 2008 10:47 am    Post subject: Reply with quote

Nordog wrote:
I must admit, the Ubuntu box has a 8000 series nvidia graphics card but the Gentoo box only has a 7000 series card. That's the only real advantage it has since it is worse in terms of cpu speed and ram speed. However, that's probably what sets it apart from the gentoo machine.

I never really thought that the GPU made that much of a difference in terms of speed when opening and closing windows. I thought that bottlenecks like reading from the harddrive cancelled those effects out.

Hehe, great, but that was not what I was thinking in terms of a "better" card. Sure, the Ubuntu box will be noticeably faster in games, but for desktop, it should not matter. I think you may have a driver issue. Not too long ago NVidia updated their drivers to properly accelerate the render operations, and the difference was something ludicrous, like a 20x factor. Can you check driver version?
_________________
<@Chin^> My sister caught me jacking off the other week and calls me a pervert
<@Chin^> just the other day i walked into my room and caught my sister masturbating
<@Chin^> So she calls me a pervert again?!?
<@Chin^> there is no justice in the world...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum