Skip to content

Performance and kernel

Finding out why a server is slow: CPU, memory, disk I/O and load over time, and tuning the kernel with sysctl, limits and modules.

Basics: The four resources, reading load, where the bottleneck is, and what to install

Finding the bottleneck

  • vmstat


    CPU, memory, swap and I/O at a glance.

  • iostat


    How busy the disks are.

  • iotop


    Which process causes disk I/O.

  • sar


    Statistics for any time of the day.

Tuning the kernel

  • sysctl


    Kernel parameters at runtime.

  • ulimit


    Limits such as open files.

  • lsmod


    Loaded kernel modules.

  • modprobe


    Load and block modules.

From other chapters

  • top


    The busiest processes live. Covered in the chapter Processes.

  • free


    Memory and swap at a glance. Covered in the chapter Processes.

  • uptime


    The load average of the last 1, 5 and 15 minutes. Covered in the chapter Orientation.

  • lsof


    Which process holds which files open, for Too many open files. Covered in the chapter Processes.

  • dmesg


    Kernel messages such as the OOM killer or disk errors. Covered in the chapter Logs.