From f19154c48679309657f0d1fbebdaeae6e96f78ef Mon Sep 17 00:00:00 2001 From: Emil Fattakhov Date: Mon, 21 Oct 2024 16:12:51 -0400 Subject: [PATCH] Revert PR #685 --- .../farming/advanced-cli/cli-tips.mdx | 459 +++++------------- .../advanced-cli/cli-troubleshooting.mdx | 44 ++ docs/farming-&-staking/farming/intro.mdx | 2 +- docusaurus.config.js | 3 +- src/components/Button/index.js | 46 -- src/theme/MDXComponents.js | 9 - 6 files changed, 179 insertions(+), 384 deletions(-) create mode 100644 docs/farming-&-staking/farming/advanced-cli/cli-troubleshooting.mdx delete mode 100644 src/components/Button/index.js delete mode 100644 src/theme/MDXComponents.js diff --git a/docs/farming-&-staking/farming/advanced-cli/cli-tips.mdx b/docs/farming-&-staking/farming/advanced-cli/cli-tips.mdx index ff990e6b60a..45b69e2529f 100644 --- a/docs/farming-&-staking/farming/advanced-cli/cli-tips.mdx +++ b/docs/farming-&-staking/farming/advanced-cli/cli-tips.mdx @@ -11,435 +11,240 @@ keywords: - Docker --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import Link from '@docusaurus/Link'; -import MDXComponents from '@theme-original/MDXComponents'; -import Button from '@site/src/components/Button'; - -Whether you are an experienced farmer or new to the Autonomys Network, this section offers valuable insights to improve your experience and efficiency. We explore practical advice and hidden techniques that will help you optimize your farming setup and tackle common challenges effortlessly. - -These tips are specifically designed to ensure your farm runs smoothly and effectively. Let’s get started! - -## Telemetry & Explorers - -Explore the Autonomys Network in detail with our telemetry tool and various block explorers. Whether you're monitoring network activity or analyzing blockchain data, these resources provide valuable insights into the network's performance and transactions. - -
-Monitor the Autonomys Network using telemetry and block explorers. - -
-
-
-

- Get real-time insights into network activity and performance metrics. Ideal for monitoring the overall health and status of the Autonomys Network. -

-
- -
-
-
-

- Our primary tool for viewing blocks, transactions, and network activity on the Autonomys Network. This explorer offers an intuitive interface and detailed information. -

-
- -
-
-
-

- An alternative block explorer providing detailed views of blocks, transactions, and network events. Subscan is known for its user-friendly interface and additional data analytics features. -

-
- -
-
-
-

- For users familiar with the Polkadot ecosystem, this explorer offers a seamless experience for exploring the Autonomys Network using the Polkadot.js interface. -

