Skip to content

xl-agent benchmark: Cats Effect CPU starvation warnings during streaming #198

@arcaputo3

Description

@arcaputo3

Problem

When running benchmarks with --stream flag, Cats Effect emits repeated CPU starvation warnings:

WARNING: Your app's responsiveness to a new asynchronous event (such as a new connection, 
an upstream response, or a timer) was in excess of 100 milliseconds. Your CPU is probably 
starving. Consider increasing the granularity of your delays or adding more cedes. This may 
also be a sign that you are unintentionally running blocking I/O operations (such as File 
or InetAddress) without the blocking combinator.

This warning appears 80+ times during a single benchmark run.

Likely Cause

Blocking I/O operations (file reads, network calls) not wrapped in IO.blocking { ... } or IO.interruptible { ... }.

Areas to Investigate

  1. File operations in benchmark runner - reading/writing Excel files
  2. Network calls to Anthropic API - might need proper async handling
  3. Process execution - running xl CLI commands

Files to Check

  • xl-agent/src/com/tjclp/xl/agent/benchmark/ - Benchmark runner code
  • xl-agent/src/com/tjclp/xl/agent/anthropic/ - API client code

Impact

  • Performance degradation during benchmarks
  • Potential timeout issues
  • Not a correctness bug, but affects reliability

Context

Observed during SpreadsheetBench task 2768 with --parallelism 3 --stream flags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions