typelevel / typelevel/cats-effect

Detect when IORuntime is inside a container with too-small cpu configured

Open
#3,751 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
2.2k
Forks
576
Avg merge
2d 11h
Merged PRs (30d)
18

Description

Related to #3750 I think this would be a good addition:

  • On IORuntime initialization
  • Detect if we are inside a container (method TBD)
  • If we are, check the available cpu count
  • If 1, we probably are in a container environment where the core count has not been configured in a way that is appropriate for CE
  • Print a warning message once

All that behavior should also be able to be disabled similar to the other runtime utilities using a property/-Darg

Possibly useful info:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at IORuntime initialization and review how runtime utilities expose disablement properties or -D arguments. Determine how container detection and available CPU count should be checked, then ensure the warning is emitted once and can be disabled. Done means the behavior covers the described container case without affecting non-container initialization.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.