| 1 | <!--startmeta |
| 2 | custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/proc.plugin/integrations/memory_usage.md" |
| 3 | meta_yaml: "https://github.com/netdata/netdata/edit/master/src/collectors/proc.plugin/metadata.yaml" |
| 4 | sidebar_label: "Memory Usage" |
| 5 | learn_status: "Published" |
| 6 | learn_rel_path: "Collecting Metrics/Collectors/Operating Systems" |
| 7 | keywords: ['memory', 'ram', 'available', 'committed'] |
| 8 | message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" |
| 9 | endmeta--> |
| 10 | |
| 11 | # Memory Usage |
| 12 | |
| 13 | |
| 14 | <img src="https://netdata.cloud/img/linuxserver.svg" width="150"/> |
| 15 | |
| 16 | |
| 17 | Plugin: proc.plugin |
| 18 | Module: /proc/meminfo |
| 19 | |
| 20 | <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> |
| 21 | |
| 22 | ## Overview |
| 23 | |
| 24 | `/proc/meminfo` provides detailed information about the system's current memory usage. It includes information |
| 25 | about different types of memory, RAM, Swap, ZSwap, HugePages, Transparent HugePages (THP), Kernel memory, |
| 26 | SLAB memory, memory mappings, and more. |
| 27 | |
| 28 | Monitoring /proc/meminfo can be useful for: |
| 29 | |
| 30 | - **Performance Tuning**: Understanding your system's memory usage can help you make decisions about system |
| 31 | tuning and optimization. For example, if your system is frequently low on free memory, it might benefit |
| 32 | from more RAM. |
| 33 | |
| 34 | - **Troubleshooting**: If your system is experiencing problems, `/proc/meminfo` can provide clues about |
| 35 | whether memory usage is a factor. For example, if your system is slow and cached swap is high, it could |
| 36 | mean that your system is swapping out a lot of memory to disk, which can degrade performance. |
| 37 | |
| 38 | - **Capacity Planning**: By monitoring memory usage over time, you can understand trends and make informed |
| 39 | decisions about future capacity needs. |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | This collector is supported on all platforms. |
| 45 | |
| 46 | This collector only supports collecting metrics from a single instance of this integration. |
| 47 | |
| 48 | |
| 49 | ### Default Behavior |
| 50 | |
| 51 | #### Auto-Detection |
| 52 | |
| 53 | This integration doesn't support auto-detection. |
| 54 | |
| 55 | #### Limits |
| 56 | |
| 57 | The default configuration for this integration does not impose any limits on data collection. |
| 58 | |
| 59 | #### Performance Impact |
| 60 | |
| 61 | The default configuration for this integration is not expected to impose a significant performance impact on the system. |
| 62 | |
| 63 | ## Setup |
| 64 | |
| 65 | |
| 66 | ### Prerequisites |
| 67 | |
| 68 | No action required. |
| 69 | |
| 70 | ### Configuration |
| 71 | |
| 72 | #### Options |
| 73 | |
| 74 | |
| 75 | |
| 76 | There are no configuration options. |
| 77 | |
| 78 | |
| 79 | |
| 80 | #### via File |
| 81 | |
| 82 | There is no configuration file. |
| 83 | |
| 84 | ##### Examples |
| 85 | There are no configuration examples. |
| 86 | |
| 87 | |
| 88 | |
| 89 | ## Alerts |
| 90 | |
| 91 | |
| 92 | The following alerts are available: |
| 93 | |
| 94 | | Alert name | On metric | Description | |
| 95 | |:------------|:----------|:------------| |
| 96 | | [ ram_in_use ](https://github.com/netdata/netdata/blob/master/src/health/health.d/ram.conf) | system.ram | system memory utilization | |
| 97 | | [ ram_available ](https://github.com/netdata/netdata/blob/master/src/health/health.d/ram.conf) | mem.available | percentage of estimated amount of RAM available for userspace processes, without causing swapping | |
| 98 | | [ used_swap ](https://github.com/netdata/netdata/blob/master/src/health/health.d/swap.conf) | mem.swap | swap memory utilization | |
| 99 | | [ 1hour_memory_hw_corrupted ](https://github.com/netdata/netdata/blob/master/src/health/health.d/memory.conf) | mem.hwcorrupt | amount of memory corrupted due to a hardware failure | |
| 100 | |
| 101 | |
| 102 | ## Metrics |
| 103 | |
| 104 | Metrics grouped by *scope*. |
| 105 | |
| 106 | The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. |
| 107 | |
| 108 | |
| 109 | |
| 110 | ### Per Memory Usage instance |
| 111 | |
| 112 | |
| 113 | |
| 114 | This scope has no labels. |
| 115 | |
| 116 | Metrics: |
| 117 | |
| 118 | | Metric | Dimensions | Unit | |
| 119 | |:------|:----------|:----| |
| 120 | | system.ram | free, used, cached, buffers | MiB | |
| 121 | | mem.available | avail | MiB | |
| 122 | | mem.swap | free, used | MiB | |
| 123 | | mem.swap_cached | cached | MiB | |
| 124 | | mem.zswap | in-ram, on-disk | MiB | |
| 125 | | mem.hwcorrupt | HardwareCorrupted | MiB | |
| 126 | | mem.commited | Commited_AS | MiB | |
| 127 | | mem.writeback | Dirty, Writeback, FuseWriteback, NfsWriteback, Bounce | MiB | |
| 128 | | mem.kernel | Slab, KernelStack, PageTables, VmallocUsed, Percpu | MiB | |
| 129 | | mem.slab | reclaimable, unreclaimable | MiB | |
| 130 | | mem.hugepages | free, used, surplus, reserved | MiB | |
| 131 | | mem.thp | anonymous, shmem | MiB | |
| 132 | | mem.thp_details | ShmemPmdMapped, FileHugePages, FilePmdMapped | MiB | |
| 133 | | mem.reclaiming | Active, Inactive, Active(anon), Inactive(anon), Active(file), Inactive(file), Unevictable, Mlocked | MiB | |
| 134 | | mem.high_low | high_used, low_used, high_free, low_free | MiB | |
| 135 | | mem.cma | used, free | MiB | |
| 136 | | mem.directmaps | 4k, 2m, 4m, 1g | MiB | |
| 137 | |
| 138 |