# Looking for a low latency kernel

## ens_leader

Hey guys,

 Im looking for a low latency linux kernel. I used to use Con Kolivas kernel but I'm looking for something that up to date and maintained... I specifically ask this because theres been input lag on my FPS games (specifically with the mouse). I never used to get this with the Kolivas kernel... Any recommendations on some good low latency kernels?

----------

## SiberianSniper

Do you have a legitimate need for an updated kernel?  If not, I'd recommend just sticking with ck.  I haven't found anything more responsive than his staircase deadline scheduler, so I'm still using 2.6.21-ck2-r1......

----------

## boris64

Did you check the "official" rt-patchset?

-> Wiki: http://rt.wiki.kernel.org/index.php/Main_Page

--> Up2date patches: http://www.kernel.org/pub/linux/kernel/projects/rt/

But normally it should be enough to enable/check those kernel options

```
...

Processor type and features  --->

  Preemption Model (Preemptible Kernel (Low-Latency Desktop))

  ...

  Timer frequency (1000 HZ)

```

----------

## MageSlayer

Well, I tested ck and cfs back to 2.6.22 using Con Colivas Interbench tool (http://members.optusnet.com.au/ckolivas/interbench/) and I saw no improvements for cfs.

Can somebody test cfs using the lastest kernel, rt kernel, maybe zen-kernel with its patches and post? Unfornutely I cannot do it myself.

Thanks.

----------

## depontius

Something simpler...  Have you turned off group scheduling?

```
# CONFIG_CGROUPS is not set

# CONFIG_GROUP_SCHED is not set
```

The fair group scheduling promises to be really nifty in the future, but it requires some userspace pieces that just aren't there, yet.  For now it seems to cause lags and slowdowns for those who try it.  Check if you've got it enabled, and try turning it off, and see if that helps your smoothness.

----------

## SiberianSniper

Hmm.... I don't quite grasp the concept of why you would want to run an RTOS on a desktop... maybe I'm just missing something?  And as for benchmarks, it's hard to get reliable answers out of many of them when trying to simulate responsiveness... just my opinion.  ck just feels more responsive, call me a ricer if you want   :Cool: 

----------

## agent_jdh

 *SiberianSniper wrote:*   

> Hmm.... I don't quite grasp the concept of why you would want to run an RTOS on a desktop... maybe I'm just missing something?  And as for benchmarks, it's hard to get reliable answers out of many of them when trying to simulate responsiveness... just my opinion.  ck just feels more responsive, call me a ricer if you want  

 

There's nothing 'ricer' about using one of Con's kernels.  Just a shame that no-one picked it up for newer kernels and pushed his devel on.  I think Con just got fed up.  I don't blame him.

----------

## SiberianSniper

Same here, I mean, if you've got the best patchset as far as making Linux a good desktop OS and Linus shoots you down multiple times, then adds in CFS which is a cheap knockoff, you should be pissed off.  Especially since the desktop is the only place Linux shines over most other UNIX flavors and clones...

----------

## jcat

Errm, correct me if I'm missing something  :Smile: 

..but isn't the current Linux kernel low latency if you enable the correct options, then control the low latency usage/limits via PAM?

I know the method has changed since low latency first came in, but I was under the impressions that the low latency patches were no longer required.   It's all in the set-up.

Cheers,

jcat

----------

## ens_leader

 *jcat wrote:*   

> Errm, correct me if I'm missing something 
> 
> ..but isn't the current Linux kernel low latency if you enable the correct options, then control the low latency usage/limits via PAM?
> 
> I know the method has changed since low latency first came in, but I was under the impressions that the low latency patches were no longer required.   It's all in the set-up.
> ...

 

Well ive done this:

```
Processor type and features  --->

  Preemption Model (Preemptible Kernel (Low-Latency Desktop))

  ...

  Timer frequency (1000 HZ) 
```

What else do you have to do to get it any lower? I still get some input lag (mouse) in FPSes when im using a non-CK kernel. Otherwise, the CK kernel works fine.... I just don't like the fact that the ck kernel isn't up to date as far as security vulernabilities go.

----------

## jcat

Well, here is a guide to setting up RT Limits.

http://www.gentoo.org/proj/en/desktop/sound/realtime.xml

But, you really saying you require a real-time set-up to get a responsive mouse?!

Cheers,

jcat

----------

## depontius

Have you tried latencytop?

It requires a fairly recent, correctly configured kernel.

----------

## MageSlayer

depontius

 *Quote:*   

> Have you tried latencytop? 
> 
> It requires a fairly recent, correctly configured kernel.

 

Quite interesting project!

Hm, it says it requires kernel patches. But it still exists in portage tree.

So, it works out of the box, or not?   :Question: 

Thanks

----------

## depontius

I'm under the impression that the required patches went mainline recently.  Come to think of it, on the 2.6.25-gentoo kernels I seem to remember seeing the latencytop statistics stuff under "kernel hacking".

I need to try this out, one of these days.

CONFIG_HAVE_LATENCYTOP_SUPPORT=y

# CONFIG_LATENCYTOP is not set

I guess I'm almost ready...

----------

## Yamakuzure

 *depontius wrote:*   

> Something simpler...  Have you turned off group scheduling?
> 
> ```
> # CONFIG_CGROUPS is not set
> 
> ...

 I guess this is it, because I had great problems with latency and responsiveness and since I turned off both options everything is back to normal. 

@ens_leader:

Have you tried it?

----------

