Linux运维
文章平均质量分 94
Linux运维基础知识
扶我起来我还要写代码
经世致用
展开
-
overcommit_memory
目录overcommit_memory Overcommit Accounting CommitLimit and Committed_AS overcommit_kbytes orovercommit_ratioovercommit_memory:Documentation for /proc/sys/vm/ — The Linux Kernel documentationovercommit_memory这个vm参数用于控制malloc、mmap这些用于在进程虚拟地址空间申请虚拟..原创 2021-09-27 12:54:16 · 765 阅读 · 0 评论 -
初探lowmem_reserve_ratio
原文链接:https://www.aikaiyuan.com/9441.html1.摘要最近小伙伴们在排查一个线上关于linux内存oom的问题,前些天来问我某篇文章里的一句话是什么含义,问题比较难用几句话说明,在这里梳理一下。2.背景最近小伙伴们在排查一个线上关于内存oom的问题,前些天来问我某篇文章里的一句话是什么含义:每次申请的block大小比较有讲究,Linux内核分为LowMemroy和HighMemroy,LowMemory为内存紧张资源,LowMemroy有个..转载 2021-01-16 18:12:21 · 1805 阅读 · 0 评论 -
【随笔】设置min_free_kbytes会影响系统的可用内存
PerformanceWhat is vm.min_free_kbytes and how to tune it?byLinux Wolfman原文地址:https://linuxhint.com/vm_min_free_kbytes_sysctl/这篇文章对min_free_kbytes的测试很有意思,通过这篇文章我才发现设置这个参数不仅仅是影响Linux内存回收中的water_mark,尤其是direct reclaim回收方式,还会影响系统的可用内存available memory。.原创 2021-01-13 17:49:36 · 4659 阅读 · 0 评论 -
【随笔】地址空间布局随机化randomize_va_space
内核文档:Documentation for /proc/sys/kernel/ — The Linux Kernel documentation https://www.kernel.org/doc/Documentation/sysctl/kernel.txt 3.15.1Address Space Layout Randomization (oracle.com)randomize_va_spaceThis option can be used to select the typ..原创 2020-12-04 23:28:44 · 2101 阅读 · 0 评论 -
【CPU篇 04】几个中断流程
中断中涉及的主要流程一个简要的中断流程目录归纳,万一以后遗忘方便回顾(流程的部分详细内容在《CPU篇中断02、03》中有总结)。异常流程:fault、trap、abort和int 缺页异常 一个主要 多个次要 多个错误 NMI 系统调用 int 0x80 sysenter syscall 中断流程 IO中断 网卡中断 磁盘中断 时钟中断 全局时钟中断 局部时钟中断 timer_interrupt(ISR原创 2020-10-04 12:16:27 · 376 阅读 · 0 评论 -
【随笔】Linux drop_caches
内核文档:https://www.kernel.org/doc/Documentation/sysctl/vm.txtdrop_caches==============================================================drop_cachesWriting to this will cause the kernel to drop clean caches, as well asreclaimable slab objects like de原创 2020-09-13 13:00:50 · 1078 阅读 · 0 评论 -
【随笔】Linux oom_killer
前情摘要:https://blog.csdn.net/reliveit/article/details/106291631内核文档:https://www.kernel.org/doc/Documentation/sysctl/vm.txt当Linux发生out of memory的时候,会根据panic_on_oom的配置,启用或禁用panic机制。panic_on_oomThis enables or disables panic on out-of-memory feature.原创 2020-09-06 16:34:22 · 932 阅读 · 1 评论 -
【CPU篇 01】上下文切换context switch
文章结构概念 指令 症状 资料目录上下文切换 Linux context_switch注释 context_switch的两种子状态:CSWCH和NVCSWCH 基础知识 指令 症状 context_switch细分情况 进程 线程 中断 系统调用 资料 一、上下文切换context switch:主要是切换mm(switch_mm函数)和cpu register state(switch_to函数,包括寄存器和堆栈)。.原创 2020-07-15 17:51:09 · 2609 阅读 · 0 评论 -
【CPU篇 02(中断前导资料)】Linux中断Interrupts
目录中断概念以及分类 同步中断:exception faults、traps和abort int编程中断 异步中断:interrupt IO中断 时钟中断 IPI 中断的硬件概念 PIC:programmable interrupt controller 单核处理中,常见为8259A芯片,一般是两片串联 APIC:advanced programmable interrupt controller 多核处理中,一般是两级级联 分原创 2020-07-15 17:25:43 · 1900 阅读 · 0 评论 -
【CPU篇 00】系统负载load average
一、什么是系统负载系统负载又叫平均负载(loadaverage),man /proc/loadavg和man update都能看到系统负载的含义。cat /proc/loadavg0.18 0.26 0.25 2/251 20320man /proc/loadavgThe first three fields in this file are load average figures giving the number of jobs in the run queue (state.原创 2020-06-16 18:40:07 · 565 阅读 · 0 评论