Skip to content

Web terminal can consume too much of coderd CPU resources #11039

Open
@mafredri

Description

@mafredri

In a scaletest determining the effect of a greedy agent/user we discovered that a single web terminal (reconnecting PTY) can use up all of coderd CPU resources.

image

The following pprof dumps are from the middle of the "Phase 5: Web Terminal Traffic" as highlighted in the graph:

pprof-allocs-coder-64c4996857-cdckw-1701443704.gz
pprof-block-coder-64c4996857-cdckw-1701443704.gz
pprof-goroutine-coder-64c4996857-cdckw-1701443704.gz
pprof-heap-coder-64c4996857-cdckw-1701443704.gz
pprof-mutex-coder-64c4996857-cdckw-1701443704.gz
pprof-profile_seconds_10-coder-64c4996857-cdckw-1701443704.gz
pprof-trace_seconds_5-coder-64c4996857-cdckw-1701443704.gz

It's fairly easy for a user to do this by accident, as demonstrated in #11036.

Refs #8556 #11036

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP APInetworkingArea: networking

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions