Skip to content

High CPU overhead caused by console output in running containers #389

@ananos

Description

@ananos

When running workloads under Urunc, enabling or producing console output (stdout/stderr) results in significant and sustained CPU usage on the host, even when the application itself is otherwise idle or lightly loaded.

This behavior suggests that console output handling (e.g., logging, polling, forwarding, or buffering) introduces non-trivial overhead that scales with runtime duration and/or output frequency, negatively impacting performance and efficiency.

Steps to Reproduce

  • Launch a container or unikernel using Urunc with console output enabled.
  • Run an application that:
    • Periodically prints to stdout/stderr (e.g., logging every few milliseconds), or
    • Produces moderate continuous output.
  • Observe host CPU usage using top, htop, or perf.

Expected Behavior

  • Console output handling should incur minimal CPU overhead.
  • CPU usage should primarily reflect the application’s actual workload.
  • Idle or low-output applications should not cause noticeable host CPU utilization.

Actual Behavior

  • Host CPU usage increases when console output is enabled.
  • CPU overhead persists even for lightweight applications.
  • Disabling console output drastically reduces CPU consumption.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreRelated to urunc's internalsbugSomething isn't workingdebugRelated to debugging

    Type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions