#5587·OpenBLAS

2 GB at the start

Author: tim-lebedkovCreated Dec 29, 2025Updated Jul 2, 2026
LabelsSupport

Just entering the main() in a program linking to "openblas" under MSYS2 consumes 2 GB of RAM. VMMap shows it as 16 blocks 128 MB each. Are these allocations necessary? Can they be postponed to when I really need something from OpenBLAS?

Image

Setting these variables reduces the memory to 600 MB. It looks like 128 MB is allocated per thread in DLLMain

set OPENBLAS_NUM_THREADS=4
set GOTO_NUM_THREADS=4
set OMP_NUM_THREADS=4

This does not help either: openblas_set_num_threads(1);

The original issue was against libllama: https://github.com/ggml-org/llama.cpp/issues/18024