Check huge pages status

Check whether THP and hugepages are configured and in use.

grep -E 'HugePages|AnonHugePages|Transparent' /proc/meminfo

tool
linux133 commands
tags
linuxmemorykernel

More linux commands

  • echo never > /sys/kernel/mm/transparent_hugepage/enabled

    Turn off THP until the next reboot. It helps with latency spikes in Redis and MongoDB.

  • numactl --hardware

    Show NUMA nodes, which CPUs belong to each node and how memory is split.

  • sysctl -w net.core.somaxconn=65535 net.ipv4.tcp_max_syn_backlog=65535

    Increase the listen and SYN backlogs for services with many connections.

  • sysctl -w net.core.default_qdisc=fq net.ipv4.tcp_congestion_control=bbr

    Switch to Google's BBR congestion control for better throughput.

  • ss -ulnp

    List all listening UDP sockets with process info.

all 133 linux commands