Skip to content

Commit

Permalink
Merge pull request #692 from autonomys/cli-parameter-changes
Browse files Browse the repository at this point in the history
Rename command line parameters that have changed
  • Loading branch information
EmilFattakhov authored Oct 18, 2024
2 parents 7e2c505 + a4263de commit f53eb21
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ subspace-farmer cluster --nats-server nats://<NATS_IP>:4222 \
path=/path/to/farm,size=SIZE
```

Replace **`<NATS_IP>`** with your NATS server IP address and provide your reward address, farm paths, and sizes. Optional parameters include **`--sector-encoding-concurrency`**, **`--farming-thread-pool-size`**, **`--disable-farm-locking`**, and **`--create`**.
Replace **`<NATS_IP>`** with your NATS server IP address and provide your reward address, farm paths, and sizes. Optional parameters include **`--cpu-sector-encoding-concurrency`** or **`--cuda-sector-downloading-concurrency`**, **`--farming-thread-pool-size`**, **`--disable-farm-locking`**, and **`--create`**.

### Plotter

Expand Down
23 changes: 10 additions & 13 deletions docs/farming-&-staking/farming/advanced-cli/cli-tips.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,16 @@ Explore the Autonomys Network in depth with our variety of telemetry tools and b

### Snap Sync

As of the June 11, 2024 version, a new option called Snap Sync is available for fast syncing. It only works for the initial sync, but allow your node to be fully synced within hours instead of days. The parameter is `--sync snap`. Currently, Snap Sync only works with a farming node, not an operator node.
Snap Sync works by jumping to near the end of the chain, allowing you to sync to the current block more quickly. Once the initial jump is complete, it behaves like a full sync. In fact, if you haven't synced for more than a few days, it might be quicker to remove the node database and let Snap Sync quickly sync to the most current block.

Snap Sync works by jumping to near the end of the chain, allowing you to sync to the current block more quickly. Once the initial jump is complete, it behaves like a full sync. In fact, if you haven't synced for more than a few days, it might be quicker to remove the node database and use Snap Sync to quickly sync to the most current block.
There are cases where you might not want to use Snap Sync. To perform a full sync you can either omit the sync parameter, or use `--sync full`. This is useful if you want to run an RPC node for public use, become an operator or indexing. In that case, you would need to run an archival node, not just a pruned node. An archival node requires a full sync.

There are cases where you might not want to use Snap Sync. To perform a full sync you can either omit the sync parameter, or use `--sync full`. This is useful if you want to run an RPC node for public use or indexing. In that case, you would need to run an archival node, not just a pruned node. An archival node requires a full sync.

### Plotting concurrency (CPU only)

### Plotting concurrency

Starting with the February 19th release, plotting performance was improved by increasing internal concurrency.
During plotting, there are both parallel and sequential parts of the table generation. By generating several tables simultaneously, we can overlap the sequential parts with parallel parts, thus improving CPU utilization. While generating tables for all records requires significant RAM, producing tables for only a few records at a time offers an optimal balance between CPU and RAM usage.
We added the `--record-encoding-concurrency` option to override the default behavior, which allocates one record for every two cores but does not exceed eight in parallel. According to our internal testing with P-cores, E-cores, and combinations of P+E cores, this setting appears to achieve peak performance.
If you prefer to use the previous behavior, or if your RAM usage becomes too high, you can set `--record-encoding-concurrency` to `1`. You may also experiment with setting it to `2`, `3`, etc., which may yield better results depending on your specific CPU/RAM configuration.
We added the `--cpu-record-encoding-concurrency` option to override the default behavior, which allocates one record for every two cores but does not exceed eight in parallel. According to our internal testing with P-cores, E-cores, and combinations of P+E cores, this setting appears to achieve peak performance.
If you prefer to use the previous behavior, or if your RAM usage becomes too high, you can set `--cpu-record-encoding-concurrency` to `1`. You may also experiment with setting it to `2`, `3`, etc., which may yield better results depending on your specific CPU/RAM configuration.

### Create Missing Farms

Expand Down Expand Up @@ -95,14 +92,14 @@ In certain situations, especially when the farmer terminates unexpectedly or enc

Ensure to replace /path/to/your/plot with your actual plot path. Use this command cautiously as it modifies the plot state to recover from errors.

### Specify Exact CPU Cores for Plotting/Replotting
### Specify Exact CPU Cores for Plotting/Replotting (CPU only)
This option will override any custom logic that the **subspace farmer** might otherwise use.
You can specify the plotting CPU cores by adding `--plotting-cpu-cores`, followed by the desired cores parameters. Cores should be listed as comma-separated values, with whitespace used to separate different thread pools or encoding instances.
For example, `--plotting-cpu-cores 0,1 2,3` will result in two sectors being encoded simultaneously, each using a pair of CPU cores.
You can specify the plotting CPU cores by adding `--cpu-plotting-cores`, followed by the desired cores parameters. Cores should be listed as comma-separated values, with whitespace used to separate different thread pools or encoding instances.
For example, `--cpu-plotting-cores 0,1 2,3` will result in two sectors being encoded simultaneously, each using a pair of CPU cores.

Similarly, you can customize the replotting CPU cores using `--replotting-cpu-cores`, followed by arguments similar to those used in the `--plotting-cpu-cores` example above.
Similarly, you can customize the replotting CPU cores using `--cpu-replotting-cores`, followed by arguments similar to those used in the `--cpu-plotting-cores` example above.

Note that setting `--plotting-cpu-cores` requires `--replotting-cpu-cores` to be configured with the same number of CPU core groups. If the `--replotting-cpu-cores` setting is omitted, the node will default to using the same thread pool as for plotting.
Note that setting `--cpu-plotting-cores` requires `--cpu-replotting-cores` to be configured with the same number of CPU core groups. If the `--cpu-replotting-cores` setting is omitted, the node will default to using the same thread pool as for plotting.


### Switching to a new snapshot from older/different versions of Autonomys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ import styles from '@site/src/pages/index.module.css';
--farmer
```

