# [SOLVED]Desktop perfomance is less responsible-kernel 2.6.24

## radfoj

Hello,

after I upgraded to new kernel series - 2.6.24 (both gentoo-sources and zen-sources), I realized, that my desktop responses are worst then it was with previous versions of kernel. Especially, when system was under load, like emerging in the background (with niceness-19). Web browsing, switching between opened programs or windows  take much more time then before, watching movies wasnt so fluent like before. Today I tried boot into 2.6.23 again, and I am compiling in the background and I dont realize any slowdown.

So my first question - is there some big change in background of the kernel. like new cpu scheduler, another aproach to I/O disk operation or so?  What should I check or should do to get performance back with the 2.6.24 kernel?  ThanksLast edited by radfoj on Thu Feb 07, 2008 6:35 pm; edited 1 time in total

----------

## nutbar21

Just curious, did you rebuild your graphics drivers (if needed) after you installed the new kernel?  It seems like your slowdowns are mostly graphical, so that could have something to do with it.

----------

## radfoj

Thanks for reply, nutbar21.

Without rebuilding nvidia-drivers against new kernel, booting with new kernel will lead only to console, not X. These basic principles I know.

----------

## paulbiz

I noticed the same thing, there is definitely less responsiveness in 2.6.24 when CPU activity is heavy, even with niceness of 19  :Smile: 

At first I thought it was NO_HZ (here for the first time in amd64), so I disabled it and rebooted... but it's the same. Back on 2.6.23 and everything is smooth again  :Razz: 

----------

## dh3rm3

Same thing here with ... 

```
Linux 2.6.24-gentoo #2 PREEMPT Tue Feb 5 10:40:42 CET 2008 x86_64 AMD Athlon(tm) 64 Processor 3400+
```

System is slow as hell when emerging in the background for instance. 

Any hint of what has changed in the 2.6.24 ?

----------

## i92guboj

I am not much into kernel toys, so, someone correct me if I am wrong.

.24 brought us the CFS task (not i/o) scheduler by default. This means a new algorithm to share cpu slices between processes. The so called "completely fair scheduler" seems not to be "that fair" on some cases. For me, the problem is the same. 

Sometimes the desktop hangs for a few seconds, for example, when I am moving a window, or opening a menu. Since these operations usually grab the server, I can't click or interact with anything during the few seconds this thing lasts. But the cpu is completely free (it is not a load problem) and I can see how my conky clock updates without any lag at all, htop is working as ever in my second monitor (twinview, not a separate x server) and everything continues working. 

Besides that, the system usually works ok. Though *some* times, emerge -auDvN world can take up to 15 minutes or even more (usually it would take a few seconds on my machine). The cpu is completely idle, but for some reason, emerge refuses to take more cpu time... Go figure. This is completely random, and I can't reproduce it. As I said, cpu load is never an issue.

All this stuff is only with .24, so I assume that CFS is the culprit, though I have no base at all, and I don't have the time to track down kernel bugs. I am just using .23 until this is solved. As I said, it is a .24 issue. .23 works ok, filesystems are stable stuff (ext2/3) and there's no experimental code on my kernel, which is a vanilla linux kernel. 

This rarely happens, and the rest of the time, the system works smoothly as ever.

----------

## Paapaa

 *i92guboj wrote:*   

> .24 brought us the CFS task (not i/o) scheduler by default.

 

Nope, CFS was introduced in 2.6.23:

http://kernelnewbies.org/Linux_2_6_23

----------

## Rcomian

Yeah, I've got the same feeling here:

Linux dragon 2.6.24-gentoo #2 PREEMPT Sat Feb 2 13:32:05 GMT 2008 x86_64 AMD Athlon(tm) 64 Processor 3700+ AuthenticAMD GNU/Linux

It actually prompted me to go look at kernel settings and enable all the PREEMPT, tickless kernel, turn off SMP (I've only got a single core anyway), and desktop modes in an effort to improve things, which it appears to have done, but still feels laggy at times.

And yes you're right, nicing processes doesn't appear to have as much effect now either. I too am blaming CFS ...

----------

## Rcomian

Could this be due to Fair Group Scheduling?

This is new in CFS in 2.6.24.

By default it appears to give users equal CPU share first and then processes within that user's space get partitioned within that.

I'm going to try turning it off and see how it goes.

----------

## rlittle

I've noticed that same thing at everyone here, but on the bright side, by machine has crunched BOINC/SETI "units" faster since I upgraded to 2.6.24 (and went NO_HZ at the same time). I can see the change clearly on my work history graph (the slope of the line increases). Doing some crude calculations (and looking at the "user average" stats), it has approximately doubled.   :Shocked: 

(350 units/day to 600 units/day)

Yeah, it's not bullet-proof, but the kernel change IS the most likely explanation as far as I can see.

----------

## unK

 *Rcomian wrote:*   

> Could this be due to Fair Group Scheduling?
> 
> This is new in CFS in 2.6.24.
> 
> By default it appears to give users equal CPU share first and then processes within that user's space get partitioned within that.
> ...

 

Yeah, I disabled it and now my system is as responsive as it was with 2.6.23 kernel. It looks that this Fair Group Sheduler gives resources using user-id and I suppose in that case root has the highest priority, so if we compile something, Sheduler gives all resources to root, which makes users cry. If you have FGS enabled, just run compilation, then Firefox as an user and try to scroll the page. It won't go smooth probably. After this try to run Firefox as root and see that scrolling is smooth (at least for me it was).

Btw above is only my speculation ;)

----------

## radfoj

 *unK wrote:*   

>  *Rcomian wrote:*   Could this be due to Fair Group Scheduling?
> 
> This is new in CFS in 2.6.24.
> 
> By default it appears to give users equal CPU share first and then processes within that user's space get partitioned within that.
> ...

 

Should you share with us more about disabling it? Is it enough just uncheck "Fair group CPU scheduler" in menuconfig and rebuild kernel? 

When disabling it, which scheduler will be used then, and what about command which I am not able to find again for changing cpu scheduler on the fly? Thanks.Last edited by radfoj on Wed Feb 06, 2008 7:43 pm; edited 1 time in total

----------

## Paapaa

 *radfoj wrote:*   

> Should you share with us more about disabling it? Is it enough just uncheck "Fair group CPU scheduler"? When disabling it, which scheduler will be used, and what about command which I am not able to find again for changing cpu scheduler on the fly? Thanks.

 

You can't change CPU scheduler on the fly - and never have. IO schedulers are a different matter. Just disable the group thing and test. CFS is still being used as there are no other CPU schedulers in the kernel.

----------

## unK

 *radfoj wrote:*   

> Is it enough just uncheck "Fair group CPU scheduler" in menuconfig and rebuild kernel? 

 

Yes.

----------

## radfoj

 *unK wrote:*   

>  *radfoj wrote:*   Is it enough just uncheck "Fair group CPU scheduler" in menuconfig and rebuild kernel?  
> 
> Yes.

 

Thanks guys. This really solved my problem.   :Very Happy: 

----------

## paulbiz

Me too. I also compared my emerge times with it on and with it off, and saw no real difference, so I don't think I am losing any performance

----------

## manny15

I have CONFIG_GROUP_SCHED disabled and CONFIG_PREEMPT_VOLUNTARY enabled, but the responsiveness is still bad. emerge --sync and loading Acrobat reader hog the CPU, locking up Xorg. Is there some kind of profiler that can help discover what the problem is?

----------

