LinuxCommandLibrary

slabtop

Show kernel slab cache information

SYNOPSIS

slabtop [options]

PARAMETERS

-d
    Refresh display every seconds.

-s
    Sort by . Valid fields are: cache, numobj, objsize, objperslab, slabs, inuse, kmemsize, resv, limit.

-o
    Show object count instead of memory usage.

-c
    Show cache size instead of object count. This is the default.

-l
    Show only the top caches.

-n
    Number of times to update before exiting.

-w
    Wider display.

-C
    Display color.

-h
    Show help.

-V
    Show version.

DESCRIPTION

The slabtop command displays real-time information about kernel slab cache usage. Slabs are memory areas used by the kernel to efficiently manage frequently allocated and deallocated objects, reducing fragmentation. slabtop provides a dynamically updated view of the most active slab caches, allowing administrators to identify memory bottlenecks and diagnose kernel memory-related issues.
It presents data sorted by different criteria such as cache size, object count, and utilization percentage. This helps in pinpointing which slab caches are consuming the most memory or experiencing the most activity. Understanding slab usage is crucial for optimizing kernel performance and preventing memory exhaustion. slabtop is a powerful tool for system administrators and developers to monitor and analyze kernel memory allocation patterns.

CAVEATS

The information displayed by slabtop reflects the current state of the kernel memory. The values can change quickly depending on the system's workload.

UNDERSTANDING THE OUTPUT

The output typically shows fields like CACHE (cache name), NUMOBJ (number of objects), OBJSIZE (object size), OBJ/SLAB (objects per slab), SLABS (number of slabs), INUSE (objects in use), KMEMSIZE (memory size in KB), and others. Analyzing these fields helps identify caches that are heavily utilized or consuming significant memory.

SEE ALSO

free(1), vmstat(8), top(1)

Copied to clipboard