cats-effect
cats-effect copied to clipboard
Detect when IORuntime is inside a container with too-small cpu configured
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:
- https://developers.redhat.com/articles/2022/04/19/java-17-whats-new-openjdks-container-awareness
- https://stackoverflow.com/questions/23513045/how-to-check-if-a-process-is-running-inside-docker-container