Home

Smem

Smem is an open-source memory reporting tool for Linux and other Unix-like operating systems. It analyzes the memory usage of processes and reports a set of metrics designed to give a clearer picture of how memory is consumed, especially when sharing occurs. The tool derives its data from the /proc filesystem, particularly the smaps data for each process, and attributes shared memory proportionally to each process.

A key feature of smem is its use of USS (Unique Set Size), PSS (Proportional Set Size),

In typical use, smem is run from the command line and can produce output that includes pid,

and
RSS
(Resident
Set
Size).
USS
represents
memory
that
would
be
freed
if
the
process
were
terminated,
excluding
shared
pages.
PSS
weights
shared
pages
by
the
number
of
processes
sharing
them,
providing
a
more
accurate
per-process
accounting
when
shared
libraries
or
memory
mappings
are
involved.
RSS
is
the
total
resident
memory
mapped
into
the
process,
including
shared
pages
in
full.
smem
can
present
per-process
data
as
well
as
aggregated
views
by
user
or
by
command,
helping
diagnose
memory
bloat,
compare
memory
usage
across
programs,
and
understand
the
impact
of
shared
libraries
on
total
consumption.
user,
command,
USS,
PSS,
RSS,
and
swap
usage.
It
is
widely
available
in
many
Linux
distributions
and
can
be
installed
via
standard
package
managers.
As
a
tool
intended
for
system
administrators
and
developers,
smem
complements
other
utilities
such
as
top,
ps,
and
pmap
by
providing
a
more
nuanced
view
of
memory
accounting
and
sharing.