linux 内存碎片查看

简介: linux 内存碎片查看

/proc/zoneinfo  

[root@k8s01 ~]# cat /proc/zoneinfo 
Node 0, zone      DMA
  pages free     3968 <<剩余内存情况
        min      33
        low      41
        high     49
        scanned  0
        spanned  4095
        present  3997
        managed  3976  << 总共内存情况
    nr_free_pages 3968
    nr_alloc_batch 8
    nr_inactive_anon 0
    nr_active_anon 0
    nr_inactive_file 0
    nr_active_file 0
    nr_unevictable 0
    nr_mlock     0
    nr_anon_pages 0
    nr_mapped    0
    nr_file_pages 0
    nr_dirty     0
    nr_writeback 0
    nr_slab_reclaimable 0
    nr_slab_unreclaimable 8
    nr_page_table_pages 0
    nr_kernel_stack 0
    nr_unstable  0
    nr_bounce    0
    nr_vmscan_write 0
    nr_vmscan_immediate_reclaim 0
    nr_writeback_temp 0
    nr_isolated_anon 0
    nr_isolated_file 0
    nr_shmem     0
    nr_dirtied   0
    nr_written   0
    numa_hit     1
    numa_miss    0
    numa_foreign 0
    numa_interleave 0
    numa_local   1
    numa_other   0
    workingset_refault 0
    workingset_activate 0
    workingset_nodereclaim 0
    nr_anon_transparent_hugepages 0
    nr_free_cma  0
        protection: (0, 2816, 7791, 7791)
  pagesets
    cpu: 0
              count: 0
              high:  0
              batch: 1
  vm stats threshold: 6
    cpu: 1
              count: 0
              high:  0
              batch: 1
  vm stats threshold: 6
    cpu: 2
              count: 0
              high:  0
              batch: 1
  vm stats threshold: 6
    cpu: 3
              count: 0
              high:  0
              batch: 1
  vm stats threshold: 6
  all_unreclaimable: 1
  start_pfn:         1
  inactive_ratio:    1
Node 0, zone    DMA32
  pages free     25985
        min      6093
        low      7616
        high     9139
        scanned  0
        spanned  1044480
        present  782288
        managed  721041
    nr_free_pages 25985
    nr_alloc_batch 1508
    nr_inactive_anon 296860
    nr_active_anon 328977
    nr_inactive_file 39420
    nr_active_file 12485
    nr_unevictable 0
    nr_mlock     0
    nr_anon_pages 266349
    nr_mapped    8128
    nr_file_pages 360705
    nr_dirty     4
    nr_writeback 0
    nr_slab_reclaimable 2935
    nr_slab_unreclaimable 4489
    nr_page_table_pages 2697
    nr_kernel_stack 160
    nr_unstable  0
    nr_bounce    0
    nr_vmscan_write 26
    nr_vmscan_immediate_reclaim 291
    nr_writeback_temp 0
    nr_isolated_anon 0
    nr_isolated_file 0
    nr_shmem     308800
    nr_dirtied   473301
    nr_written   231533
    numa_hit     93200954
    numa_miss    0
    numa_foreign 0
    numa_interleave 0
    numa_local   93200954
    numa_other   0
    workingset_refault 342060
    workingset_activate 16736
    workingset_nodereclaim 0
    nr_anon_transparent_hugepages 99
    nr_free_cma  0
        protection: (0, 0, 4974, 4974)
  pagesets
    cpu: 0
              count: 165
              high:  186
              batch: 31
  vm stats threshold: 36
    cpu: 1
              count: 21
              high:  186
              batch: 31
  vm stats threshold: 36
    cpu: 2
              count: 131
              high:  186
              batch: 31
  vm stats threshold: 36
    cpu: 3
              count: 180
              high:  186
              batch: 31
  vm stats threshold: 36
  all_unreclaimable: 0
  start_pfn:         4096
  inactive_ratio:    4
Node 0, zone   Normal
  pages free     17676
        min      10768
        low      13460
        high     16152
        scanned  0
        spanned  1310720
        present  1310720
        managed  1273500
    nr_free_pages 17676
    nr_alloc_batch 2385
    nr_inactive_anon 526877
    nr_active_anon 657517
    nr_inactive_file 16937
    nr_active_file 11182
    nr_unevictable 0
    nr_mlock     0
    nr_anon_pages 560177
    nr_mapped    6182
    nr_file_pages 619058
    nr_dirty     12
    nr_writeback 0
    nr_slab_reclaimable 6204
    nr_slab_unreclaimable 11918
    nr_page_table_pages 4030
    nr_kernel_stack 415
    nr_unstable  0
    nr_bounce    0
    nr_vmscan_write 78
    nr_vmscan_immediate_reclaim 683
    nr_writeback_temp 0
    nr_isolated_anon 0
    nr_isolated_file 0
    nr_shmem     590939
    nr_dirtied   897912
    nr_written   438417
    numa_hit     183323216
    numa_miss    0
    numa_foreign 0
    numa_interleave 22884
    numa_local   183323216
    numa_other   0
    workingset_refault 532905
    workingset_activate 22766
    workingset_nodereclaim 0
    nr_anon_transparent_hugepages 65
    nr_free_cma  0
        protection: (0, 0, 0, 0)
  pagesets
    cpu: 0
              count: 113
              high:  186
              batch: 31
  vm stats threshold: 42
    cpu: 1
              count: 53
              high:  186
              batch: 31
  vm stats threshold: 42
    cpu: 2
              count: 89
              high:  186
              batch: 31
  vm stats threshold: 42
    cpu: 3
              count: 191
              high:  186
              batch: 31
  vm stats threshold: 42
  all_unreclaimable: 0
  start_pfn:         1048576
  inactive_ratio:    6
