[GH-ISSUE #10367] Slow progressive memory usage increase (Ollama server) #6811

Closed
opened 2026-04-12 18:35:52 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @Belluxx on GitHub (Apr 22, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10367

What is the issue?

I am running Ollama with OLLAMA_KEEP_ALIVE 1m and OLLAMA_CONTEXT_LENGTH "8192".
Model tested: Gemma 3 27B Q4 QAT

The server is receiving around 1 request per minute (sequentially, only one at a time), and i am seeing an increase from the initial 30GB of RAM usage (right after starting the server) up to 50GB 3/4 hours later (so after hundreds of requests). It is continuing to rise, and appears to be a linear slow increase.

Maybe this due to prompt caching not discarding old cached prompts?

Relevant log output


OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.6.5

Originally created by @Belluxx on GitHub (Apr 22, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10367 ### What is the issue? I am running Ollama with `OLLAMA_KEEP_ALIVE 1m` and `OLLAMA_CONTEXT_LENGTH "8192"`. Model tested: `Gemma 3 27B Q4 QAT` The server is receiving around 1 request per minute (sequentially, only one at a time), and i am seeing an increase from the initial 30GB of RAM usage (right after starting the server) up to 50GB 3/4 hours later (so after hundreds of requests). It is continuing to rise, and appears to be a linear slow increase. Maybe this due to prompt caching not discarding old cached prompts? ### Relevant log output ```shell ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.6.5
GiteaMirror added the bug label 2026-04-12 18:35:52 -05:00
Author
Owner

@rick-github commented on GitHub (Apr 22, 2025):

#10040

<!-- gh-comment-id:2821022962 --> @rick-github commented on GitHub (Apr 22, 2025): #10040
Author
Owner

@Belluxx commented on GitHub (Apr 22, 2025):

Sorry, i tried to search for similar issues and didn't find that one. I see that a fix was already pushed but it will be released in the next versions, thanks!

<!-- gh-comment-id:2821065321 --> @Belluxx commented on GitHub (Apr 22, 2025): Sorry, i tried to search for similar issues and didn't find that one. I see that a fix was already pushed but it will be released in the next versions, thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#6811