Skip to content

Commit

Permalink
Merge cgroups and environment variables for the resource allocation t…
Browse files Browse the repository at this point in the history
…able. (#56)

* Update seal-workers.md

* Update configuration.md

* Update seal-workers.md

* Apply suggestions from code review

* Adds detail shortcode blocks.

* Adds empty line after paragraph and before title.

Co-authored-by: Johnny <9611008+johnnymatthews@users.noreply.github.com>
  • Loading branch information
SgtCoin and johnnymatthews authored Jan 13, 2022
1 parent eadb97f commit 34d41a7
Show file tree
Hide file tree
Showing 2 changed files with 370 additions and 4 deletions.
366 changes: 362 additions & 4 deletions content/en/docs/set-up/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,25 +234,383 @@ Variables specific to the _Lotus daemon_:
- `LOTUS_CHAIN_INDEX_CACHE`: Sets the size for the epoch index cache. Defaults to `32768`. Increase if you perform frequent deep chain lookups for block heights far from the latest height.
- `LOTUS_BSYNC_MSG_WINDOW`: Sets the initial maximum window size for message fetching blocksync request. Set to 10-20 if you have an internet connection with low bandwidth.

Variables for resource allocation tuning (overrides settings in the resource allocation table).

{{< details "32G environment" >}}
```plaintext
AP_32G_BASE_MIN_MEMORY=1073741824
AP_32G_GPU_UTILIZATION=0
AP_32G_MAX_MEMORY=4294967296
AP_32G_MAX_PARALLELISM=1
AP_32G_MAX_PARALLELISM_GPU=0
AP_32G_MIN_MEMORY=4294967296
C1_32G_BASE_MIN_MEMORY=1073741824
C1_32G_GPU_UTILIZATION=0
C1_32G_MAX_MEMORY=1073741824
C1_32G_MAX_PARALLELISM=0
C1_32G_MAX_PARALLELISM_GPU=0
C1_32G_MIN_MEMORY=1073741824
C2_32G_BASE_MIN_MEMORY=34359738368
C2_32G_GPU_UTILIZATION=1
C2_32G_MAX_MEMORY=161061273600
C2_32G_MAX_PARALLELISM=-1
C2_32G_MAX_PARALLELISM_GPU=6
C2_32G_MIN_MEMORY=32212254720
GET_32G_BASE_MIN_MEMORY=0
GET_32G_GPU_UTILIZATION=0
GET_32G_MAX_MEMORY=1048576
GET_32G_MAX_PARALLELISM=0
GET_32G_MAX_PARALLELISM_GPU=0
GET_32G_MIN_MEMORY=1048576
PC1_32G_BASE_MIN_MEMORY=10485760
PC1_32G_GPU_UTILIZATION=0
PC1_32G_MAX_MEMORY=68719476736
PC1_32G_MAX_PARALLELISM=1
PC1_32G_MAX_PARALLELISM_GPU=0
PC1_32G_MIN_MEMORY=60129542144
PC2_32G_BASE_MIN_MEMORY=1073741824
PC2_32G_GPU_UTILIZATION=1
PC2_32G_MAX_MEMORY=16106127360
PC2_32G_MAX_PARALLELISM=-1
PC2_32G_MAX_PARALLELISM_GPU=6
PC2_32G_MIN_MEMORY=16106127360
UNS_32G_BASE_MIN_MEMORY=10485760
UNS_32G_GPU_UTILIZATION=0
UNS_32G_MAX_MEMORY=68719476736
UNS_32G_MAX_PARALLELISM=1
UNS_32G_MAX_PARALLELISM_GPU=0
UNS_32G_MIN_MEMORY=60129542144
```
{{< /details >}}

{{< details "512MB Environment" >}}
```plaintext
AP_512M_BASE_MIN_MEMORY=1073741824
AP_512M_GPU_UTILIZATION=0
AP_512M_MAX_MEMORY=1073741824
AP_512M_MAX_PARALLELISM=1
AP_512M_MAX_PARALLELISM_GPU=0
AP_512M_MIN_MEMORY=1073741824
C1_512M_BASE_MIN_MEMORY=1073741824
C1_512M_GPU_UTILIZATION=0
C1_512M_MAX_MEMORY=1073741824
C1_512M_MAX_PARALLELISM=0
C1_512M_MAX_PARALLELISM_GPU=0
C1_512M_MIN_MEMORY=1073741824
C2_512M_BASE_MIN_MEMORY=10737418240
C2_512M_GPU_UTILIZATION=1
C2_512M_MAX_MEMORY=1610612736
C2_512M_MAX_PARALLELISM=1
C2_512M_MAX_PARALLELISM_GPU=0
C2_512M_MIN_MEMORY=1073741824
GET_512M_BASE_MIN_MEMORY=0
GET_512M_GPU_UTILIZATION=0
GET_512M_MAX_MEMORY=1048576
GET_512M_MAX_PARALLELISM=0
GET_512M_MAX_PARALLELISM_GPU=0
GET_512M_MIN_MEMORY=1048576
PC1_512M_BASE_MIN_MEMORY=1048576
PC1_512M_GPU_UTILIZATION=0
PC1_512M_MAX_MEMORY=1073741824
PC1_512M_MAX_PARALLELISM=1
PC1_512M_MAX_PARALLELISM_GPU=0
PC1_512M_MIN_MEMORY=805306368
PC2_512M_BASE_MIN_MEMORY=1073741824
PC2_512M_GPU_UTILIZATION=0
PC2_512M_MAX_MEMORY=1610612736
PC2_512M_MAX_PARALLELISM=-1
PC2_512M_MAX_PARALLELISM_GPU=0
PC2_512M_MIN_MEMORY=1073741824
UNS_512M_BASE_MIN_MEMORY=1048576
UNS_512M_GPU_UTILIZATION=0
UNS_512M_MAX_MEMORY=1073741824
UNS_512M_MAX_PARALLELISM=1
UNS_512M_MAX_PARALLELISM_GPU=0
UNS_512M_MIN_MEMORY=805306368
```
{{< /details >}}

{{< details "64GB Environment" >}}
```plaintext
AP_64G_BASE_MIN_MEMORY=1073741824
AP_64G_GPU_UTILIZATION=0
AP_64G_MAX_MEMORY=8589934592
AP_64G_MAX_PARALLELISM=1
AP_64G_MAX_PARALLELISM_GPU=0
AP_64G_MIN_MEMORY=8589934592
C1_64G_BASE_MIN_MEMORY=1073741824
C1_64G_GPU_UTILIZATION=0
C1_64G_MAX_MEMORY=1073741824
C1_64G_MAX_PARALLELISM=0
C1_64G_MAX_PARALLELISM_GPU=0
C1_64G_MIN_MEMORY=1073741824
C2_64G_BASE_MIN_MEMORY=68719476736
C2_64G_GPU_UTILIZATION=1
C2_64G_MAX_MEMORY=204010946560
C2_64G_MAX_PARALLELISM=-1
C2_64G_MAX_PARALLELISM_GPU=6
C2_64G_MIN_MEMORY=64424509440
GET_64G_BASE_MIN_MEMORY=0
GET_64G_GPU_UTILIZATION=0
GET_64G_MAX_MEMORY=1048576
GET_64G_MAX_PARALLELISM=0
GET_64G_MAX_PARALLELISM_GPU=0
GET_64G_MIN_MEMORY=1048576
PC1_64G_BASE_MIN_MEMORY=10485760
PC1_64G_GPU_UTILIZATION=0
PC1_64G_MAX_MEMORY=137438953472
PC1_64G_MAX_PARALLELISM=1
PC1_64G_MAX_PARALLELISM_GPU=0
PC1_64G_MIN_MEMORY=120259084288
PC2_64G_BASE_MIN_MEMORY=1073741824
PC2_64G_GPU_UTILIZATION=1
PC2_64G_MAX_MEMORY=32212254720
PC2_64G_MAX_PARALLELISM=-1
PC2_64G_MAX_PARALLELISM_GPU=6
PC2_64G_MIN_MEMORY=32212254720
UNS_64G_BASE_MIN_MEMORY=10485760
UNS_64G_GPU_UTILIZATION=0
UNS_64G_MAX_MEMORY=137438953472
UNS_64G_MAX_PARALLELISM=1
UNS_64G_MAX_PARALLELISM_GPU=0
UNS_64G_MIN_MEMORY=120259084288
```
{{< /details >}}

{{< details "All Environment variables" >}}
```plaintext
AP_2K_BASE_MIN_MEMORY=2048
AP_2K_GPU_UTILIZATION=0
AP_2K_MAX_MEMORY=2048
AP_2K_MAX_PARALLELISM=1
AP_2K_MAX_PARALLELISM_GPU=0
AP_2K_MIN_MEMORY=2048
AP_32G_BASE_MIN_MEMORY=1073741824
AP_32G_GPU_UTILIZATION=0
AP_32G_MAX_MEMORY=4294967296
AP_32G_MAX_PARALLELISM=1
AP_32G_MAX_PARALLELISM_GPU=0
AP_32G_MIN_MEMORY=4294967296
AP_512M_BASE_MIN_MEMORY=1073741824
AP_512M_GPU_UTILIZATION=0
AP_512M_MAX_MEMORY=1073741824
AP_512M_MAX_PARALLELISM=1
AP_512M_MAX_PARALLELISM_GPU=0
AP_512M_MIN_MEMORY=1073741824
AP_64G_BASE_MIN_MEMORY=1073741824
AP_64G_GPU_UTILIZATION=0
AP_64G_MAX_MEMORY=8589934592
AP_64G_MAX_PARALLELISM=1
AP_64G_MAX_PARALLELISM_GPU=0
AP_64G_MIN_MEMORY=8589934592
AP_8M_BASE_MIN_MEMORY=8388608
AP_8M_GPU_UTILIZATION=0
AP_8M_MAX_MEMORY=8388608
AP_8M_MAX_PARALLELISM=1
AP_8M_MAX_PARALLELISM_GPU=0
AP_8M_MIN_MEMORY=8388608
C1_2K_BASE_MIN_MEMORY=2048
C1_2K_GPU_UTILIZATION=0
C1_2K_MAX_MEMORY=2048
C1_2K_MAX_PARALLELISM=0
C1_2K_MAX_PARALLELISM_GPU=0
C1_2K_MIN_MEMORY=2048
C1_32G_BASE_MIN_MEMORY=1073741824
C1_32G_GPU_UTILIZATION=0
C1_32G_MAX_MEMORY=1073741824
C1_32G_MAX_PARALLELISM=0
C1_32G_MAX_PARALLELISM_GPU=0
C1_32G_MIN_MEMORY=1073741824
C1_512M_BASE_MIN_MEMORY=1073741824
C1_512M_GPU_UTILIZATION=0
C1_512M_MAX_MEMORY=1073741824
C1_512M_MAX_PARALLELISM=0
C1_512M_MAX_PARALLELISM_GPU=0
C1_512M_MIN_MEMORY=1073741824
C1_64G_BASE_MIN_MEMORY=1073741824
C1_64G_GPU_UTILIZATION=0
C1_64G_MAX_MEMORY=1073741824
C1_64G_MAX_PARALLELISM=0
C1_64G_MAX_PARALLELISM_GPU=0
C1_64G_MIN_MEMORY=1073741824
C1_8M_BASE_MIN_MEMORY=8388608
C1_8M_GPU_UTILIZATION=0
C1_8M_MAX_MEMORY=8388608
C1_8M_MAX_PARALLELISM=0
C1_8M_MAX_PARALLELISM_GPU=0
C1_8M_MIN_MEMORY=8388608
C2_2K_BASE_MIN_MEMORY=2048
C2_2K_GPU_UTILIZATION=1
C2_2K_MAX_MEMORY=2048
C2_2K_MAX_PARALLELISM=1
C2_2K_MAX_PARALLELISM_GPU=0
C2_2K_MIN_MEMORY=2048
C2_32G_BASE_MIN_MEMORY=34359738368
C2_32G_GPU_UTILIZATION=1
C2_32G_MAX_MEMORY=161061273600
C2_32G_MAX_PARALLELISM=-1
C2_32G_MAX_PARALLELISM_GPU=6
C2_32G_MIN_MEMORY=32212254720
C2_512M_BASE_MIN_MEMORY=10737418240
C2_512M_GPU_UTILIZATION=1
C2_512M_MAX_MEMORY=1610612736
C2_512M_MAX_PARALLELISM=1
C2_512M_MAX_PARALLELISM_GPU=0
C2_512M_MIN_MEMORY=1073741824
C2_64G_BASE_MIN_MEMORY=68719476736
C2_64G_GPU_UTILIZATION=1
C2_64G_MAX_MEMORY=204010946560
C2_64G_MAX_PARALLELISM=-1
C2_64G_MAX_PARALLELISM_GPU=6
C2_64G_MIN_MEMORY=64424509440
C2_8M_BASE_MIN_MEMORY=8388608
C2_8M_GPU_UTILIZATION=1
C2_8M_MAX_MEMORY=8388608
C2_8M_MAX_PARALLELISM=1
C2_8M_MAX_PARALLELISM_GPU=0
C2_8M_MIN_MEMORY=8388608
GET_2K_BASE_MIN_MEMORY=0
GET_2K_GPU_UTILIZATION=0
GET_2K_MAX_MEMORY=1048576
GET_2K_MAX_PARALLELISM=0
GET_2K_MAX_PARALLELISM_GPU=0
GET_2K_MIN_MEMORY=1048576
GET_32G_BASE_MIN_MEMORY=0
GET_32G_GPU_UTILIZATION=0
GET_32G_MAX_MEMORY=1048576
GET_32G_MAX_PARALLELISM=0
GET_32G_MAX_PARALLELISM_GPU=0
GET_32G_MIN_MEMORY=1048576
GET_512M_BASE_MIN_MEMORY=0
GET_512M_GPU_UTILIZATION=0
GET_512M_MAX_MEMORY=1048576
GET_512M_MAX_PARALLELISM=0
GET_512M_MAX_PARALLELISM_GPU=0
GET_512M_MIN_MEMORY=1048576
GET_64G_BASE_MIN_MEMORY=0
GET_64G_GPU_UTILIZATION=0
GET_64G_MAX_MEMORY=1048576
GET_64G_MAX_PARALLELISM=0
GET_64G_MAX_PARALLELISM_GPU=0
GET_64G_MIN_MEMORY=1048576
GET_8M_BASE_MIN_MEMORY=0
GET_8M_GPU_UTILIZATION=0
GET_8M_MAX_MEMORY=1048576
GET_8M_MAX_PARALLELISM=0
GET_8M_MAX_PARALLELISM_GPU=0
GET_8M_MIN_MEMORY=1048576
PC1_2K_BASE_MIN_MEMORY=2048
PC1_2K_GPU_UTILIZATION=0
PC1_2K_MAX_MEMORY=2048
PC1_2K_MAX_PARALLELISM=1
PC1_2K_MAX_PARALLELISM_GPU=0
PC1_2K_MIN_MEMORY=2048
PC1_32G_BASE_MIN_MEMORY=10485760
PC1_32G_GPU_UTILIZATION=0
PC1_32G_MAX_MEMORY=68719476736
PC1_32G_MAX_PARALLELISM=1
PC1_32G_MAX_PARALLELISM_GPU=0
PC1_32G_MIN_MEMORY=60129542144
PC1_512M_BASE_MIN_MEMORY=1048576
PC1_512M_GPU_UTILIZATION=0
PC1_512M_MAX_MEMORY=1073741824
PC1_512M_MAX_PARALLELISM=1
PC1_512M_MAX_PARALLELISM_GPU=0
PC1_512M_MIN_MEMORY=805306368
PC1_64G_BASE_MIN_MEMORY=10485760
PC1_64G_GPU_UTILIZATION=0
PC1_64G_MAX_MEMORY=137438953472
PC1_64G_MAX_PARALLELISM=1
PC1_64G_MAX_PARALLELISM_GPU=0
PC1_64G_MIN_MEMORY=120259084288
PC1_8M_BASE_MIN_MEMORY=8388608
PC1_8M_GPU_UTILIZATION=0
PC1_8M_MAX_MEMORY=8388608
PC1_8M_MAX_PARALLELISM=1
PC1_8M_MAX_PARALLELISM_GPU=0
PC1_8M_MIN_MEMORY=8388608
PC2_2K_BASE_MIN_MEMORY=2048
PC2_2K_GPU_UTILIZATION=0
PC2_2K_MAX_MEMORY=2048
PC2_2K_MAX_PARALLELISM=-1
PC2_2K_MAX_PARALLELISM_GPU=0
PC2_2K_MIN_MEMORY=2048
PC2_32G_BASE_MIN_MEMORY=1073741824
PC2_32G_GPU_UTILIZATION=1
PC2_32G_MAX_MEMORY=16106127360
PC2_32G_MAX_PARALLELISM=-1
PC2_32G_MAX_PARALLELISM_GPU=6
PC2_32G_MIN_MEMORY=16106127360
PC2_512M_BASE_MIN_MEMORY=1073741824
PC2_512M_GPU_UTILIZATION=0
PC2_512M_MAX_MEMORY=1610612736
PC2_512M_MAX_PARALLELISM=-1
PC2_512M_MAX_PARALLELISM_GPU=0
PC2_512M_MIN_MEMORY=1073741824
PC2_64G_BASE_MIN_MEMORY=1073741824
PC2_64G_GPU_UTILIZATION=1
PC2_64G_MAX_MEMORY=32212254720
PC2_64G_MAX_PARALLELISM=-1
PC2_64G_MAX_PARALLELISM_GPU=6
PC2_64G_MIN_MEMORY=32212254720
PC2_8M_BASE_MIN_MEMORY=8388608
PC2_8M_GPU_UTILIZATION=0
PC2_8M_MAX_MEMORY=8388608
PC2_8M_MAX_PARALLELISM=-1
PC2_8M_MAX_PARALLELISM_GPU=0
PC2_8M_MIN_MEMORY=8388608
UNS_2K_BASE_MIN_MEMORY=2048
UNS_2K_GPU_UTILIZATION=0
UNS_2K_MAX_MEMORY=2048
UNS_2K_MAX_PARALLELISM=1
UNS_2K_MAX_PARALLELISM_GPU=0
UNS_2K_MIN_MEMORY=2048
UNS_32G_BASE_MIN_MEMORY=10485760
UNS_32G_GPU_UTILIZATION=0
UNS_32G_MAX_MEMORY=68719476736
UNS_32G_MAX_PARALLELISM=1
UNS_32G_MAX_PARALLELISM_GPU=0
UNS_32G_MIN_MEMORY=60129542144
UNS_512M_BASE_MIN_MEMORY=1048576
UNS_512M_GPU_UTILIZATION=0
UNS_512M_MAX_MEMORY=1073741824
UNS_512M_MAX_PARALLELISM=1
UNS_512M_MAX_PARALLELISM_GPU=0
UNS_512M_MIN_MEMORY=805306368
UNS_64G_BASE_MIN_MEMORY=10485760
UNS_64G_GPU_UTILIZATION=0
UNS_64G_MAX_MEMORY=137438953472
UNS_64G_MAX_PARALLELISM=1
UNS_64G_MAX_PARALLELISM_GPU=0
UNS_64G_MIN_MEMORY=120259084288
UNS_8M_BASE_MIN_MEMORY=8388608
UNS_8M_GPU_UTILIZATION=0
UNS_8M_MAX_MEMORY=8388608
UNS_8M_MAX_PARALLELISM=1
UNS_8M_MAX_PARALLELISM_GPU=0
UNS_8M_MIN_MEMORY=8388608
```
{{< /details >}}

## Controlling a remote daemon

The `lotus` application, as a client to the lotus daemon, can talk to a Lotus daemon running on any location (not just the local one), by setting the following environment variable:

```sh
```shell
FULLNODE_API_INFO="TOKEN:/ip4/<IP>/tcp/<PORT>/http"
```

On the _Lotus Node_, the full variable string, including a new token, can be produced with:

```sh
```shell
lotus auth api-info --perm admin
```

Note that you may need to edit the result to place the right IP for the remote node. See the [docs about API tokens]({{< relref "../developers/api-access" >}}) for more information about tokens.

## Log level control

```sh
```shell
lotus log set-level <level>
```

Expand All @@ -264,7 +622,7 @@ As an example, to set the `chain` and `blocksync` to log at the `debug` level, r

To see the various logging systems, run:

```sh
```shell
lotus log list
```

Expand Down
Loading

0 comments on commit 34d41a7

Please sign in to comment.