:::note
Using **run**, setting **--base-path** and specifying **--chain** is mandatory.
:::

You should see output similar to this in your terminal:
```
2024-09-04T06:42:56.744203Z INFO subspace_node::commands::run: Subspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ After this, simply repeat the step you prompted for (step 4 or 6). This time, cl
2. Make the farmer & node executable:
- `chmod +x subspace-farmer-macos-aarch64-gemini-3h-2024-oct-10`
- `chmod +x subspace-node-macos-aarch64-gemini-3h-2024-oct-10`
1. We will then start the node using the following command
3. We will then start the node using the following command

```bash
# Replace `INSERT_YOUR_ID` with a nickname you choose
Expand All @@ -55,12 +55,9 @@ After this, simply repeat the step you prompted for (step 4 or 6). This time, cl
```

:::note
Using **run**, setting **--base-path** and specifying **--chain** became mandatory starting with Gemini 3h. The parameter `--validator` was switched to `--farmer` at the same time.
Using **run**, setting **--base-path** and specifying **--chain** is mandatory.
:::

:::note
As of the Jun 11, 2024 version a new option is available for fast syncing called [Snap Sync](/farming/advanced-cli/tips#snap-sync). It will only work for the initial sync, but many people report that they are fully synced within hours, not days. The parameter is **--sync snap**.
:::

4. You should see something similar in the terminal:
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,9 @@ This is because the application is trying to access the internet. This is expect
```

:::note
Using **run**, setting **--base-path** and specifying **--chain** became mandatory starting with Gemini 3h. The parameter `--validator` was switched to `--farmer` at the same time.
Using **run**, setting **--base-path** and specifying **--chain** is mandatory.
:::

:::note
As of the Jun 11, 2024 version a new option is available for fast syncing called [Snap Sync](/farming/advanced-cli/tips#snap-sync). It will only work for the initial sync, but many people report that they are fully synced within hours, not days. The parameter is **--sync snap**.
:::

4. You should see something similar in the terminal:
```text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ volumes:
:::note
If you're running an operator node for **AutoID domain**, add the following bootstrap node to the list of domain arguments:

--bootstrap-nodes /dns/bootstrap-0.autoid.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWFoiz2iTkmnnSqiL2oQRhGzaqgtUjYNz2jyWKQqgPXgx9
--bootstrap-node /dns/bootstrap-0.autoid.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWFoiz2iTkmnnSqiL2oQRhGzaqgtUjYNz2jyWKQqgPXgx9
:::

You should see the node start successfully and begin syncing.
Expand Down
2 changes: 1 addition & 1 deletion docs/farming-&-staking/staking/operators/tips-operator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ volumes:
:::note
If you're running an operator node for **AutoID domain**, add the following bootstrap node to the list of domain arguments:

--bootstrap-nodes /dns/bootstrap-0.autoid.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWFoiz2iTkmnnSqiL2oQRhGzaqgtUjYNz2jyWKQqgPXgx9
--bootstrap-node /dns/bootstrap-0.autoid.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWFoiz2iTkmnnSqiL2oQRhGzaqgtUjYNz2jyWKQqgPXgx9
:::

You should see the node start successfully and begin syncing.
Expand Down

0 comments on commit f53eb21

Please sign in to comment.