Talking about the proc file system

1. /proc/buddyinfo:
/proc/buddyinfo is the debug information for the linuxbuddy system to manage physical memory.

The buddy algorithm is used in linux to solve the problem of external fragmentation of physical memory. It divides all free memory into 11 block linked lists in the form of the power of 2,
corresponding to 1, 2, 4, 8, 16, 32 , 64, 128, 256, 512, 1024 page blocks .

Linux supports NUMA technology. For NUMA devices, the nodes of the NUMA system are usually composed of a set of CPUs and local memory, and each node has corresponding
local memory, so Node0 in buddyinfo represents the node ID; and each node The memory device below can be divided into multiple memory areas (zones),
so in the following display, the memory of Node0 is divided into DMA, Normal, and HighMem areas. The back is the free area.

The Normal area is used for analysis here. The value in the second column is 100, which indicates the normal area in the current system. The available memory size of two consecutive pages is 100*2*PAGE_SIZE;
the value in the third column is 52, which indicates the normal area in the current system. , the available memory size of four consecutive pages is 52*2^2*PAGE_SIZE

cat /proc/buddyinfo
Node 0, zone DMA         23   15    4    5   2   3    3   2   3   1   0
Node 0, zone Normal    149   100 52  33 23  5   32  8  12  2   59
Node 0, zone HighMem 11     21   23  49 29 15  8   16 12  2  142

 

2. /proc/meminfo:
cat /proc/meminfo This command is actually similar to the "free -m" command, but the information obtained is more detailed

root@vpsroll:~# cat /proc/meminfo  
MemTotal: 262144 kB  
MemFree: 237904 kB  
Cached: 10540 kB  
Active: 10220 kB  
Inactive: 7004 kB  
Active(anon): 6608 kB  
Inactive(anon): 76 kB  
Active(file): 3612 kB  
Inactive(file): 6928 kB  
Unevictable: 0 kB  
Mlocked: 0 kB  
SwapTotal: 524288 kB  
SwapFree: 524288 kB  
Dirty: 0 kB  
Writeback: 0 kB  
AnonPages: 6684 kB  
Shmem: 2632 kB  
Slab: 6972 kB  
SReclaimable: 4288 kB  
SUnreclaim: 2684 kB  

MemTotal: The size of all available RAM (ie physical memory minus some reserved bits and the size of the kernel's binary code)
MemFree: The sum of LowFree and HighFree, the unused memory reserved by the system
Buffers: Used to make buffer size for files
Cached: The size of the memory used by the cache memory (equal to diskcache minus SwapCache).
SwapCached: The size of the swap space used by the cache memory (cache memory), the memory that has been swapped out, but is still stored in the swapfile middle.
Used to be quickly replaced when needed without opening the I/O port again.
Active: The size of the buffer or cache page file that is in active use and will not be used for other purposes unless absolutely necessary.
Inactive: The size of the buffer or cache page file that is in infrequent use, may be used Other ways.
HighTotal:
HighFree: This area is not directly mapped to kernel space. The kernel must use this segment of memory differently.
LowTotal:
LowFree: The low bit can achieve the same effect as the high bit memory, and it can also be used by the kernel to record some of its own data structures. Among many other things,
this is all that Slab assigns. Bad things happen when you go beyond low-end memory.
SwapTotal: Total size of swap space
SwapFree: Size of unused swap space
Dirty: Size of memory waiting to be written back to disk.
Writeback: The amount of memory that is being written back to disk.
AnonPages: Memory size of unmapped pages
Mapped: The size of the map such as devices and files.
Slab: The size of the kernel data structure cache, which can reduce the consumption of applying and releasing memory.
SReclaimable: The size of the reclaimable Slab
SUnreclaim: The size of the unreclaimable Slab (SUnreclaim+SReclaimable=Slab)
PageTables: The size of the index table that manages memory paging pages.
NFS_Unstable: The size of the unstable page table
VmallocTotal: The size of the virtual memory that can be vmalloc
VmallocUsed: The size of the virtual memory that has been used.
VmallocChunk: The largest contiguous chunk available in the vmalloc area

https://www.cnblogs.com/tcicy/p/8299573.html

https://www.sogou.com/link?url=DOb0bgH2eKg7Sf-koBXrEidQRoztLvNXCquHaNrIZCGK6x5wQqf_qNC6QghyI0Ya0ztd7q5nl6o.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325474293&siteId=291194637