当前位置:网站首页>Reading notes of top performance version 2 (V) -- file system monitoring
Reading notes of top performance version 2 (V) -- file system monitoring
2022-07-01 15:27:00 【jrglinux】
《System Performance: Enterprise and the Cloud, 2nd Edition (2020)》 Reading notes and brief notes
8. file system file systems
8.2 Model
8.2.1 File system caching
A cache hit , Read from main memory ;
Cache miss , Read from disk ;
8.3 Concept
8.3.1 File system latency
File system latency is the primary metric of file system performance, measured as the time from a logical file system request to its completion.It includes time spent in the file system and disk I/O subsystem, and waiting on disk devices—the physical I/O. contain :
- Time spent on the file system itself
- disk I/O Subsystem time
- Disk waiting for physical I/O Time
8.3.2 cache caching
The file system uses main memory (RAM) To do caching , To improve performance , In this way, the application can start from RAM Read and write in , Not physical disks , Less logical I/O latency.
8.3.3 Random and sequential I/O
8.3.4 Prefetch prefetch
A large number of file sequences I/O when , Maybe the amount of data is too large to be put into the cache , In this way, the cache hit rate is low , Affect performance .
Prefetching is to check the current and previous I/O File offset for , It can detect whether the current load is a sequential read load , And make predictions , Issue a read command to the disk before the application requests it , To populate the file system cache .
8.3.5 read-ahead read-ahead
Namely prefetch,Linux System call is added in readadhead(2) Allow the application to display the warm-up file system cache .
8.3.6 Write back cache write-back caching
Write-back caching is commonly used by file systems to improve write performance. It works by treating writes as completed after the transfer to main memory, and writing them to disk sometime later, asynchronously.
8.3.7 Write synchronously
A synchronous write completes only when fully written to persistent storage (e.g., disk devices), which includes writing any file system metadata changes that are necessary. Synchronous write is better than asynchronous write ( Write back cache ) Much slower .
8.3.8 bare I/O And direct I/O(raw and direct)
bare I/O: Bypass the file system , Send directly to disk address . For example, database software .
direct I/O: allow app Bypass the cache and use the file system , It's kind of similar Write synchronously ( But the lack of O_SYNC The guarantee provided by the option ).
8.3.9 Non blocking I/O
open() Pass in O_NONBLOCK perhaps O_NDELY Option uses non blocking I/O.
8.3.10 Memory mapped files memory-mapped files
For some applications and loads , Map the file to the process address space , And directly read the memory address , Can improve the file system I/O performance .
system call mmap() establish ,munmap() The destruction . Mapping can be done with madvise() adjustment .
8.4 framework
8.4.1 I/O Stack
8.4.2 VFS
VFS (the virtual file system interface) provides a common interface for different file system types.
8.4.3 File system caching
buffer cache | Buffer cache | Linux used a buffer cache at the block device interface to cache disk device blocks. The size of the buffer cache is dynamic and is observable from /proc. |
page cache | Page caching | It cached virtual memory pages, including mapped file system pages, improving the performance of file and directory I/O. It was more efficient for file access than the buffer cache, which required translation from file offset to disk offset for each lookup. |
dentry cache | Directory cache | The dentry cache (Dcache) remembers mappings from directory entry (struct dentry) to VFS inode, similar to an earlier Unix directory name lookup cache (DNLC). |
inode cache | inode cache | This cache contains VFS inodes (struct inodes), each describing properties of a file system object, many of which are returned via the stat(2) system call. |
8.4.5 File system type
FFS | fast file system (FFS) |
ext3 | |
ext4 | |
XFS | XFS is supported by most Linux distributions and can be used for the root file system. |
ZFS | combining the file system with the volume manager and including numerous enterprise features, making it an attractive choice for file servers (filers). |
btrfs | The B-tree file system (btrfs) is based on copy-on-write B-trees. This is a modern file system and volume manager combined architecture, similar to ZFS, and is expected to eventually offer a similar feature set. |
8.4.6 Volumes and pools volumes and pools
The file system has always been built on a disk, which is a disk partition , Volumes and pools enable file systems to be built on multiple disks , And you can use different RAID Strategy .
Volume combines multiple disks into a virtual disk , Build a file system on this . Volume management software :Logical volume manager,LVM.
边栏推荐
- Fix the failure of idea global search shortcut (ctrl+shift+f)
- Survey of intrusion detection systems:techniques, datasets and challenges
- 将ABAP On-Premises系统连接到中央检查系统以进行自定义代码迁移
- Wechat applet 02 - Implementation of rotation map and picture click jump
- S32K1xx 微控制器的硬件设计指南
- S32K1xx 微控制器的硬件設計指南
- 【LeetCode】16、最接近的三数之和
- Tableapi & SQL and MySQL grouping statistics of Flink
- Tableapi & SQL and MySQL data query of Flink
- What are the EN ISO 20957 certification standards for common fitness equipment
猜你喜欢
如何实现时钟信号分频?
Zhang Chi Consulting: household appliance enterprises use Six Sigma projects to reduce customers' unreasonable return cases
入侵检测模型(An Intrusion-Detection Model)
Introduction to MySQL audit plug-in
"Qt+pcl Chapter 6" point cloud registration ICP Series 6
SQL常用的四个排序函数梳理
MySQL审计插件介绍
精益六西格玛项目辅导咨询:集中辅导和点对点辅导两种方式
Survey of intrusion detection systems:techniques, datasets and challenges
Intelligent operation and maintenance practice: banking business process and single transaction tracking
随机推荐
swiper 轮播图,最后一张图与第一张图无缝衔接
leetcode:329. Longest increasing path in matrix
What data capabilities do data product managers need to master?
Basic use process of cmake
Opencv Learning Notes 6 -- image mosaic
Qt+pcl Chapter 9 point cloud reconstruction Series 2
Can I choose to open an account on Great Wall Securities? Is it safe?
22-06-26周总结
[Cloudera][ImpalaJDBCDriver](500164)Error initialized or created transport for authentication
OpenSSL client programming: SSL session failure caused by an insignificant function
《QT+PCL第六章》点云配准icp系列5
如何实现时钟信号分频?
The difference between arrow function and ordinary function in JS
Zhang Chi Consulting: lead lithium battery into six sigma consulting to reduce battery capacity attenuation
Tableapi & SQL and Kafka message acquisition of Flink example
S32K1xx 微控制器的硬件设计指南
异常检测中的浅层模型与深度学习模型综述(A Unifying Review of Deep and Shallow Anomaly Detection)
Beilianzhuguan joined the dragon lizard community to jointly promote carbon neutralization
[leetcode] 16. The sum of the nearest three numbers
Don't ask me again why MySQL hasn't left the index? For these reasons, I'll tell you all