Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CARDANO_NODE_RTS_OPTIONS env to docker image #5657

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ch1bo
Copy link
Contributor

@ch1bo ch1bo commented Jan 31, 2024

This allows to set Haskell RTS options through the docker image by providing an environment variable on a docker run command.

For example:

docker run --rm -it -e CARDANO_NODE_RTS_OPTIONS="-N" cardano-node run

will start the node with RTS option -N (utilizing all cores):

Running the cardano node ...
CARDANO_BIND_ADDR=0.0.0.0
CARDANO_BLOCK_PRODUCER=false
CARDANO_CONFIG=/opt/cardano/config/mainnet-config.json
CARDANO_DATABASE_PATH=/opt/cardano/data
CARDANO_LOG_DIR=/opt/cardano/logs
CARDANO_PORT=3001
CARDANO_SOCKET_PATH=/opt/cardano/ipc/socket
CARDANO_TOPOLOGY=/opt/cardano/config/mainnet-topology.json
CARDANO_NODE_RTS_OPTIONS=-N
cardano-node run --config /opt/cardano/config/mainnet-config.json --topology /opt/cardano/config/mainnet-topology.json --database-path /opt/cardano/data --socket-path /opt/cardano/ipc/socket --host-addr 0.0.0.0 --port 3001 +RTS -N -RTS

Related issues (asking for more or less cpu usage, although unclear whether the docker image is used): #5330 and #5500

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated.
    • No tests about docker image found
  • Any changes are noted in the CHANGELOG.md for affected package
    • The cadano-node/changelog.md seems VERY outdated on master?
  • The version bounds in .cabal files are updated
    • Not needed
  • CI passes. See note on CI. The following CI checks are required:
    • N/A
  • Self-reviewed the diff

@ch1bo ch1bo requested a review from a team February 2, 2024 16:30
Copy link

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale label Mar 19, 2024
@ch1bo ch1bo force-pushed the rts-options-in-docker-image branch from 0fc322c to aeaaf07 Compare March 19, 2024 17:38
@ch1bo ch1bo requested review from a team as code owners March 19, 2024 17:38
@github-actions github-actions bot removed the Stale label Mar 20, 2024
Copy link

github-actions bot commented May 4, 2024

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale label May 4, 2024
Copy link
Contributor

@angerman angerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can see a reason not to do this.

@github-actions github-actions bot removed the Stale label May 5, 2024
This allows to set Haskell RTS options through the docker image by
providing an environment variable on a docker run command.

For example:

```
docker run --rm -it -e CARDANO_NODE_RTS_OPTIONS="-N" cardano-node run
```

will start the node with RTS option -N (utilizing all cores):

```
Running the cardano node ...
CARDANO_BIND_ADDR=0.0.0.0
CARDANO_BLOCK_PRODUCER=false
CARDANO_CONFIG=/opt/cardano/config/mainnet-config.json
CARDANO_DATABASE_PATH=/opt/cardano/data
CARDANO_LOG_DIR=/opt/cardano/logs
CARDANO_PORT=3001
CARDANO_SOCKET_PATH=/opt/cardano/ipc/socket
CARDANO_TOPOLOGY=/opt/cardano/config/mainnet-topology.json
CARDANO_NODE_RTS_OPTIONS=-N
cardano-node run --config /opt/cardano/config/mainnet-config.json --topology /opt/cardano/config/mainnet-topology.json --database-path /opt/cardano/data --socket-path /opt/cardano/ipc/socket --host-addr 0.0.0.0 --port 3001 +RTS -N -RTS
```
@ch1bo ch1bo force-pushed the rts-options-in-docker-image branch from aeaaf07 to 94974db Compare May 23, 2024 10:37
@ch1bo
Copy link
Contributor Author

ch1bo commented May 23, 2024

@angerman I assume you meant "can not see a reason not to do it" given your approval

@ch1bo ch1bo enabled auto-merge May 23, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants