# CentOS 7

This page describes the Optimization Pack for the component type CentOS 7.

## Metrics

### CPU

| Metric             | Unit    | Description                                                                                                       |
| ------------------ | ------- | ----------------------------------------------------------------------------------------------------------------- |
| cpu\_num           | CPUs    | The number of CPUs available in the system (physical and logical)                                                 |
| cpu\_util          | percent | The average CPU utilization % across all the CPUs (i.e., how much time on average the CPUs are busy doing work)   |
| cpu\_util\_details | percent | The average CPU utilization % broken down by usage type and cpu number (e.g., cp1 user, cp2 system, cp3 soft-irq) |
| cpu\_load\_avg     | tasks   | The system load average (i.e., the number of active tasks in the system)                                          |

### Memory

| Metric             | Unit     | Description                                                                                                    |
| ------------------ | -------- | -------------------------------------------------------------------------------------------------------------- |
| mem\_util          | percent  | The memory utilization % (i.e, the % of memory used)                                                           |
| mem\_util\_nocache | percent  | The memory utilization % (i.e., the % of memory used) without considering memory reserved for caching purposes |
| mem\_util\_details | percent  | The memory utilization % (i.e., the % of memory used) broken down by usage type (e.g., active memory)          |
| mem\_used          | bytes    | The total amount of memory used                                                                                |
| mem\_used\_nocache | bytes    | The total amount of memory used without considering memory reserved for caching purposes                       |
| mem\_total         | bytes    | The total amount of installed memory                                                                           |
| mem\_fault\_minor  | faults/s | The number of minor memory faults (i.e., faults that do not cause disk access) per second                      |
| mem\_fault\_major  | faults/s | The number of major memory faults (i.e., faults that cause disk access) per second                             |
| mem\_fault         | faults/s | The number of memory faults (major + minor)                                                                    |
| mem\_swapins       | pages/s  | The number of memory pages swapped in per second                                                               |
| mem\_swapouts      | pages/s  | The number of memory pages swapped out per second                                                              |

### Network

| Metric                       | Unit      | Description                                                                                            |
| ---------------------------- | --------- | ------------------------------------------------------------------------------------------------------ |
| network\_tcp\_retrans        | retrans/s | The number of network TCP retransmissions per second                                                   |
| network\_in\_bytes\_details  | bytes/s   | The number of inbound network packets in bytes per second broken down by network device (e.g., wlp4s0) |
| network\_out\_bytes\_details | bytes/s   | The number of outbound network packets in bytes per second broken down by network device (e.g., eth01) |

### Disk

Notice: you can use a `device` custom filter to monitor a specific disk with Prometheus. You can find more information on Prometheus queries and the `%FILTERS%` placeholder here: [Prometheus provider](https://docs.akamas.io/akamas-docs/3.6/integrating/integrating-telemetry-providers/prometheus-provider) and here: [Prometheus provider metrics mapping](https://docs.akamas.io/akamas-docs/3.6/reference/telemetry-metric-mapping/prometheus-metrics-mapping).

| Metric                        | Unit    | Description                                                                                                                                  |
| ----------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| disk\_swap\_util              | percent | The average space utilization % of swap disks                                                                                                |
| disk\_swap\_used              | bytes   | The total amount of space used by swap disks                                                                                                 |
| disk\_util\_details           | percent | The utilization % of disk, i.e how much time a disk is busy doing work broken down by disk (e.g., disk D://)                                 |
| disk\_iops\_writes            | ops/s   | The average number of IO disk-write operations per second across all disks                                                                   |
| disk\_iops\_reads             | ops/s   | The average number of IO disk-read operations per second across all disks                                                                    |
| disk\_iops                    | ops/s   | The average number of IO disk operations per second across all disks                                                                         |
| disk\_response\_time\_read    | seconds | The average response time of IO read-disk operations                                                                                         |
| disk\_response\_time\_worst   | seconds | The average response time of IO disk operations of the slowest disk                                                                          |
| disk\_response\_time\_write   | seconds | The average response time of IO write-disk operations                                                                                        |
| disk\_response\_time\_details | ops/s   | The average response time of IO disk operations broken down by disk (e.g., disk /dev/nvme01 )                                                |
| disk\_iops\_details           | ops/s   | The number of IO disk-write operations of per second broken down by disk (e.g., disk /dev/nvme01)                                            |
| disk\_io\_inflight\_details   | ops     | The number of IO disk operations in progress (outstanding) broken down by disk (e.g., disk /dev/nvme01)                                      |
| disk\_write\_bytes            | bytes/s | The number of bytes per second written across all disks                                                                                      |
| disk\_read\_bytes             | bytes/s | The number of bytes per second read across all disks                                                                                         |
| disk\_read\_write\_bytes      | bytes/s | The number of bytes per second read and written across all disks                                                                             |
| disk\_write\_bytes\_details   | bytes/s | The number of bytes per second written from the disks broken down by disk and type of operation (e.g., disk /dev/nvme01 and operation WRITE) |
| disk\_read\_bytes\_details    | bytes/s | The number of bytes per second read from the disks broken down by disk and type of operation (e.g., disk /dev/nvme01 and operation READ)     |

### Filesystem

| Metric           | Unit    | Description                                                                                                                     |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------- |
| filesystem\_util | percent | The space utilization % of filesystems broken down by type and device (e.g., filesystem of type overlayfs on device /dev/loop1) |
| filesystem\_used | bytes   | The amount of space used on the filesystems broken down by type and device (e.g., filesystem of type zfs on device /dev/nvme01) |
| filesystem\_size | bytes   | The size of filesystems broken down by type and device (e.g., filesystem of type ext4 for device /dev/nvme01)                   |

### Other metrics

| Metric              | Unit       | Description                                                       |
| ------------------- | ---------- | ----------------------------------------------------------------- |
| proc\_blocked       | processes  | The number of processes blocked (e.g, for IO or swapping reasons) |
| os\_context\_switch | switches/s | The number of context switches per second                         |

## Parameters

### CPU

| Parameter                     | Default Value | Domain               | Description                                                                                                                                                                                                                                 |
| ----------------------------- | ------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| os\_cpuSchedMinGranularity    | 2250000 ns    | 300000→30000000 ns   | Minimal preemption granularity (in nanoseconds) for CPU bound tasks                                                                                                                                                                         |
| os\_cpuSchedWakeupGranularity | 3000000 ns    | 400000→40000000 ns   | Scheduler Wakeup Granularity (in nanoseconds)                                                                                                                                                                                               |
| os\_CPUSchedMigrationCost     | 500000 ns     | 100000→5000000 ns    | Amount of time (in nanoseconds) after the last execution that a task is considered to be "cache hot" in migration decisions. A "hot" task is less likely to be migrated to another CPU, so increasing this variable reduces task migrations |
| os\_CPUSchedChildRunsFirst    | 0             | 0→1                  | A freshly forked child runs before the parent continues execution                                                                                                                                                                           |
| os\_CPUSchedLatency           | 18000000 ns   | 2400000→240000000 ns | Targeted preemption latency (in nanoseconds) for CPU bound tasks                                                                                                                                                                            |
| os\_CPUSchedAutogroupEnabled  | 1             | 0→1                  | Enables the Linux task auto-grouping feature, where the kernel assigns related tasks to groups and schedules them together on CPUs to achieve higher performance for some workloads                                                         |
| os\_CPUSchedNrMigrate         | 32            | 3→320                | Scheduler NR Migrate                                                                                                                                                                                                                        |

### Memory

| Parameter                            | Default Value  | Domain              | Description                                                                                                                                                                |
| ------------------------------------ | -------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| os\_MemorySwappiness                 | 1              | 0→100               | Memory Swappiness                                                                                                                                                          |
| os\_MemoryVmVfsCachePressure         | 100 %          | 10→100 %            | VFS Cache Pressure                                                                                                                                                         |
| <p>os\_MemoryVmMinFree<br><br></p>   | 67584 KB       | 10240→1024000 KB    | Minimum Free Memory                                                                                                                                                        |
| os\_MemoryVmDirtyRatio               | 20 %           | 1→99 %              | When the dirty memory pages exceed this percentage of the total memory, processes are forced to write dirty buffers during their time slice instead of continuing to write |
| os\_MemoryVmDirtyBackgroundRatio     | 10 %           | 1→99 %              | When the dirty memory pages exceed this percentage of the total memory, the kernel begins to write them asynchronously in the background                                   |
| os\_MemoryTransparentHugepageEnabled | `always`       | `always` `never`    | Transparent Hugepage Enablement                                                                                                                                            |
| os\_MemoryTransparentHugepageDefrag  | `always`       | `always` `never`    | Transparent Hugepage Enablement Defrag                                                                                                                                     |
| os\_MemorySwap                       | `swapon`       | `swapon` `swapoff`  | Memory Swap                                                                                                                                                                |
| os\_MemoryVmDirtyExpire              | 3000 centisecs | 300→30000 centisecs | Memory Dirty Expiration Time                                                                                                                                               |
| os\_MemoryVmDirtyWriteback           | 500 centisecs  | 50→5000 centisecs   | Memory Dirty Writeback                                                                                                                                                     |

### Network

| Parameter                                | Default value       | Domain              | Description                                                                                                                                             |
| ---------------------------------------- | ------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| os\_NetworkNetCoreSomaxconn              | 128 connections     | 12→1200 connections | Network Max Connections                                                                                                                                 |
| os\_NetworkNetCoreNetdevMaxBacklog       | 1000 packets        | 100→10000 packets   | Network Max Backlog                                                                                                                                     |
| os\_NetworkNetIpv4TcpMaxSynBacklog       | 1024 packets        | 52→15120 packets    | Network IPV4 Max Sync Backlog                                                                                                                           |
| os\_NetworkNetCoreNetdevBudget           | 300 packets         | 30→3000 packets     | Network Budget                                                                                                                                          |
| <p>os\_NetworkNetCoreRmemMax<br><br></p> | 212992 bytes        | 21299→2129920 bytes | Maximum network receive buffer size that applications can request                                                                                       |
| <p>os\_NetworkNetCoreWmemMax<br><br></p> | 21299→2129920 bytes | 21299→2129920 bytes | Maximum network transmit buffer size that applications can request                                                                                      |
| os\_NetworkNetIpv4TcpSlowStartAfterIdle  | 1                   | 0→1                 | Network Slow Start After Idle Flag                                                                                                                      |
| os\_NetworkNetIpv4TcpFinTimeout          | 60                  | 6 →600 seconds      | Network TCP timeout                                                                                                                                     |
| os\_NetworkRfs                           | 0                   | 0→131072            | If enabled increases datacache hitrate by steering kernel processing of packets to the CPU where the application thread consuming the packet is running |

### Storage

| Parameter                           | Default value | Domain            | Description                                                                                                                                                                                                                         |
| ----------------------------------- | ------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>os\_StorageReadAhead<br><br></p> | 128 KB        | 0→1024 KB         | Read-ahead speeds up file access by pre-fetching data and loading it into the page cache so that it can be available earlier in memory instead of from disk                                                                         |
| os\_StorageNrRequests               | 1000 packets  | 100→10000 packets | Network Max Backlog                                                                                                                                                                                                                 |
| os\_StorageRqAffinity               | 1             | 1→2               | Storage Requests Affinity                                                                                                                                                                                                           |
| os\_StorageQueueScheduler           | `none`        | `none` `kyber`    | Storage Queue Scheduler Type                                                                                                                                                                                                        |
| <p>os\_StorageNomerges<br><br></p>  | 0             | 0→2               | Enables the user to disable the lookup logic involved with IO merging requests in the block layer. By default (0) all merges are enabled. With 1 only simple one-hit merges will be tried. With 2 no merge algorithms will be tried |
| os\_StorageMaxSectorsKb             | 128 KB        | 32→128 KB         | The largest IO size that the OS c                                                                                                                                                                                                   |

## Constraints

There are no general constraints among CentOS 7 parameters.
