opencode uses ~30-50% CPU per process and slows LLM responses to a crawl #491

Closed
opened 2026-02-16 17:27:03 -05:00 by yindo · 5 comments
Owner

Originally created by @bczsalba on GitHub (Jul 4, 2025).

Originally assigned to: @thdxr on GitHub.

Again, only happens on my Ubuntu machine. Claude Sonnet 4 with API credentials, didn't use to happen as late as 0.1.172 and definitely was a problem by 0.1.176. I can pinpoint it down further in a few hours if necessary.

Immediately on the compose screen it ramps to around 20-30% CPU usage per process, but I've also seen it as high as 70-90% PP. LLM responses slow down with increased CPU usage too. That part could be throttling on the OS side, but I don't see a reason this machine should have much of a problem running opencode.

Image
Image

Originally created by @bczsalba on GitHub (Jul 4, 2025). Originally assigned to: @thdxr on GitHub. Again, only happens on my Ubuntu machine. Claude Sonnet 4 with API credentials, didn't use to happen as late as 0.1.172 and definitely was a problem by 0.1.176. I can pinpoint it down further in a few hours if necessary. Immediately on the compose screen it ramps to around 20-30% CPU usage per process, but I've also seen it as high as 70-90% PP. LLM responses slow down with increased CPU usage too. That part could be throttling on the OS side, but I don't see a reason this machine should have much of a problem running opencode. ![Image](https://github.com/user-attachments/assets/c6cf1694-46e9-44bf-be36-b37fc68d4469) ![Image](https://github.com/user-attachments/assets/9560b0c0-8009-4a0b-a556-e7073f9c596e)
yindo closed this issue 2026-02-16 17:27:03 -05:00
Author
Owner

@thdxr commented on GitHub (Jul 4, 2025):

can you check if thi sis happening in in 0.1.190?

@thdxr commented on GitHub (Jul 4, 2025): can you check if thi sis happening in in 0.1.190?
Author
Owner

@bczsalba commented on GitHub (Jul 4, 2025):

Yep, seems roughly the same:

(~2s after startup)
Image

Looking at it more it's a bit more interesting - it seems like it "idles" at around 25-35%, and after a few seconds (10 the first time, ~15 the second) it ramps up to around 90-100 per process. It then stays there for a few seconds, before eventually dropping back down to idle in around 2-4s.

Timings don't seem consistent, and I only "time"-d 2 cycles (but I witnessed it ~4 times back to back so it probably is a loop of some sort).

Let me know what else I can do to help!

@bczsalba commented on GitHub (Jul 4, 2025): Yep, seems roughly the same: (~2s after startup) <img width="1870" height="852" alt="Image" src="https://github.com/user-attachments/assets/4a1d41e3-30ca-48f1-98d0-d3c646f11571" /> Looking at it more it's a bit more interesting - it seems like it "idles" at around 25-35%, and after a few seconds (10 the first time, ~15 the second) it ramps up to around 90-100 per process. It then stays there for a few seconds, before eventually dropping back down to idle in around 2-4s. Timings don't seem consistent, and I only "time"-d 2 cycles (but I witnessed it ~4 times back to back so it probably is a loop of some sort). Let me know what else I can do to help!
Author
Owner

@bczsalba commented on GitHub (Jul 8, 2025):

@thdxr seems fixed as of 0.2.5, no clue why (again, lmao). cheers!

@bczsalba commented on GitHub (Jul 8, 2025): @thdxr seems fixed as of 0.2.5, no clue why (again, lmao). cheers!
Author
Owner

@bczsalba commented on GitHub (Jul 8, 2025):

Actually nevermind, still broken. Not sure why it wasn't that one time.

@bczsalba commented on GitHub (Jul 8, 2025): Actually nevermind, still broken. Not sure why it wasn't that one time.
Author
Owner

@bczsalba commented on GitHub (Jul 15, 2025):

okay it seems fully gone now, i'll make a new issue if it ever comes back since it should be unrelated by then. cheers!

@bczsalba commented on GitHub (Jul 15, 2025): okay it seems fully gone now, i'll make a new issue if it ever comes back since it should be unrelated by then. cheers!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#491