Updated commands to increase max unified memory usage on Framework Desktop under Fedora 43?

Omarchy uses Limine and to increase the GTT pool

# sudo nano /etc/default/limine
# Place just below the previous KERNEL_CMDLINE[default]+="quiet splash"
KERNEL_CMDLINE[default]+="ttm.pages_limit=25165824"

Then update Limine and generate UKI

sudo limine-update

Then reboot

in windows disable mmap() helps. no need to load the model twice into ram…

For Fedora 43 the valid command is this:

sudo grubby --update-kernel=ALL --args='ttm.pages_limit=27648000 ttm.page_pool_size= 27648000'

Both ttm.pages_limit and ttm.page_pool_size seems to default to half of the RAM size, see: drivers/gpu/drm/ttm/ttm_device.c:88-100. So changing just one parameter won’t change the other one automatically.

You can calculate the number of pages somewhat like this (just replace 100 with # of GB):

python3 -c "print(100 * 1024**3 // 4096)"

Also, @roosmaa above mentioned amdgpu.gttsize. Don’t use it. It is deprecated, see: amdgpu — Module Parameters — gttsize. Unless you explicitly touch this deprecated parameter, ttm.* are the only thing you need to change.

1 Like

Changing the page pool size is unnecessary for 99% of people. Just change the page limit.

and on fedora (and may be on other modern systemd OS) leave this boot/grub kernel parameter alone and use systemd :

#> create a file: /etc/modprobe.d/ttm.conf
and add contain:

options ttm pages_limit=27648000

it’s much easier to change and what amd-ttm --set <NUM> did, like Mario_Limonciello point.

and in some case it is even not needed, for llama.cpp rocm simply set this env before use it:

export GGML_CUDA_ENABLE_UNIFIED_MEMORY=ON 
1 Like