tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

malloc(9) profiling

Hello everybody, this may be of interest to those wishing to profile the
memory usage of kernel subsystems:

It's a vmstat-like daemon, vmstatd(1), which periodically pulls
malloc(9) stats into a db.  A front-end tool, rrdvmstat(1), generates
pretty pictures for seeing memory usage.  Checking, say, vnode
allocations is as simple as follows:

  # vmstatd
  (do things)
  % rrdvmstat vnodes
  # pkill vmstatd

The tool's young (0.3), but stable.  It's ported to OpenBSD, NetBSD, and
mult-NetBSD (which sports OpenBSD's sysctl(3) interface to memstats
instead of kvm).  I'll progress to 1.0 when I think that the front-ends
are beefy enough to be interesting.  vmstatd(1) and vmstatd(5) shouldn't

If you've bug-fixes, patches or feature requests, then please let me
know.  I've pkgsrc archives on-site (and ports for OpenBSD).

Take care, --Kristaps

Home | Main Index | Thread Index | Old Index