Dump device estimates in Oracle Solaris

The amount of disk space required by Solaris in order to capture a crash dump will depend upon a number of factors. By default, Solaris will capture just the kernel's memory pages. But it is also possible to capture user pages which would, in most cases, result in a much larger crash dump file. This behaviour is controlled via the dumpadm with the '-c' flag.

NOTE: The kernel's memory consumption will vary from system to system, so it is not possible to give a general guideline for crash dump size.

mdb Examples

The following mdb command replicates the calculation used by dumpadm to obtain its estimate and can therefore be used to quickly obtain an approximate figure.

  • Solaris 10 without 150400-26 (SPARC) / 150401-26 (x86) and Solaris 11.0:
    # echo "physinstalled::print -d |>f; obp_pages::print -d |>g; availrmem::print -d |>h; anon_segkp_pages_locked::print -d |>i; k_anoninfo::print -d ani_mem_resv |>j; pages_locked::print -d |>k; pages_claimed::print -d |>l; pages_useclaim::print -d | >n ; _pagesize::print -d |>p ; ((<f-<g-<h-<i-<j-<k-<l-<n)*<p)%2=E" | /usr/bin/mdb -k
                    443269120
  • On Solaris 11.1 without SRU 19:
    # echo "physinstalled::print -d |>f; obp_pages::print -d |>g; availrmem::print -d |>h; anon_segkp_pages_locked::print -d |>i; k_anoninfo::print -d ani_mem_resv |>j; pages_locked::print -d |>k; _pagesize::print -d |>p ; ((<f-<g-<h-<i-<j-<k)*<p)%2=E" | /usr/bin/mdb -k
                    1089818624
  • On Solaris 10 with 150400-26 (SPARC) / 150401-26 (x86) or later and Solaris 11.1 with SRU 19 or later:
    # echo "kpages_locked::print -d |>l; _pagesize::print -d |>p; (<l*<p)%2=E" | /usr/bin/mdb -k
                    3918499840

Solaris 11.2 and beyond

Since Oracle Solaris 11.2 there is a really simple way to get an estimate of dump device size. With dumpadm we have a new '-e' flag, which prints an estimate of the dump space required. For example:

# dumpadm -e
Estimated space required for dump: 507.44 M

The estimate is based on the current dump configuration and the current state of the system.

One noticable difference in estimating dump device sizing is when switch off dumping of ZFS metadata. For example:

# dumpadm -c kernel-zfs
Dump content      : kernel without ZFS metadata
Dump device       : /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash
Savecore enabled  : yes
Save compressed   : on
# dumpadm -e
Estimated space required for dump: 351.82 M
# dumpadm -c kernel+zfs
Dump content      : kernel with ZFS metadata
Dump device       : /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash
Savecore enabled  : yes
Save compressed   : on
# dumpadm -e
Estimated space required for dump: 507.51 M