/proc/zoneinfo

发布时间 2023-11-09 15:55:21作者: yooooooo


root@pita2_mr813_tina35:/# cat /proc/zoneinfo 
Node 0, zone      DMA
  per-node stats
      nr_inactive_anon 4749
      nr_active_anon 70166
      nr_inactive_file 89970
      nr_active_file 34386
      nr_unevictable 0
      nr_isolated_anon 0
      nr_isolated_file 0
      nr_pages_scanned 0
      workingset_refault 673868
      workingset_activate 79303
      workingset_restore 0
      workingset_nodereclaim 2944
      nr_anon_pages 70014
      nr_mapped    37298
      nr_file_pages 129264
      nr_dirty     690
      nr_writeback 0
      nr_writeback_temp 0
      nr_shmem     4907
      nr_shmem_hugepages 0
      nr_shmem_pmdmapped 0
      nr_anon_transparent_hugepages 0
      nr_unstable  0
      nr_vmscan_write 0
      nr_vmscan_immediate_reclaim 90
      nr_dirtied   1761193
      nr_written   1582319
  pages free     3790
        min      996
        low      1245
        high     1494
   node_scanned  0
        spanned  262144
        present  262144
        managed  250478
        protection: (0, 0, 0)
      nr_free_pages 3790
      nr_zone_inactive_anon 4749
      nr_zone_active_anon 70166
      nr_zone_inactive_file 89970
      nr_zone_active_file 34386
      nr_zone_unevictable 0
      nr_zone_write_pending 690
      nr_mlock     0
      nr_slab_reclaimable 17980
      nr_slab_unreclaimable 20160
      nr_page_table_pages 2082
      nr_kernel_stack 14304
      nr_overhead  0
      nr_bounce    0
      nr_free_cma  1249
  pagesets
    cpu: 0
              count: 142
              high:  186
              batch: 31
  vm stats threshold: 24
    cpu: 1
              count: 24
              high:  186
              batch: 31
  vm stats threshold: 24
    cpu: 2
              count: 12
              high:  186
              batch: 31
  vm stats threshold: 24
    cpu: 3
              count: 145
              high:  186
              batch: 31
  vm stats threshold: 24
  node_unreclaimable:  0
  start_pfn:           262144
  node_inactive_ratio: 0

  1. Node : 表示节点的标识符。内存可以被组织成多个节点,每个节点可以是一个物理地址空间或者是一组逻辑地址空间。
  2. zone : 表示内存区域的标识符。内存区域是连续的物理页框,用于存储内核数据结构和用户进程的内存页面。
  3. pages free: 表示当前空闲的物理页数。
  4. min share: 表示在区域中应保持的最小共享页数。这些页不会被回收,以避免频繁的页分配和释放。
  5. cpu migrate disabled: 表示是否禁止在该区域中进行CPU迁移。
  6. flags: 提供了一组标志来描述区域的属性。例如,PFN_MAP_LAZY表示在物理页面映射时使用延迟映射。
  7. total scan: 表示该区域中所有页面的扫描总数。
  8. pagesets: 提供了与页面集相关的详细信息。每个页面集包含一个保留在该区域中的链表。
  9. spanned_pages: 表示该区域中连续物理页面的总数。
  10. present_pages: 表示该区域中当前存在的物理页面的总数。
  11. allocated_pages: 表示该区域中已被分配的物理页面的总数。
  12. nr_zones: 表示该节点中的总区域数。
  13. nr_inactive_anon: 表示非活动匿名页的数量。
  14. nr_active_anon: 表示活动匿名页的数量
  15. nr_inactive_file: 表示非活动文件页的数量。
  16. nr_active_file: 表示活动文件页的数量。
  17. nr_unevictable: 表示不可驱逐页的数量。

通过查看 /proc/zoneinfo 文件,您可以了解内核如何管理系统的物理内存,并获得有关内存分配和使用的重要信息。请注意,这些信息特定于您的系统和内核配置,可能会因系统和内核版本而有所不同。