# vanilla-sources vs. ck-sources

## jtp755

What are the main differences and what are the advantages/disadvantages of both? Any input welcome....

I have emerged vanilla-sources to get my install done but im looking at ck-sources as a possible switch.

Are there any programs that have problems with either?

Anything about the two...

----------

## jteb

ck-sources are tuned for desktop performance. they provide low-latency in several ways (see kernel.kolivas.org for details). to your second question i'd answer no. i've been using ck for the last couple of years and never had any problems.

----------

## jtp755

thanks for the reply....ill check out that link

----------

## jteb

np m8 ;)

----------

## fuoco

does anyone really notice ck-sources being more responsive and performant than gentoo-sources (or vanilla) ?

I can't decide if it's a little-little faster, or maybe actually slower...

----------

## Zarhan

 *fuoco wrote:*   

> does anyone really notice ck-sources being more responsive and performant than gentoo-sources (or vanilla) ?
> 
> I can't decide if it's a little-little faster, or maybe actually slower...

 

  I don't know if the effect is noticeable on faster computers, but on my older ones with less memory, I noticed that when the system started paging there were very few apparents effects to the user (stuttering mouse cursor etc) when I switched to ck-sources. On vanilla-sources the paging always made the UI pretty painful to use. Now it just appears a bit slower and the HDD keeps making noise  :Smile: 

----------

## i92guboj

 *jtp755 wrote:*   

> What are the main differences and what are the advantages/disadvantages of both? Any input welcome....
> 
> I have emerged vanilla-sources to get my install done but im looking at ck-sources as a possible switch.
> 
> Are there any programs that have problems with either?
> ...

 

To see the differences you can look to the component of the patchset in the Con Kolivas page. CK-sources are one of the most stable experimental patchsets outside the official vanilla kernel branch. But don't forget that it is just a experimental patchset, this means that, being those patches developed by others (not by Kolivas) he can't control a possible bug in one of the patches in every release. Still, here applies the universal principle: try it and see what happens.

 *Zarhan wrote:*   

>  *fuoco wrote:*   does anyone really notice ck-sources being more responsive and performant than gentoo-sources (or vanilla) ?
> 
> I can't decide if it's a little-little faster, or maybe actually slower... 
> 
>   I don't know if the effect is noticeable on faster computers, but on my older ones with less memory, I noticed that when the system started paging there were very few apparents effects to the user (stuttering mouse cursor etc) when I switched to ck-sources. On vanilla-sources the paging always made the UI pretty painful to use. Now it just appears a bit slower and the HDD keeps making noise 

 

Well, that depends greatly in two things: first, the configuretion settings that you are using. In the ck page you con find a FAQ that covers most common issues. Second:  the responsivity and the paging are not only dependent on what kernel do you use. The vanilla kernel also includes the cfq scheduler that is not used by default, but can improve interactivity in a great manner. The paging can be diminished to zero (if you have enough memory) by configurind the swappiness via sysctl, so that is not a valid objetion.   :Wink: 

----------

## Zarhan

Urgh, I guess I should have made myself more clear

With ck-sources => no issues at all, very responsive system in all cases

With vanilla(or gentoo)-sources => stuttering mouse and other unresponsivenesses when paging.

----------

## fuoco

But I thought -ck pages much more since it has got swap prefetch thing... ?

----------

## i92guboj

As I said above, there is no golden rule about this. Just try both and go with the one that you think is better for you. Not all hardware and all systems (nor all persons) works the same with a given kernel. There is no universal truth.

I just wanted to point that the way you configure your system and the degree of knowledge about how the kernel can be configured and works can be so important in things like interactivity and swapping. Some times, even more than using this or that other kernel.

----------

## Zarhan

 *fuoco wrote:*   

> But I thought -ck pages much more since it has got swap prefetch thing... ?

 

  Swap prefetch is active only when the computer is idle.

----------

## fuoco

What's the best I/O scheduler to use ? What happens if I have all three enabled in kernel ?

----------

## i92guboj

 *Zarhan wrote:*   

>  *fuoco wrote:*   But I thought -ck pages much more since it has got swap prefetch thing... ? 
> 
>   Swap prefetch is active only when the computer is idle.

 

Good point, I bypassed that, from the ck FAQ:

```

This patch stores a list of ram that is put to swap and if the memory subsystem is idle for a time it starts swapping the ram pages back in gently in the reverse order they went out. The idea is that when you come back to your pc after it has been idle for a while, if any applications have been swapped out they should have swapped back in quietly. It does not delete the page entries from the swap so that if there is any stress, these pages can effectively be swapped back out for free without further disk access.

```

So, it has nothing to do with the responsiveness of your desktop. That is mainly a issue that has to do with the tasks scheduler. CK uses by default cfq (not a ck fan, so correct me if im wrong), so it should be not different in that matter to a vanilla kernel configured to use cfq, wich can be done by adding elevator=cfq to the kernel parameters list into the grub or lilo configuration file.

 *fuoco wrote:*   

> What's the best I/O scheduler to use ? What happens if I have all three enabled in kernel ?

 

There is no "better" scheduler. It depends on what do you want. If you want interactivity over performance (tipical desktop system) then you may want to use the cfq scheduler and a preemptive kernel. If you want pure performance then the default scheduler will do better, and preemption is not needed. You can compile all the scheduler into the kernel, but only one is used at a time. See above how to use the cfq one.

----------

## Zarhan

 *6thpink wrote:*   

> 
> 
> So, it has nothing to do with the responsiveness of your desktop. That is mainly a issue that has to do with the tasks scheduler. CK uses by default cfq (not a ck fan, so correct me if im wrong).

 

  Actually, the biggest point of the entire ck-sources is that is provides you with a new "staircase" scheduler. That's the major difference between ck and the vanilla kernel (So yes, you are a bit wrong  :Smile: ). See http://lwn.net/Articles/87729/ for more information. It provides the major boosts in responsiveness.

  EDIT: Oh, and do note that TASK scheduler is a different thing from I/O scheduler.

  Task scheduler in vanilla kernel is O(1) scheduler, but numerous I/O schedulers are available, selectable via ionice command on a per-process basis (and a system default via sysctl, I think). 

  CK changes the O(1) to staircase.Last edited by Zarhan on Sat Nov 19, 2005 9:18 pm; edited 1 time in total

----------

## i92guboj

Unless that is the default scheduler, there is nothing wrong in my post.  :Smile: 

----------

## Zarhan

 *6thpink wrote:*   

> Unless that is the default scheduler, there is nothing wrong in my post. 

 Oh well, you got a reply in before I finished editing. See the point about TASK vs. IO in my edited post (and IO default is indeed cfq).

----------

## i92guboj

Thanks for the clarifications and that link  :Wink:  Always there is something new to learn.

I'm not discarding ck-sources at all, for now I just stick to vanilla sources but I never refuse to try new things. It is just that the time that I tried ck-sources is wasn't so stable on my system. But that was a while ago, so things might have changed. Some day I will give it another go but I will take no hurry, since my desktop is fully responsive (I use fvwm though, so i/o and memory usage is not a very big issue here  :Smile: 

----------

## fuoco

My system tends to do a lot of disk IO every few moments (not sure exactly how often, but every few minutes I would say - maybe less even). When that happens the whole system because very unresponsive.

What could cause that problem ?

----------

## i92guboj

There are a few thing that you should look. First of all make sure that the dma is on (hdparm -cdi /dev/hd<X>).

Tip: open top in one of your vt's, and when the thing occurs, go to top to see what is taking up all the cpu.

Another thing to look at could be cron jobs, and another one the filesystem that you are using. Some are harder on cpu than others.

----------

