Announcement

Collapse
No announcement yet.

A Low-Latency Kernel For Linux Gaming

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • del_diablo
    replied
    Originally posted by 89c51 View Post
    Just for the record the median perception time is at about 100ms. The average reaction time is about 250ms (usually more depending on a number of factors).
    Which is blatantly false. A monitor does not need such a severe input lag as 100ms before it becomes noticable. All you need to do, is that you have a jitter of 1ms --> 10ms --> 1ms --> 10ms, and it should be noticable that the input is quite unsmooth, especially if you are testing a application where the input matters(hardcore quake FPS anybody?).
    Nevermind that once you have gotten the mind into "ready mode", and are into a "flow of actions", the static reaction times is no longer there. Now... the 100ms median is true if you are waiting for twitching. But if you are in a constant twitching movement, in a state where you already have processed all the information, 100ms not your reaction time.

    Leave a comment:


  • drag
    replied
    Originally posted by phred14 View Post
    At the same time, there are very real compromises necessary in order to get this fast latency, and those compromises can hurt throughput.
    Lower latency == Faster response

    This is done by making the system switch contexts much faster and/or by allowing certain processes to interrupt anything else in the system.

    More times you switch contexts and the more times processes get interrupted then the slower the overall performance will be. When the kernel must switch rapidly between processes then cache in the CPU gets invalidated. Main memory is much slower then cpu cache so much so that you can spend a significant number of your cpu cycles just filling up the cache.

    Therefore when everything else is equal a very responsive system is going to be slower then a system that has poor response. Slower as in taking longer to do actual work.

    But this is going to matter most on a busy system.

    Low latency is important for audio work because you are building a system to interact with in real time. That is when you press a button on your midi synth you want to be able to hear it right away. When you are playing with a band you don't want the music you are playing to be all of a sudden off by 200 msecs because some system process decided it was time to flush the file system cache out to disk. This also can result in buffer underruns for realtime music... meaning your system has temporially ran out of information to give to your sound card and that results in skips, scratchy sounds, pops, and other audio artifacts. If you are doing live recording with multiple inputs it can be important to keep them all in sync.

    This is important because you will have a lot going on at your system at the same time. Reading in Midi data over USB, writing out midi data over midi connections, software synths processing realtime, sample loops playing, jackd running, and all sorts of other things in addition to your normal system processes. etc etc.

    A normal kernel cannot guarantee that it can go through all the processes in and do enough work to keep everything flowing at 30msec response rate. It doesn't matter how fast it is, it's just not setup to allow that because it's designed for best efficiency. Now with a realtime kernel you can still fall short, but that should technically be because your system just isn't fast enough.. not that the kernel failed to keep everything running properly for a quarter of a second.

    Now with video games you have a single process going flat-out. You are going to let that process be dominate and not much else is going to be going on. You can pretty much get the same effect as running a realtime kernel as just raising the process priority of X and your video game above anything else and not get the hit that you'd get from using a rt kernel.

    Leave a comment:


  • 89c51
    replied
    Originally posted by phred14 View Post
    I think in terms of one or two milliseconds or less for latency, performance levels necessary for those applications, but at or beyond the bleeding edge of human reflexes.
    Just for the record the median perception time is at about 100ms. The average reaction time is about 250ms (usually more depending on a number of factors).

    Leave a comment:


  • del_diablo
    replied
    Why does this retarded article not measure frame jitter instead? The entire point of a low latency kernel combined with a effective IO manager is that your game application gets consistent troughput with low latency instead of being random.
    Why can't phoronix suit measure framejitter(frame jitter, etc)? Techreport already did it quite well.


    Edit:

    phred14, I have a small guess. Realtime is not a standard in OSes because of legacy. In the old day of computing, a realtime system or a less laggy system as one could put it had one major gripe: It consumed too much computing power, meaning it would be unfavorable.
    Then again, jitter from OS side is usually at <1ms, which is not significant, but if we can get a application which has severe input issues and jitter, we might be able to show just how much a more updating kernel is capable of remedying the problem.
    Last edited by del_diablo; 06-22-2012, 06:00 PM.

    Leave a comment:


  • Vadi
    replied
    Thanks for the info

    Leave a comment:


  • phred14
    replied
    When I hear about low-latency kernels I think of audio and near-realtime industrial control. I think in terms of one or two milliseconds or less for latency, performance levels necessary for those applications, but at or beyond the bleeding edge of human reflexes. At the same time, there are very real compromises necessary in order to get this fast latency, and those compromises can hurt throughput. There's a reason that realtime kernels are not used for general-purpose computing. There's a reason that the low-latency kernel is not the default, and it's not because Ubuntu doesn't think we're 133t enough to use it.

    In other words, unless you know exactly why you need a low-latency kernel, and unless you know what kinds of latencies you need, you don't really need a low-latency kernel. "I'm really fast! I don't want my computer to limit me." just doesn't cut it. (or even make sense in this context)

    Leave a comment:


  • DavidNielsen
    replied
    It may be that what people are talking about in terms of improved gaming "performance" is not the framerate (which unsurprisingly does stay unchanged or degrades a bit with preemption enabled - let alone if one was to install a proper -rt kernel). However you might experience a situation where overall latency decreases which might improve responsiveness to input devices, or the overall "smoothness" of the game might feel more right. Call it trading off excess fps for equal low latency access (who really cares if you are pushing 172 fps if your mouse jerky, when it could all be smooth at say 160 fps).

    Leave a comment:

Working...
X