-
- -
- -## Useful Parameters - -:::tip Available Parameters - -A complete list of parameters and their functions can be obtained using the `--help` option with both `subspace-node` and `subspace-farmer`. -::: +## Additional Tips - +Welcome to the Additional Tips section! Whether you're a seasoned farmer or just starting out with the Autonomys Network, these tips and tricks are designed to enhance your experience and efficiency. Here, we delve into practical advice and lesser-known techniques to help you fine-tune your farming setup and navigate common challenges with ease. From configuring your environment to managing background processes, these insights are tailored to ensure your Farmer operates smoothly and effectively. Let's dive in and explore how you can get the most out of your Autonomys Network Farmer. +### Telemetry & Astral Block Explorer - +Explore the Autonomys Network in depth with our variety of telemetry tools and block explorers. Whether you're monitoring network activity or exploring blockchain data, these resources provide comprehensive insights into the network's performance and transactions. -
-DSN Syncing +- **[Telemetry Server](https://telemetry.subspace.foundation)**: Get real-time insights into network activity and performance metrics. Ideal for monitoring the overall health and status of the Autonomys Network. -:::caution Adjusting DSN Sync Parameters +- **[Astral Block Explorer](https://astral.autonomys.xyz)**: Our primary tool for viewing blocks, transactions, and network activity on the Autonomys Network. This explorer offers an intuitive interface and detailed information. -It may be tempting to modify certain parameters that appear to be related to DSN syncing, but caution is advised. Some options may not improve syncing performance and should be left at their default settings. +- **[Subscan Block Explorer](https://subspace.subscan.io)**: An alternative block explorer providing detailed views of blocks, transactions, and network events. Subscan is known for its user-friendly interface and additional data analytics features. -::: +- **[Polkadot.js Block Explorer](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-0.gemini-3h.subspace.network%2Fws#/explorer)**: For users familiar with the Polkadot ecosystem, this explorer offers a seamless experience for exploring the Autonomys Network using the Polkadot.js interface. -:::tip Understanding the DSN -The DSN can be a complex topic. To gain a better understanding of our Decentralized Storage Network, please refer to this [guide](https://academy.autonomys.xyz/subspace-protocol/network-architecture/distributed-storage-network) from our Academy. -::: +### Snap Sync -```bash ---dsn-out-connections ---dsn-pending-out-connections -``` +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. -
+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. -
-Snap Sync -Snap Sync works by jumping to near the end of the chain, allowing you to sync with the current block more quickly. Once the initial jump is complete, it functions like a full sync. In fact, if you haven't synced for more than a few days, it might be faster to remove the node database and let Snap Sync quickly sync to the most recent block. +### Plotting concurrency (CPU only) -A full sync is required for situations where you need an archival node, such as running an operator or when running an RPC node for public use or indexing. Archival nodes store the entire blockchain, unlike pruned nodes that only store recent data. To perform a full sync and disable Snap Sync, use the following command: +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 `--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. -```bash ---sync full -``` +### Create Missing Farms -
+A farmer has the option to specify whether the system should automatically create missing farms upon startup. If you provide a path to a plot that isn't found, the system will generate a new one. However, this may not be desirable if a drive fails to mount properly. +By default, this option is set to `true`, but you can override it by adding `--create false`. Setting this flag to `false` after establishing your plots can prevent unintentional file writes to the wrong drive. -
-Wipe +### Record Chunks Reading Mode -If you switch to a new network, you will need to wipe your existing data to be compatible with the new network. +Upon startup, each farm will [benchmark](#benchmarking-your-farmer) the performance of every plot to identify the most efficient proving method, yielding either `ConcurrentChunks` or `WholeSector` results. If you already know the optimal method for your setup, you can specify it as an argument for each farm to save time benchmarking. +For example, you can include record-chunks-mode= after defining the path and size, assigning the desired value, e.g., `path=/mnt/subspace1,size=100G,record-chunks-mode=ConcurrentChunks`. If you do not provide this parameter, the system will benchmark each disk on startup to identify the most efficient method. -To wipe your node, use the following command, replacing `subspace-node` with the name of the node file you downloaded from [releases](https://github.com/autonomys/subspace/releases): +### Benchmarking Your Farmer +Benchmarking helps you test the plotting speed of your farmer against different versions of the Autonomys Network. -```bash -./subspace-node wipe /path/to/node ``` - -
- -
- - - - -
-Benchmarking - -Benchmarking helps you test the plotting speed of your farmer. To perform a benchmark audit, use the following command: - -```bash -./subspace-farmer benchmark audit /path/to/plot +./subspace-farmer benchmark audit /path/to/your/plot ``` -Replace `/path/to/plot` with the actual path to your plot. This command will provide metrics and insights regarding your plotting performance. +Replace /path/to/your/plot with the actual path to your plot. This will provide you with metrics and insights regarding plotting performance. -To interpret the results, assess throughput to determine the maximum auditable size across any number of disks, as both CPU and disk performance influence this metric. +At the moment, Autonomys Node supports `rayon` implementation mechanism, that opens files as many times as there are farming threads and, for each thread, uses a dedicated file handle. -

***To read more about prove audit benchmarking, refer to this [forum post](https://forum.autonomys.xyz/t/2149).***

+To interpret the results: typically, you assess throughput to determine the maximum auditable size across any number of disks. Both CPU and disk performance influence this metric. -There is also a second command available to determine how much time your farmer has after auditing to provide proof: +To read more about audit benchmarking, [read this forum post](https://forum.autonomys.xyz/t/audit-benchmark-result-explanation-please/2149). -```bash -./subspace-farmer benchmark prove /path/to/plot -``` +There is a second command available, which helps you determine how much time your farmer has after auditing to provide proof. -Each farmer has approximately four seconds to audit and prove, so depending on the speed of auditing, the remaining time will be allocated for proving. Note that proving performance does not depend on plot size. - -If there isn’t enough time for the proving step, the farmer logs a message like this: - -``` -Proving for solution skipped due to farming time limit slot= sector_index= ``` - -

***To read more about prove benchmarking, refer to this [forum post](https://forum.autonomys.xyz/t/2150).***

- -
- -
-Create Missing Farms - -A farmer can choose whether the system should automatically create missing farms at startup. If you specify a path to a plot that doesn't exist, the system will generate a new one. However, this may lead to issues if a drive fails to mount correctly. By default, this option is enabled, but you can disable it using the following flag: - -```bash ---create false +./subspace-farmer benchmark prove /path/to/your/plot ``` -Setting this option to false after your plots are initially created helps prevent accidental file writes to an incorrect drive. +Each farmer has ~4 seconds to audit and prove, so depending on how fast auditing is, the remaining time will be used for proving. +Proving performance doesn’t depend on the plot size. -
+If an environment does not have enough time for the proving step, a message such as this is logged by the farmer: -
-Record Chunks Mode +`Proving for solution skipped due to farming time limit slot=6723846 sector_index=46` -Upon startup, each farm benchmarks the performance of every plot to identify the most efficient proving method, yielding either `ConcurrentChunks` or `WholeSector` results. If you already know the optimal method for your setup, you can specify it as an argument for each farm to save time during benchmarking. +To read more about prove benchmarking, [read this forum post](https://forum.autonomys.xyz/t/audit-benchmark-result-explanation-please/2150). -For example, you can set `record-chunks-mode` after defining the path and size, assigning the desired value: +### Scrubbing Your Farmer +In certain situations, especially when the farmer terminates unexpectedly or encounters an error, it might fail to restart correctly. The scrub command assists in resolving such issues by cleaning or resetting the specified plot. -```bash -path=/mnt/plots/drive1,size=4TB,record-chunks-mode=ConcurrentChunks ``` - -If you do not provide this parameter, the system will benchmark each disk at startup to determine the most efficient method. - -
- -
-DSN Syncing - -:::caution[Adjusting DSN Sync Parameters] - -It may be tempting to modify certain parameters that appear to be related to DSN syncing, but caution is advised. Some options may not improve syncing performance and should be left at their default settings. - -::: - -:::tip[Understanding the DSN] - -The DSN can be a complex topic. To gain a better understanding of our Decentralized Storage Network, please refer to this [guide](https://academy.autonomys.xyz/subspace-protocol/network-architecture/distributed-storage-network) from our Academy. - -::: - -The default parameters are configured with common consumer modem and router capabilities in mind. Adjusting certain parameters can enhance DSN sync performance by increasing parallelism. However, if you choose to significantly increase these values, ensure that your modem or router can handle the additional traffic. - -Increasing the values of the farmer parameters may enhance plotting speed by accelerating piece cache download speeds. - -```bash ---out-connections ---pending-out-connections +./subspace-farmer scrub /path/to/your/plot ``` -
- -
-Record Encoding Concurrency - -Plotting performance has been improved with increased internal concurrency. During plotting, table generation involves both parallel and sequential phases. By generating multiple tables at once, we overlap sequential tasks with parallel ones, improving CPU utilization. Although generating tables for all records demands significant RAM, processing fewer records at a time helps balance CPU and RAM usage. - -The `--cpu-record-encoding-concurrency` option allows you to fine-tune this balance. By default, it allocates one record for every two cores, up to eight in parallel. If RAM usage becomes too high or you prefer the previous method, you can adjust this setting. +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. -Example usage: - -```bash ---cpu-record-encoding-concurrency 4 -``` +### 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 `--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. -You can experiment to optimize performance based on your system's CPU and RAM. +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 `--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. -
-Scrub -In certain situations, when the farmer terminates unexpectedly or encounters an error, it may fail to restart correctly. The scrub command helps resolve these issues by cleaning or resetting the specified plot. +### Switching to a new snapshot from older/different versions of Autonomys -```bash -./subspace-farmer scrub /path/to/plot -``` - -Ensure you replace `/path/to/plot` with the actual path to your plot. Use this command with caution, as it modifies the plot state to recover from errors. - -
+:::info +Unless specifically mentioned by the Development team you should **NOT** have to wipe your configuration on new releases. +::: -
-Specify CPU Cores +In general you should be able to download the latest release, and re-start the Node & Farmer with the same commands as you started to prior version with no errors. -This option allows you to override any custom logic that subspace-farmer uses for CPU core allocation. You can specify the plotting CPU cores by adding `--cpu-plotting-cores`, followed by the desired core parameters. Cores should be listed as comma-separated values, using whitespace to separate different thread pools or encoding instances. +There are some cases where version updates will cause issue with your Node & Farmer and you may have to wipe your node, typically when errors occur. If you have any issues you can always check our [Forums](https://forum.autonomys.xyz) and hop in our [Discord](https://autonomys.xyz/discord) Server to ask for help. -For example, the command: +### Wipe +If you were running a node previously, and want to switch to a new network, please perform these steps and then follow the guide again: ```bash ---cpu-plotting-cores 0,1 2,3 +# Replace `FARMER_FILE_NAME` with the name of the farmer file you downloaded from releases +./FARMER_FILE_NAME wipe PATH_TO_FARM +# Replace `NODE_FILE_NAME` with the name of the node file you downloaded from releases +./NODE_FILE_NAME wipe NODE_DATA_PATH ``` -will result in two sectors being encoded simultaneously, with each sector using a pair of CPU cores. - -You can similarly customize the replotting CPU cores with the `--cpu-replotting-cores` option, using arguments that follow the same format as `--cpu-plotting-cores`. +Now follow the installation guide from the beginning. -It is important to note that if you set `--cpu-plotting-cores`, you must configure `--cpu-replotting-cores` with the same number of CPU core groups. If you omit the `--cpu-replotting-cores` setting, the node will default to using the same thread pool as for plotting. +### Docker Wipe -
+In case of Docker setup run `docker compose down -v` (and manually delete custom directories if you have specified them). -
-Utilizing Multiple Drives +Now follow the installation guide. -You can farm to multiple drives with a single instance of the farmer. This allows for greater storage capacity and increased rewards. +If you are having issues with running a node or farmer for Autonomys, feel free to join our Discord or even better you can take a look at our forums and review existing questions or post a new one if needed! -This example specifies the paths and sizes of multiple plots across different drives: +- [Forum](https://forum.autonomys.xyz) +- [Discord](https://autonomys.xyz/discord) -```bash -./subspace-farmer farm --reward-address \ - path=/mnt/plots/drive1,size=900GiB \ - path=/mnt/plots/drive2,size=8T \ - path=/mnt/plots/drive3,size=8T -``` - -
- -
-Wipe +### Help -If you switch to a new network, you will need to wipe your existing data to be compatible with the new network. - -To wipe your farm, use the following command, replacing `subspace-farmer` with the name of the farmer file you downloaded from [releases](https://github.com/autonomys/subspace/releases): +There are extra commands and parameters you can use on farmer or node, use the `--help` after any other command to display additional options. ```bash -./subspace-farmer wipe /path/to/farm +# Replace `FARMER_FILE_NAME` with the name of the node file you downloaded from releases +./FARMER_FILE_NAME farm --help ``` -
- -
- - - - -
-Wipe - -If you switch to a new network, you will need to wipe your existing data to ensure compatibility with the new network. - -In the case of a Docker setup, run the following command to stop and remove the containers, along with the associated volumes: +--- +### Timekeepers -```bash -docker compose down -v -``` +Gemini-3g introduces Proof-of-Time and a new, optional role has been added to the node. Timekeepers help run PoT to ensure the security of the network. Timekeeping requires a high-performance core CPU but can be undertaken by any node runner. You can enable timekeeping with the following commands. +- `--timekeeper`: To enable timekeeping on the node +- `--timekeeper-cpu-cores`: To specify which cores the Timekeeper will run on. -Make sure to manually delete any custom directories if you specified them. +Read more about [Timekeepers](/farming/timekeeper) -
+### Node & Farmer Commands Guide +Both the node and the farmer have a variety of flags and parameters. To see a full list, append the `--help` flag to either the node or the farmer command. -
+### Common Command Examples -
+:::note Farming Changes +Please note that as of `Gemini-3g` farming no longer occurs while plotting. This is to ensure the plotting process occurs in the most efficient manner. You can change this by adding the `--farm-during-initial-plotting` flag to the farmer. +::: ---- +For both the node and the farmer, here are some frequently used commands: -## Advanced Error Logging +- Display farm information: `./FARMER_FILE_NAME info PATH_TO_FARM` +- Scrub the farm for errors: `./FARMER_FILE_NAME scrub PATH_TO_FARM` +- Erase all farmer-related data: `./FARMER_FILE_NAME wipe PATH_TO_FARM` +- Erase all node-related data: `./NODE_FILE_NAME wipe NODE_DATA_PATH` -
-Enable Rust Backtrace +### Utilizing Multiple Disks -When operating the Subspace Farmer and Node, you may come across an error message prompting you to enable a Rust backtrace for issue diagnosis: +To maximize storage capabilities, you can engage multiple disks directly. This is often more efficient than relying on RAID configurations: -```bash -Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. +Example: +```shell-session +./FARMER_FILE_NAME farm --reward-address WALLET_ADDRESS \ + path=/media/ssd1,size=100GiB \ + path=/media/ssd2,size=10T \ + path=/media/ssd3,size=10T ``` -This message indicates that Rust, the programming language utilized by the Subspace Farmer and Node, has encountered a problem. By default, the backtrace is not shown. To activate the `RUST_BACKTRACE` environment variable and access detailed error information, use the following commands according to your operating system: - - - - - -To enable the Rust backtrace in the Ubuntu terminal, type the following command and then rerun the application: - -```bash -export RUST_BACKTRACE=1 -``` +### Optimizing DSN Syncing +:::note - + The DSN can be a nuanced topic, to better understand our Decentralized Storage Network, please refer to [this guide](https://academy.autonomys.xyz/subspace-protocol/network-architecture/distributed-storage-network) from our Academy. - +::: -To enable the Rust backtrace in PowerShell, enter the following command and then rerun the application: +:::warning Parameters to Use with Caution +While it might be tempting to adjust certain parameters that seem related to DSN Syncing, it's advised to be cautious. Some options will not enhance syncing and are best left at their default values: -```powershell -$Env:RUST_BACKTRACE=1 ``` - - - - - -To enable the Rust backtrace in the macOS terminal, type the following command and then rerun the application: - -```bash -export RUST_BACKTRACE=1 +--out-peers +--in-peers +--dsn-target-connections +--dsn-pending-in-connections +--dsn-in-connections ``` +::: - - - - -For services, use the following commands to enable the Rust backtrace: - -1. Edit the service file for the node or farmer: +#### Recommended Parameters -```bash -sudo systemctl edit subspace-node +The default parameters are set with the capabilities of common consumer modem/routers in mind. Adjusting certain parameters could enhance DSN sync performance by increasing parallelism. However, if you decide to increase them significantly, ensure that your modem/router is performant enough to handle the increased traffic. +**Node:** ``` - -or - -```bash -sudo systemctl edit subspace-farmer +--dsn-out-connections +--dsn-pending-out-connections ``` -2. Add the `[Service]` section and include the line `Environment=RUST_BACKTRACE=1` between the warning comments. - -3. Reload the systemd manager configuration: - -```bash -sudo systemctl daemon-reload +**Farmer:** +Increasing the values of the farmer parameters could increase the plotting speed. ``` - -4. Restart the services: - -```bash -sudo systemctl restart subspace-{node,farmer} +--out-connections +--pending-out-connections ``` - - - - -Enabling `RUST_BACKTRACE` provides additional diagnostic information that can assist in resolving any errors encountered during operation. This information can be shared with the development or support team for further analysis. - -
-## Operating System Changes +### NUMA Support -
-Changing the Open Files Limit on Linux +:::note +NUMA support will benefit farmers with large, powerful CPUs and lots of RAM available. The required RAM amount depends on the processor and the number of threads. +::: -Adjusting the open files limit on Linux is sometimes necessary to optimize both system and application performance. Applications that manage file sharing or distribution, such as peer-to-peer systems, may need to open many connections to different peers simultaneously. Increasing the open files limit enables these applications to maintain more connections, thereby enhancing data transfer rates and overall system efficiency. +Previously plotting/replotting thread pools were created for each farm separately even though only a configured number of them can be used at a time (by default just one). +With the introduction of NUMA support, the farmer application has a thread pool manager that will create a necessary number of thread pools that will be allocated to currently plotting/replotting farms. +When a thread pool is created, it is assigned to a set of CPU cores and will only be able to use those cores. Pinning doesn’t pin threads to cores 1:1, instead, the OS is free to move threads between cores, but only within CPU cores allocated for the thread pool. This will ensure plotting for a particular sector only happens on a particular CPU/NUMA node. -This adjustment can also help prevent the `Too Many Open Files` error. +#### Enabling NUMA on Windows/Linux machines -To temporarily change the limit for open files, you can use the `ulimit` command. For example, to set the limit to 2048, you would run: +On Linux and Windows, the farmer will detect NUMA systems and create a number of thread pools that correspond to the number of NUMA nodes. This means the default behavior will change for large CPUs and consume more memory as a result, but that can be changed to the previous behavior with CLI options if desired. +To use NUMA, you need to enable it via the BIOS of your motherboard for the farmer to know it exists. This option is present in motherboards for **Threadripper/Epyc processors** but might exist in others too. If you don’t enable it, both OS and farmer will think you have a single UMA processor and will not be able to apply optimizations. -```bash -ulimit -n 2048 -``` +To read more about NUMA support and the benefits it provides for large CPUs read [this forum post](https://forum.autonomys.xyz/t/numa-support-is-coming/2299?u=nazar-pc). -Keep in mind that this change will revert after logging out or rebooting. -For a permanent adjustment, you have two options: +#### Changing number of open files limit (Linux) -1. Modify the kernel parameter `fs.file-max` using the `sysctl` command: +Changing the number of open files limit on Linux is sometimes necessary for both system and application performance tuning. Applications that manage file sharing or distribution, including peer-to-peer systems, may require opening numerous connections to different peers simultaneously. A higher open files limit allows these applications to maintain more connections, improving data transfer rates and system efficiency. -```bash -sysctl -w fs.file-max=500000 -``` - -2. Set limits for individual users by editing the `/etc/security/limits.conf` file. You can specify hard and soft limits for the number of open files. For instance: - -```bash -username soft nofile 10000 -username hard nofile 30000 -``` +This can also help to mitigate the `Too Many Open Files` error. -By applying these changes, you can effectively manage the open files limit to optimize your system’s performance. +You can use the `ulimit` command to change the limit for open files temporarily. For example, setting `ulimit -n 2048` will set the limit to 2048. This change is reverted after logging out or a reboot. -
\ No newline at end of file +For a permanent change, you have two approaches: +- To modify the kernel parameter `fs.file-max`. You can do this using the `sysctl` command `sysctl -w fs.file-max=500000`. +- To set limits for individual users, you need to edit the `/etc/security/limits.conf` file. You can specify hard and soft limits for the number of open files `username soft nofile 10000` for the soft limit and `username hard nofile 30000` for the hard limit. \ No newline at end of file diff --git a/docs/farming-&-staking/farming/advanced-cli/cli-troubleshooting.mdx b/docs/farming-&-staking/farming/advanced-cli/cli-troubleshooting.mdx new file mode 100644 index 00000000000..db3a6f9e1bb --- /dev/null +++ b/docs/farming-&-staking/farming/advanced-cli/cli-troubleshooting.mdx @@ -0,0 +1,44 @@ +--- +title: Troubleshooting +sidebar_position: 5 +description: How to run an Autonomys Network Farmer with the Substrate CLI +slug: /farming/advanced-cli/troubleshooting +keywords: + - Farmer + - Farming + - CLI + - Binaries + - Docker +--- + +## Troubleshooting + +If you are facing issues with your node/farmer you can try a few of the following things below, if you are unable to get your issue resolved please check our [Forum](https://forum.autonomys.xyz/c/support/5) to see if your issue may have been solved, if its a new one feel free to post it! You can also join our [Discord](https://autonomys.xyz/discord) and use one of the dedicated channels #farmer-support and #farmer-chat for additional Peer to Peer help. + +:::info +We have included a few tutorials below that may help you in your support journey, this is not an all inclusive list and we welcome contributions +::: + + +### Enable Rust Backtrace + +When running the Autonomys Network Farmer & Node, you might encounter an error message indicating the need for a Rust backtrace to diagnose issues: + +```text +Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. +``` + +This message suggests that Rust, the programming language used in the Autonomys Network Farmer & Node, has encountered a problem. By default, the backtrace is not displayed. To enable the `RUST_BACKTRACE` environment variable and view detailed error information, use the following commands based on your operating system: + +- **🖼️ Windows** (PowerShell): Enter `$Env:RUST_BACKTRACE=1` in PowerShell and rerun the application. +- **🍎 macOS**: Type `export RUST_BACKTRACE=1` in the terminal and rerun the application. +- **🐧 Ubuntu**: Enter `export RUST_BACKTRACE=1` in the terminal and rerun the application. +- **⚙ Service (Linux)**: For services, use `sudo systemctl edit subspace-node` or `sudo systemctl edit subspace-farmer`, add `[Service]` and `Environment=RUST_BACKTRACE=1` between the warning comments, reload with `sudo systemctl daemon-reload`, and restart services using `sudo systemctl restart subspace-{node,farmer}`. + +By enabling `RUST_BACKTRACE`, you can obtain additional diagnostic information to help resolve any errors encountered during operation. + +### Common Problems + +Looking for solutions to other common issues? + +Check out our Common Problems page. This resource covers a range of frequently encountered challenges, offering practical solutions to help you overcome them. Please note that while this page addresses many common issues, it is not an all-inclusive list. For issues not covered, you can visit our forums or Discord for additional support. \ No newline at end of file diff --git a/docs/farming-&-staking/farming/intro.mdx b/docs/farming-&-staking/farming/intro.mdx index ca6886348bc..abf05e4cd3e 100644 --- a/docs/farming-&-staking/farming/intro.mdx +++ b/docs/farming-&-staking/farming/intro.mdx @@ -102,7 +102,7 @@ SSD storage is required. High end models are not necessary and a mid range SSD f :::caution File Descriptor Limit -Linux systems may have a default file descriptor limit, which can vary based on distribuition. Exceeding this limit could cause errors. For detailed information, visit our [Tips & Tricks](/farming/advanced-cli/tips#open-files-limit) guide. +Linux systems may have a default file descriptor limit, which can vary based on distribuition. Exceeding this limit could cause errors. For detailed information, visit our [Tips & Tricks](/farming/advanced-cli/tips#changing-number-of-open-files-limit-linux) guide. ::: diff --git a/docusaurus.config.js b/docusaurus.config.js index 00981f59acc..19ce2d7bd57 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -70,7 +70,8 @@ const config = { { to: '/farming/space-acres/translate', from: ['/docs/farming-&-staking/farming/space-acres/translate_space_acres'] }, { to: '/farming/advanced-cli/install', from: ['/docs/farming-&-staking/farming/advanced-cli/cli-install', '/docs/protocol/cli/', '/docs/protocol/substrate-cli/', '/docs/Farming%20&%20Staking/Farming/Advanced-Cli/cli-install', '/docs/category/advanced-cli-recommended', '/docs/category/advanced-cli', '/docs/farming-&-staking/farming/advanced-cli/cli-install'] }, { to: '/farming/advanced-cli/cluster', from: ['/docs/farming-&-staking/farming/advanced-cli/cli-farming-cluster'] }, - { to: '/farming/advanced-cli/tips', from: ['/docs/farming-&-staking/farming/advanced-cli/cli-tips', '/docs/farming-&-staking/farming/advanced-cli/cli-troubleshooting'] }, + { to: '/farming/advanced-cli/tips', from: ['/docs/farming-&-staking/farming/advanced-cli/cli-tips'] }, + { to: '/farming/advanced-cli/troubleshooting', from: ['/docs/farming-&-staking/farming/advanced-cli/cli-troubleshooting'] }, { to: '/farming/common-problems', from: ['/docs/farming-&-staking/farming/common_problems'] }, { to: '/farming/guides/gpu-plotter', from: ['/docs/farming-&-staking/farming/additional-guides/gpu-plotter'] }, { to: '/farming/guides/port-config', from: ['/docs/farming-&-staking/farming/additional-guides/port-config'] }, diff --git a/src/components/Button/index.js b/src/components/Button/index.js deleted file mode 100644 index 828b5a0a037..00000000000 --- a/src/components/Button/index.js +++ /dev/null @@ -1,46 +0,0 @@ -import React, { CSSProperties } from 'react'; -import clsx from 'clsx'; -import Link from '@docusaurus/Link'; - -// Build the Button component with the specified props -const Button = ({ - size = null, // The size of the button (e.g., 'sm', 'lg', or null) - outline = false, // Whether the button should be an outline button - variant = 'primary', // The color variant of the button - block = false, // Whether the button should be a block-level button - disabled = false, // Whether the button should be disabled - className, // Custom classes for the button - style, // Custom styles for the button - link, // The URL the button should link to - label // The text of the button -}) => { - const sizeMap = { - sm: 'sm', - small: 'sm', - lg: 'lg', - large: 'lg', - medium: null, - }; - const buttonSize = size ? sizeMap[size] : ''; - const sizeClass = buttonSize ? `button--${buttonSize}` : ''; - const outlineClass = outline ? 'button--outline' : ''; - const variantClass = variant ? `button--${variant}` : ''; - const blockClass = block ? 'button--block' : ''; - const disabledClass = disabled ? 'disabled' : ''; - // If the button is disabled, set the destination to null. - const destination = disabled ? null : link; - return ( - - - - ); -}; - -export default Button; \ No newline at end of file diff --git a/src/theme/MDXComponents.js b/src/theme/MDXComponents.js deleted file mode 100644 index 21a0a70ba1a..00000000000 --- a/src/theme/MDXComponents.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -// Importing the original mapper + our components according to the Docusaurus doc -import MDXComponents from '@theme-original/MDXComponents'; -import Button from '@site/src/components/Button'; -export default { - // Reusing the default mapping - ...MDXComponents, - Button, -}; \ No newline at end of file