[PR #9321] server: Add OLLAMA_NUM_PULL_PARTS environment variable to reduce stall occurrences #18187

Open
opened 2026-04-16 06:27:36 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9321
Author: @monolith-jaehoon
Created: 2/24/2025
Status: 🔄 Open

Base: mainHead: feature-add_env-parts_num


📝 Commits (1)

  • e4b095a server: Add OLLAMA_NUM_PULL_PARTS environment variable to reduce stall occurrences

📊 Changes

2 files changed (+14 additions, -3 deletions)

View changed files

📝 envconfig/config.go (+11 -0)
📝 server/download.go (+3 -3)

📄 Description

In poor network conditions, such as when QoS is applied, downloading with the current 16 parts often results in only one part being transmitted while the remaining 15 parts are not. This leads to a stalled message after 30 seconds of inactivity, causing the progress to regress. The goal is to reduce stall occurrences by allowing the adjustment of the number of parts.

In cases of poor network conditions, it is recommended to set OLLAMA_NUM_PULL_PARTS to 1.

I believe this change could help address issues like #8484, #8406, and #8330.


🔄 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/9321 **Author:** [@monolith-jaehoon](https://github.com/monolith-jaehoon) **Created:** 2/24/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature-add_env-parts_num` --- ### 📝 Commits (1) - [`e4b095a`](https://github.com/ollama/ollama/commit/e4b095a058807c78e4662df06b5ce63498a2fd3b) server: Add `OLLAMA_NUM_PULL_PARTS` environment variable to reduce stall occurrences ### 📊 Changes **2 files changed** (+14 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `envconfig/config.go` (+11 -0) 📝 `server/download.go` (+3 -3) </details> ### 📄 Description In poor network conditions, such as when QoS is applied, downloading with the current 16 parts often results in only one part being transmitted while the remaining 15 parts are not. This leads to a stalled message after 30 seconds of inactivity, causing the progress to regress. The goal is to reduce stall occurrences by allowing the adjustment of the number of parts. In cases of poor network conditions, it is recommended to set `OLLAMA_NUM_PULL_PARTS` to 1. I believe this change could help address issues like #8484, #8406, and #8330. --- <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-16 06:27:36 -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#18187