[root@k8s01 ~]# cat /proc/pagetypeinfo 
Page block order: 9
Pages per block:  512

Free pages count per migrate type at order       0      1      2      3      4      5      6      7      8      9     10 
Node    0, zone      DMA, type    Unmovable      0      0      0      0      2      1      1      0      1      0      0 
Node    0, zone      DMA, type  Reclaimable      0      0      0      0      0      0      0      0      0      0      0 
Node    0, zone      DMA, type      Movable      0      0      0      0      0      0      0      0      0      1      3 
Node    0, zone      DMA, type      Reserve      0      0      0      0      0      0      0      0      0      0      0 
Node    0, zone      DMA, type          CMA      0      0      0      0      0      0      0      0      0      0      0 
Node    0, zone      DMA, type      Isolate      0      0      0      0      0      0      0      0      0      0      0 
Node    0, zone    DMA32, type    Unmovable    148     62    166    103     74     49     24     16      3      0      0 
Node    0, zone    DMA32, type  Reclaimable      0      6     26     23     29      9      0      0      0      0      0 
Node    0, zone    DMA32, type      Movable   2816    425    157     88     50     26     19     10     27      0      0 
Node    0, zone    DMA32, type      Reserve      0      0      0      0      0      0      0      0      0      0      0 
Node    0, zone    DMA32, type          CMA      0      0      0      0      0      0      0      0      0      0      0 
Node    0, zone    DMA32, type      Isolate      0      0      0      0      0      0      0      0      0      0      0 
Node    0, zone   Normal, type    Unmovable     24    122    411    227    217     29      7      2      1      0      0 
Node    0, zone   Normal, type  Reclaimable      4     23     19      1     12      3      0      0      0      0      0 
Node    0, zone   Normal, type      Movable   3251    292     34      5      1      2      1      1     13      0      0 
Node    0, zone   Normal, type      Reserve      0      0      0      0      0      0      0      0      0      0      0 
Node    0, zone   Normal, type          CMA      0      0      0      0      0      0      0      0      0      0      0 
Node    0, zone   Normal, type      Isolate      0      0      0      0      0      0      0      0      0      0      0 

Number of blocks type     Unmovable  Reclaimable      Movable      Reserve          CMA      Isolate 
Node 0, zone      DMA            1            0            7            0            0            0 
Node 0, zone    DMA32           45            7         1476            0            0            0 
Node 0, zone   Normal          171           11         2378            0            0            0 
[root@k8s01 ~]# cat /proc/buddyinfo 
Node 0, zone      DMA      0      0      0      0      2      1      1      0      1      1      3 
Node 0, zone    DMA32   2927    520    355    214    152     84     42     27     30      0      0 
Node 0, zone   Normal   3615    524    455    233    230     34      8      3     14      0      0 
[root@k8s01 ~]#



相关实践学习
容器服务Serverless版ACK Serverless 快速入门:在线魔方应用部署和监控
通过本实验,您将了解到容器服务Serverless版ACK Serverless 的基本产品能力,即可以实现快速部署一个在线魔方应用,并借助阿里云容器服务成熟的产品生态,实现在线应用的企业级监控,提升应用稳定性。
云原生实践公开课
课程大纲 开篇:如何学习并实践云原生技术 基础篇: 5 步上手 Kubernetes 进阶篇:生产环境下的 K8s 实践 相关的阿里云产品:容器服务&nbsp;ACK 容器服务&nbsp;Kubernetes&nbsp;版(简称&nbsp;ACK)提供高性能可伸缩的容器应用管理能力,支持企业级容器化应用的全生命周期管理。整合阿里云虚拟化、存储、网络和安全能力,打造云端最佳容器化应用运行环境。 了解产品详情:&nbsp;https://www.aliyun.com/product/kubernetes
相关文章
|
26天前
|
存储 Linux 编译器
Linux C/C++ 编程 内存管理之道:探寻编程世界中的思维乐趣
Linux C/C++ 编程 内存管理之道:探寻编程世界中的思维乐趣
50 0
|
Linux
【Linux】—— 共享内存
【Linux】—— 共享内存
|
2月前
|
Linux
linux 常用内存检查命令
linux 常用内存检查命令
40 0
|
19天前
|
存储 算法 Linux
【Linux 应用开发 共享内存】深入理解和实践 ftruncate:共享内存的有效管理
【Linux 应用开发 共享内存】深入理解和实践 ftruncate:共享内存的有效管理
52 5
|
24天前
|
Shell Linux C语言
【Shell 命令集合 磁盘维护 】Linux 创建一个初始化内存盘 mkinitrd命令使用教程
【Shell 命令集合 磁盘维护 】Linux 创建一个初始化内存盘 mkinitrd命令使用教程
32 0
|
2月前
|
Linux
|
7天前
|
Prometheus 监控 Cloud Native
【Linux】查看系统内存命令(详细讲解)
【Linux】查看系统内存命令(详细讲解)
|
11天前
|
存储 缓存 监控
深入解析linux内存指标:快速定位系统内存问题的有效技巧与实用方法(free、top、ps、vmstat、cachestat、cachetop、sar、swap、动态内存、cgroops、oom)
深入解析linux内存指标:快速定位系统内存问题的有效技巧与实用方法(free、top、ps、vmstat、cachestat、cachetop、sar、swap、动态内存、cgroops、oom)
|
19天前
|
存储 缓存 监控
Linux 系统 内存通用指标以及查询方式
Linux 系统 内存通用指标以及查询方式
15 0
|
19天前
|
存储 Linux 程序员
【Linux C/C++ 堆内存分布】深入理解Linux进程的堆空间管理
【Linux C/C++ 堆内存分布】深入理解Linux进程的堆空间管理
66 0