V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
sadfQED2
V2EX  ›  Linux

有人能解释一下 Linux 几种内核的区别吗?

  •  
  •   sadfQED2 · 2019-09-09 15:12:29 +08:00 · 7652 次点击
    这是一个创建于 1688 天前的主题,其中的信息可能已经有所发展或是发生改变。

    今天想更新一下 linux 内核,无意间发现有-generic、-lowlatency -azure -gcp 等好几种,google 搜了下,看到 ubuntu 社区有个 tips:

    If you do not require low latency for your system then please use the -generic kernel.
    If you need a low latency system (e.g. for recording audio) then please use the -preempt kernel as a fist choice. This reduces latency but doesn’t sacrifice power saving features. It is available only for 64 bit systems (also called amd64).
    If the -preempt kernel does not provide enough low latency for your needs (or you have an 32 bit system) then you should try the -lowlatency kernel.
    If the -lowlatency kernel isn’t enough then you should try the -rt kernel
    If the -rt kernel isn’t enough stable for you then you should try the -realtime kernel
    

    他这说的延迟是什么延迟啊?换低延迟内核能提升系统性能吗?

    6 条回复    2019-09-09 20:12:18 +08:00
    lvsemi1
        1
    lvsemi1  
       2019-09-09 16:06:18 +08:00
    是 linux 桌面系统操作的延迟
    reus
        2
    reus  
       2019-09-09 16:51:53 +08:00
    世上没有免费的午餐,想要低延迟,就要牺牲吞吐,要看场景选用
    reus
        3
    reus  
       2019-09-09 16:56:38 +08:00
    延迟指的是多任务调度的延迟,延迟低指的是切换频繁,是频繁,不是快,所以在需要实时性的系统里,就可以更快响应。但调度本身有开销,调度频繁,开销就大,所以系统总体的吞吐就会降低。
    如果对实时性没有要求,那就没必要付这些调度开销。能不能提高性能,要看你以什么作为性能指标,是低延迟,还是高吞吐。
    sadfQED2
        4
    sadfQED2  
    OP
       2019-09-09 17:27:37 +08:00 via Android
    @reus 懂了,感谢
    alfredsun
        5
    alfredsun  
       2019-09-09 20:05:32 +08:00
    所以是:
    generic < preempt < lowlatency <rt ?
    那最后一个 realtime 和 generic 怎么排?
    neoblackcap
        6
    neoblackcap  
       2019-09-09 20:12:18 +08:00
    @alfredsun realtime 的延迟应该是跟 rt 差不多的。一个是稳定版一个是最新版的区别吧。新的 rt 可能采取更加激进的调度算法,所以可能有设备不支持
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1147 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 22:51 · PVG 06:51 · LAX 15:51 · JFK 18:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.