---
name: "memtier"
section: "1"
platform: "linux"
package: "libmemkind-progs"
version: "1.14.0-2"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/memtier"
---

# memtier(1)

redirect malloc calls to memkind memory tiering

## NAME

memtier - redirect malloc calls to memkind memory tiering

## SYNOPSIS

**memtier** **-r** *ratio* **-t** *thresholds* *program args...*

## DESCRIPTION

**memtier** runs the given *program*, redirecting memory allocations to different memory tiers based on a given policy.  This allows unmodified programs to run following a non-greedy allocation scheme that avoids a performance cliff when DRAM is exhausted.

## OPTIONS

- **-r** ratio

  Specifies the ratio as a pair of integers separated by a colon, where the first number gives the relative share of near DRAM to be used while the second number gives "far" memory, be it CXL memory or PMEM.  Eg. *"1:4"* means that 20% of allocations will use DRAM, 80% PMEM.

  If the ratio is not given, it defaults to the relative share of physically installed memory.

  This version of memtier recognizes only two tiers (DRAM and KMEM\_DAX).

- **-t** thresholds

  Turns on DYNAMIC\_THRESHOLD mode where small allocations are served from DRAM and large ones from far memory.  The syntax is described in depth in **man libmemtier**, eg. *-t INIT\_VAL=1024,MIN\_VAL=512,MAX\_VAL=65536* starts with a threshold of 1024, then varies it between 512..65536 attempting to match the requested ratio.

- **-v**

  Displays settings that are passed to **libmemtier**.

- **-h**

  Shows a help message then exits.

## CAVEATS

This tool doesn't expose all features of **libmemtier**.  Only DRAM and KMEM\_DAX memory is supported, to use FS\_DAX you need to configure the library directly, please refer to its man page.

Or alternatively, you can switch that memory to KMEM\_DAX mode.  For that purpose, please refer to "man ndctl-reconfigure-namespace" and "man daxctl-reconfigure-device".

## SEE ALSO

**[libmemtier(7)](/libmemtier/7.md)**, **[memkind(3)](/memkind/3.md)**, **[malloc(3)](/malloc/3.md)**
