Tips & Tricks
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.
-
Telemetry Server: Get real-time insights into network activity and performance metrics. Ideal for monitoring the overall health and status of the Autonomys Network.
-
Astral Block Explorer: Our primary tool for viewing blocks, transactions, and network activity on the Autonomys Network. This explorer offers an intuitive interface and detailed information.
-
Subscan Block Explorer: 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: For users familiar with the Polkadot ecosystem, this explorer offers a seamless experience for exploring the Autonomys Network using the Polkadot.js interface.
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 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 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
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.
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.
Record Chunks Reading Mode
Upon startup, each farm will benchmark 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.
Benchmarking Your Farmer
Benchmarking helps you test the plotting speed of your farmer against different versions of the Autonomys Network.
./subspace-farmer benchmark audit /path/to/your/plot
Replace /path/to/your/plot with the actual path to your plot. This will provide you with metrics and insights regarding plotting performance.
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 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.
To read more about audit benchmarking, read this forum post.
There is a second command available, which helps you determine how much time your farmer has after auditing to provide proof.
./subspace-farmer benchmark prove /path/to/your/plot
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:
Proving for solution skipped due to farming time limit slot=6723846 sector_index=46
To read more about prove benchmarking, read this forum post.
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.
./subspace-farmer scrub /path/to/your/plot
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.