[PR #2221] [MERGED] adjust download and upload concurrency based on available bandwidth #21365

Closed
opened 2026-04-19 15:35:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/2221
Author: @mxyng
Created: 1/26/2024
Status: Merged
Merged: 3/7/2024
Merged by: @mxyng

Base: mainHead: mxyng/up-down-ccy


📝 Commits (6)

📊 Changes

2 files changed (+106 additions, -17 deletions)

View changed files

📝 server/download.go (+100 -13)
📝 server/upload.go (+6 -4)

📄 Description

use basic heuristics to determine concurrency.

  1. start with 2 concurrency
  2. watch the rate
  3. if the rate is increasing, add more concurrency
  4. stop adding concurrency if the rate plateaus

this only scales concurrency up, never down


🔄 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/2221 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 1/26/2024 **Status:** ✅ Merged **Merged:** 3/7/2024 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/up-down-ccy` --- ### 📝 Commits (6) - [`917bd61`](https://github.com/ollama/ollama/commit/917bd6108458990b554a8ff8f6535a861fd37f0e) refactor download run - [`0de1236`](https://github.com/ollama/ollama/commit/0de12368a0f5c96c26e5411311f95b39c02f0df2) add new LimitGroup for dynamic concurrency - [`074934b`](https://github.com/ollama/ollama/commit/074934be030305f5e6c3743d0ecd0ee6fd172de5) adjust group limit based on download speed - [`bea007d`](https://github.com/ollama/ollama/commit/bea007deb7bf3ba013aa503c9d9e3f23074c76ac) use LimitGroup for uploads - [`6a4b994`](https://github.com/ollama/ollama/commit/6a4b994433962ae95179c96f15c9888f14c97526) lint - [`084d846`](https://github.com/ollama/ollama/commit/084d8466216cc1f6ad1b00a16f309bcf07fc08bf) refactor ### 📊 Changes **2 files changed** (+106 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `server/download.go` (+100 -13) 📝 `server/upload.go` (+6 -4) </details> ### 📄 Description use basic heuristics to determine concurrency. 1. start with 2 concurrency 2. watch the rate 3. if the rate is increasing, add more concurrency 4. stop adding concurrency if the rate plateaus this only scales concurrency up, never down --- <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-19 15:35:57 -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#21365