Operating Systems / Linux
79 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Zero-Copy Mechanismhistorical
[toc] 1. Traditional I/O The normal data processing flow is: 1. Use DMA copy (CPU participation is not required) to copy data from disk to the disk buffer. 2. Use CPU copy to copy data from the disk buffer to user space. 3. Process it in user space.
- CPU Tuninghistorical
1. CPU Performance Metrics 1.1. CPU Utilization The percentage of non idle time out of total CPU time. Depending on the tasks running on the CPU, it is further divided into user CPU, system CPU, I/O wait CPU, soft interrupts, hard interrupts, etc. Us
- tophistorical
1. Usage Press h to view the help menu. View the CPU usage of a process. 2. Output 3. Explanation top 13:57:40 up 1:47, 0 users, 13:57:40: current system time; it can be obtained with date. up 1:47: how long this system has been running continuously;
- Memory Tuninghistorical
1. Memory Performance Metrics 1.1. System Memory Usage 1.1.1. Used Memory Memory that has already been used. 1.1.2. Remaining Memory Memory that has not yet been used. 1.1.3. Shared Memory The amount of memory used by tmpfs; it is also a kind of cach
- vmstathistorical
1. Usage 2. Result 3. Explanation buffer and cache: different from buffer and cache in the traditional sense. Memory Management buffer: file metadata. cache: file data. procs r: number of processes running and waiting for CPU time slices. Generally n
- Disk Tuninghistorical
1. Disk Performance Metrics 1.1. Filesystem I/O Performance Metrics 1.1.1. Storage Space Usage Capacity, used amount, remaining space, etc. 1.1.2. Cache Usage Page cache, directory entry cache, inode cache, and caches for specific filesystems (such a
- Network Tuninghistorical
1. Network Performance Metrics 1.1. Network Layer It is mainly responsible for network packet encapsulation, addressing, routing, sending, and receiving. Performance metric: Number of network packets that can be processed per second, PPS. The kernel'
- iostathistorical
1. Usage By default, the output is not the current I/O state, but the state since the system started. 2. Output 3. Explanation avg cpu %user: CPU time spent in user mode, generally <60%. %nice: CPU time used by user processes whose priority has been
- Linux Performance Tuninghistorical
1. CPU CPU Tuning 2. Memory Memory Tuning 3. Disk Disk Tuning 4. Network Network Tuning
- Flame Graphhistorical
1. perf Command It is a performance analysis tool natively provided by Linux. It returns the function name currently being executed by the CPU and the call stack (stack). 1.1. Usage perf record means record. F 99 means 99 times per second. If all 99