Skip to content

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

Closed

Description

@bczsalba

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

Activity

  1. changed the title [-]opencode uses ~30-50% cpu per and slows llm responses to a crawl[/-] [+]opencode uses ~30-50% CPU per process and slows LLM responses to a crawl[/+] on Jul 4, 2025
  2. thdxr commented on Jul 4, 2025

    @thdxr
    Member

    can you check if thi sis happening in in 0.1.190?

  3. self-assigned this
    on Jul 4, 2025
  4. bczsalba commented on Jul 4, 2025

    @bczsalba
    Author

    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!

  5. bczsalba commented on Jul 8, 2025

    @bczsalba
    Author

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

  6. bczsalba commented on Jul 8, 2025

    @bczsalba
    Author

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

  7. bczsalba commented on Jul 15, 2025

    @bczsalba
    Author

    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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions