监控系统内存碎片

简介: 监控系统内存碎片

```It can be seen from /proc/buddyinfo that the system memory is fragmented, with only a small number of higher order memory segments free, e.g.:
$ cat /proc/buddyinfo
...
Node 0, zone Normal 453952 173139 34818 12833 3094 1186 81 0 1 1 0

In the above example, it can be seen the system has 0 free blocks of the largest order and only 0-1-1 for the next larger order ones. So almost no memory segments larger than 256KB are available.
The content of /proc/buddyinfo as shown above show you the number of free memory chunks (see the last line labelled Normal). You have to read the numbers from left to right where the first column is order 0 = 4k, order 1 = 8k, order 2 = 16k, order 3 = 32k, order 4 = 64k, order 5 = 128k, order 6 = 256k, order 7 = 512k, order 8 = 1M, order 9 = 2M, order 10 = 4M. This is for a standard Linux system using 4KB standard memory block size.

The file /proc/buddyinfo is used primarily for diagnosing memory fragmentation issues. Using the buddy algorithm, each column represents the number of pages of a certain order (a certain size) that are available at any given time.
```
OSwatcher is running in the system and invoking /proc/pagetypeinfo every 10 minutes from the script:

$ cat /usr/libexec/oswatcher/pagesub

!/bin/sh

#

Copyright (c) 2020 by Oracle Corporation

pagesub.sh

This script is called by OSWatcher.sh. This script is the data

collector shell for pagetype. $1 is the output filename for the data

collector. $2 is the data collector shell script to execute.

$3 fixes timestamp date to be OSWg compliant.

#

if [ $3 != 0 ]; then
echo “zzz “'date ‘+%a %b %e %T %Z %Y’' >> $1
else
echo “zzz
“'date' >> $1
fi
cat /proc/pagetypeinfo | sed -e ‘/Node.*DMA/d’ >> $1 # <<<<<<< THIS IS THE LINE IN CONCERN
rm locks/pagelock.file

This behaviour is a side effect of the heavier operational cost of invoking /proc/pagetypeinfo in a system with a high uptime (several hundred days) and with substantial memory fragmentation.

Oracle Linux System Stops Responding for a Brief Period Every 10 Minutes (Doc ID 2904485.1)

相关文章
|
5月前
|
人工智能 监控 机器人
【Valgrind】如何使用Valgrind监控内存
【Valgrind】如何使用Valgrind监控内存
|
5月前
|
监控 Python
【python】实现cpu/内存监控的功能(非常简单)
【python】实现cpu/内存监控的功能(非常简单)
|
20天前
|
缓存 Java 测试技术
谷粒商城笔记+踩坑(11)——性能压测和调优,JMeter压力测试+jvisualvm监控性能+资源动静分离+修改堆内存
使用JMeter对项目各个接口进行压力测试,并对前端进行动静分离优化,优化三级分类查询接口的性能
谷粒商城笔记+踩坑(11)——性能压测和调优,JMeter压力测试+jvisualvm监控性能+资源动静分离+修改堆内存
|
18天前
|
监控 Ubuntu API
Python脚本监控Ubuntu系统进程内存的实现方式
通过这种方法,我们可以很容易地监控Ubuntu系统中进程的内存使用情况,对于性能分析和资源管理具有很大的帮助。这只是 `psutil`库功能的冰山一角,`psutil`还能够提供更多关于系统和进程的详细信息,强烈推荐进一步探索这个强大的库。
29 1
|
20天前
|
Arthas 监控 Java
监控线程池的内存使用情况以预防内存泄漏
监控线程池的内存使用情况以预防内存泄漏
|
20天前
|
监控 数据可视化 Java
使用JDK自带的监控工具JConsole来监控线程池的内存使用情况
使用JDK自带的监控工具JConsole来监控线程池的内存使用情况
|
3月前
|
存储 消息中间件 监控
JVM内存问题之ARMS监控显示堆内存和我设置的不同如何解决
JVM内存问题之ARMS监控显示堆内存和我设置的不同如何解决
|
3月前
|
缓存 Prometheus 监控
Java面试题:如何监控和优化JVM的内存使用?详细讲解内存调优的几种方法
Java面试题:如何监控和优化JVM的内存使用?详细讲解内存调优的几种方法
76 3
|
5月前
|
监控 Java 网络性能优化
容器内存可观测性新视角:WorkingSet 与 PageCache 监控
本文介绍了 Kubernetes 中的容器工作内存(WorkingSet)概念,它用于表示容器内存的实时使用量,尤其是活跃内存。
56205 14
容器内存可观测性新视角:WorkingSet 与 PageCache 监控
|
3月前
|
监控 Python
paramiko 模块 ---Python脚本监控当前系统的CPU、内存、根目录、IP地址等信息
paramiko 模块 ---Python脚本监控当前系统的CPU、内存、根目录、IP地址等信息