基本知识:block/sleep/hang/宕机/hook/stub/offload/overhead/watermark

基本知识:block/sleep/hang/宕机/hook/stub/offload/overhead/watermark

文章目录

简介blockdown、宕机hanghookoffloadoverheadlibc manualperf

sleepstubwatermarktradeoff

简介

很多英文词,有时候理解起来比较费劲。 其实是不能身临其境,看看到底为什么当初选用这个单词在这个技术点上,在计算机里?

block

block其实和sleep意思差不多的理解方法。不过相对的角度不同。

down、宕机

比如宕机的宕,其实它是个音译词,down。如果按照中文宕的意思来理解就肯定出问题。那为什么一开始时,选择音译的是这个字,而不是其他的dang呢?因为其他的dang都是平常用的常用字,而只有这个宕,大家很少用到,所以用在了此处。

down机,就是机器down掉了。down的英文意思就是下降,下去,就是失去了服务能力。比较好理解的比喻是,水缸里的谁,一天天的down下去,需要重新load。如果哪一天说水缸坏掉了,完全down掉了,水位消失。

hang

Allocations of pages below the min watermark run a risk of the machine hanging due to a lack of memory. 当页内存余量低于最小水位线时,继续分配页,会增加风险:因为缺少内存而发生宕机。

hook

钩子;如果想要安装钓鱼人的理解思路来理解,那么最好理解成钓鱼爱好者,就是将鱼钓上来,然后再放了。按照钓鱼人的理解;如果某个事物实现了钩子的功能,那起码和弯弯的利器有点关系。而且钓鱼其实钩子的作用点是鱼的嘴巴,也可以说鱼的嘴巴是狗子点。 计算机里的钩子也是差不多的概念,就是可以在特定的钩子点,做一些事情,然后让系统继续进行。就好像将鱼钓起来,按个定位器,然后再放掉。

hook 实例 Documentation/ABI/obsolete/sysfs-selinux-disable Unfortunately, allowing for SELinux to be disabled at runtime makes it difficult to secure the kernel’s LSM hooks using the “__ro_after_init” feature.

offload

脱负,减负;这里有一个参照物的概念在里面,就是对谁减负,脱负;反过来既然对A做了减负,那么根据反作用的理论,肯定会为另一方有onload的效果。比如: https://www.intel.com/content/www/us/en/developer/articles/technical/testing-tcp-segmentation-offload-tso-with-intel-ethernet-controller-710-series-network.html

TCP Segmentation Offload is often also referred to as Large Send Offload (LSO). Segmentation refers to the splitting up of large chunks of data into smaller segments. Offload refers to the practice of moving this workload off the CPU and onto the network card. Offloading this work saves CPU cycles and generally improves packet processing performance.

这里说的TCP分片脱负,是对CPU的减负;同时将负担分给了网卡。当然前提是网卡支持并可以负担的起这个增加的负担。这样节省了CPU的负担,而且提高了网络的处理能力。 类似的单词是 relief,缓减, 减轻, 浮雕(绘画中)。有点文档里也会使用这个次来表示减轻负担。

overhead

需要的额外付出。

libc manual

In order to aid in debugging and monitoring internal behavior, the GNU C Library exposes nearly-zero-overhead SystemTap probes marked with the libc provider.

perf

https://www.man7.org/linux/man-pages/man1/perf-report.1.html overhead: Overhead percentage of sample///这里是总开销的意思,不是额外的意思 overhead *['әuvәhed] n. 经常开支, 普通用费, 天花板 a. 在头上的, 高架的 ad. 在头顶上, 在空中, 在高处, 从头到脚全部没入地 【计】 总开销; 额外开销 【化】 塔顶馏出物; 高出地面的; 架设的; 架空的 【经】 间接费用, 制造费用

sleep

休眠,休息睡眠; 其实按照人的睡眠的意思来理解,还是可以的;人的睡眠其实是因为困乏而导致的身体物理上的休息。 但是计算机里的睡眠,都是被迫的,因为到等待输入,没什么事情干,不能空耗CPU,被强制进入的一种状态。减少资源消耗,这一层又和动物的休眠暗合,也是要减少身体能量消耗,让身体进行清理工作。

stub

在gPRC里的stub是一个抽象的概念,对于实际的application用户是一个接口。这里为什么用stub来比喻呢?赶紧像是在某个东西上打了桩,然后和这个东西的交互/交流,就靠这个桩来实现。称为bridge不更合适? https://protobuf.dev/reference/cpp/cpp-generated/ The stub in gRPC is a key component that abstracts the complexities of remote communication, making it easier for developers to interact with gRPC services. It acts as a bridge between the client application and the server, enabling seamless remote procedure calls.

watermark

水位线,水在鱼缸,河道留下的痕迹。代表水位高低。其实应该按照水位来理解这个词。在计算机里,很多虚的概念,都是用水位做比喻来表示当前内存量,队列容量,等等的容量情况。

/mm/page_alloc.c /* * page is set pfmemalloc when ALLOC_NO_WATERMARKS was necessary to * allocate the page. The expectation is that the caller is taking * steps that will free more memory. The caller should avoid the page * being used for !PFMEMALLOC purposes. */

tradeoff

This helps the common fast path at the cost of making the slow path slower and hitting kswapd with a performance cost. It’s a reasonable tradeoff. 交换,权衡。

相关推荐

龙之谷师徒系统调整更新后师徒拜师收徒的等级有什么变化?
365bet在线体育投注网

龙之谷师徒系统调整更新后师徒拜师收徒的等级有什么变化?

📅 07-07 👁️ 9402
三个女念什么 三个女的姦字是什么意思
365bet网址搜索器

三个女念什么 三个女的姦字是什么意思

📅 06-28 👁️ 1984
dnf哪个称号加负重
365体育app

dnf哪个称号加负重

📅 07-02 👁️ 4505
酯水解制备羧酸
365bet在线体育投注网

酯水解制备羧酸

📅 07-20 👁️ 1264
十类常见游戏周边有哪些 什么游戏周边受欢迎
365bet在线体育投注网

十类常见游戏周边有哪些 什么游戏周边受欢迎

📅 07-16 👁️ 6908
《yy》子频道进入方法
365体育app

《yy》子频道进入方法

📅 07-01 👁️ 2394