[GH-ISSUE #8654] Available memory check should be disabled when mmap is in use #31368

Open
opened 2026-04-22 11:46:08 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @outis151 on GitHub (Jan 29, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8654

What is the issue?

With mmap enabled, a model does not need to fit in the system RAM. Therefore the associated check should be disabled in this case.

OS

Linux

GPU

No response

CPU

Intel

Ollama version

0.5.7

Originally created by @outis151 on GitHub (Jan 29, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8654 ### What is the issue? With mmap enabled, a model does not need to fit in the system RAM. Therefore the associated check should be disabled in this case. ### OS Linux ### GPU _No response_ ### CPU Intel ### Ollama version 0.5.7
GiteaMirror added the bug label 2026-04-22 11:46:08 -05:00
Author
Owner

@outis151 commented on GitHub (Jan 29, 2025):

In fact, deepseek-r1:671b (404 GB) is able to run on my system with only 128GB of RAM with mmap enabled if i fake the memory information to ollama.

To fake the memory information to ollama, the following systemd directive needs to be added:
BindReadOnlyPaths=/root/meminfo:/proc/meminfo
and a modified /proc/meminfo file needs to be copied to /root/meminfo

<!-- gh-comment-id:2621589918 --> @outis151 commented on GitHub (Jan 29, 2025): In fact, deepseek-r1:671b (404 GB) is able to run on my system with only 128GB of RAM with `mmap` enabled if i fake the memory information to ollama. To fake the memory information to ollama, the following systemd directive needs to be added: `BindReadOnlyPaths=/root/meminfo:/proc/meminfo` and a modified `/proc/meminfo` file needs to be copied to` /root/meminfo`
Author
Owner

@DrShadow34 commented on GitHub (Feb 4, 2025):

Can we bump priority on this one? I do believe that feature wise we all set to run deepseek with caching on ollama, this bug is only thing preventing it from working out of the box.

<!-- gh-comment-id:2634346442 --> @DrShadow34 commented on GitHub (Feb 4, 2025): Can we bump priority on this one? I do believe that feature wise we all set to run deepseek with caching on ollama, this bug is only thing preventing it from working out of the box.
Author
Owner

@Al2Klimov commented on GitHub (Feb 4, 2025):

FWIW, I helped myself with 9592dff5055b45a2a3b4cb487d4f18f247614f58

<!-- gh-comment-id:2634847315 --> @Al2Klimov commented on GitHub (Feb 4, 2025): FWIW, I helped myself with 9592dff5055b45a2a3b4cb487d4f18f247614f58
Author
Owner

@rick-github commented on GitHub (Feb 8, 2025):

https://github.com/ollama/ollama/pull/8895

<!-- gh-comment-id:2644462057 --> @rick-github commented on GitHub (Feb 8, 2025): https://github.com/ollama/ollama/pull/8895
Author
Owner

@xgdgsc commented on GitHub (Feb 14, 2025):

And I feel mmap is broken in recent 2 releases. It doesn' t work like mmap, instead it loads to process memory.

<!-- gh-comment-id:2658124110 --> @xgdgsc commented on GitHub (Feb 14, 2025): And I feel mmap is broken in recent 2 releases. It doesn' t work like mmap, instead it loads to process memory.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#31368