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

2019-09-09 15:12:29 +08:00
 sadfQED2

今天想更新一下 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

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

7699 次点击
所在节点    Linux
6 条回复
lvsemi1
2019-09-09 16:06:18 +08:00
是 linux 桌面系统操作的延迟
reus
2019-09-09 16:51:53 +08:00
世上没有免费的午餐,想要低延迟,就要牺牲吞吐,要看场景选用
reus
2019-09-09 16:56:38 +08:00
延迟指的是多任务调度的延迟,延迟低指的是切换频繁,是频繁,不是快,所以在需要实时性的系统里,就可以更快响应。但调度本身有开销,调度频繁,开销就大,所以系统总体的吞吐就会降低。
如果对实时性没有要求,那就没必要付这些调度开销。能不能提高性能,要看你以什么作为性能指标,是低延迟,还是高吞吐。
sadfQED2
2019-09-09 17:27:37 +08:00
@reus 懂了,感谢
alfredsun
2019-09-09 20:05:32 +08:00
所以是:
generic < preempt < lowlatency <rt ?
那最后一个 realtime 和 generic 怎么排?
neoblackcap
2019-09-09 20:12:18 +08:00
@alfredsun realtime 的延迟应该是跟 rt 差不多的。一个是稳定版一个是最新版的区别吧。新的 rt 可能采取更加激进的调度算法,所以可能有设备不支持

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/599320

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX