[GH-ISSUE #15598] MLX backend for image generation wastes a lot of CPU time #72015

Open
opened 2026-05-05 03:19:25 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @yurivict on GitHub (Apr 15, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15598

Here is the threads load pattern:

Image

ollama runs 77 threads of which 32 theads perodically become active in bursts. Only 1 CPU is active for long periods of time between bursts. It looks like only ~30% of CPU is actually used on average.

This program was used to measure the CPU load and to make this plot.

CPU: AMD Ryzen 9 9950X 16-Core Processor
Version: 0.20.7
OS: FreeBSD 15 STABLE

Originally created by @yurivict on GitHub (Apr 15, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15598 Here is the threads load pattern: <img width="2735" height="1166" alt="Image" src="https://github.com/user-attachments/assets/37220429-9738-41e0-a8d2-aaed535dfffe" /> ollama runs 77 threads of which 32 theads perodically become active in bursts. Only 1 CPU is active for long periods of time between bursts. It looks like only ~30% of CPU is actually used on average. [This program](https://freebsd.org/~yuri/monitor-process-active-threads.py) was used to measure the CPU load and to make this plot. CPU: AMD Ryzen 9 9950X 16-Core Processor Version: 0.20.7 OS: FreeBSD 15 STABLE
Author
Owner

@PureBlissAK commented on GitHub (Apr 18, 2026):

🤖 Automated Triage & Analysis Report

Issue: #15598
Analyzed: 2026-04-18T18:19:32.814856

Analysis

  • Type: unknown
  • Severity: medium
  • Components: unknown

Implementation Plan

  • Effort: medium
  • Steps:

This issue has been triaged and marked for implementation.

<!-- gh-comment-id:4274305076 --> @PureBlissAK commented on GitHub (Apr 18, 2026): <!-- ollama-issue-orchestrator:v1 issue:15598 --> ## 🤖 Automated Triage & Analysis Report **Issue**: #15598 **Analyzed**: 2026-04-18T18:19:32.814856 ### Analysis - **Type**: unknown - **Severity**: medium - **Components**: unknown ### Implementation Plan - **Effort**: medium - **Steps**: *This issue has been triaged and marked for implementation.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#72015