[PR #5194] [MERGED] Refine mmap default logic on linux #11709

Closed
opened 2026-04-12 23:36:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5194
Author: @dhiltgen
Created: 6/20/2024
Status: Merged
Merged: 6/20/2024
Merged by: @dhiltgen

Base: mainHead: linux_mmap_auto


📝 Commits (1)

  • 5bf5aee Refine mmap default logic on linux

📊 Changes

1 file changed (+16 additions, -12 deletions)

View changed files

📝 llm/server.go (+16 -12)

📄 Description

If we try to use mmap when the model is larger than the system free space, loading is slower than the no-mmap approach.

This should resolve multiple issues where model loads stalled for longer than 5 minutes on some systems and caused our timeout to trigger. When those users forced use_mmap=false, things sped up significantly, so this should handle it automatically.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/5194 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 6/20/2024 **Status:** ✅ Merged **Merged:** 6/20/2024 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `linux_mmap_auto` --- ### 📝 Commits (1) - [`5bf5aee`](https://github.com/ollama/ollama/commit/5bf5aeec0140a70eeb94b65c61dbb3b75ff33e56) Refine mmap default logic on linux ### 📊 Changes **1 file changed** (+16 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `llm/server.go` (+16 -12) </details> ### 📄 Description If we try to use mmap when the model is larger than the system free space, loading is slower than the no-mmap approach. This should resolve multiple issues where model loads stalled for longer than 5 minutes on some systems and caused our timeout to trigger. When those users forced use_mmap=false, things sped up significantly, so this should handle it automatically. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:36:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#11709