Tutorials

Handling Network Latency

Depending on the size and structure of your operation, you may have network latency.  While this typically doesn't affect the operation of a miner, depending on the severity, it can lead to problems in Foreman, which often manifest as:

  • Bulk ASIC scans finding an inconsistent number of miners
  • Bulk ASIC scans finding no miners at all
  • Miners fluctuating between 'Miner not updating' and updating properly
  • Commands failing to complete, often marked as 'Miner not reachable', 'Connect timed out', or 'Failed to obtain a response'

By default, Pickaxe waits 1 SECOND for reads (obtaining metrics, obtaining MAC addresses, etc) and up to 20 SECONDS for writes (rebooting, changing pools, etc).  These values serve as a good starting point, but they can be tuned.

The following guide covers when tuning is appropriate and how the knobs can be adjusted.

If Pickaxe is running local to the miners

When Pickaxe is connected directly to the network with the miners, you can generally use a shorter connection read timeout.  For local network connections, 1 SECOND is long, which can lead to slower scans when bulk importing.

The following configuration is sufficient for this deployment (from the Pickaxe page, identify the appropriate Pickaxe and click the Configure button):

Timeouts when Pickaxe is connected directly to the miner network.
It's recommended that the write timeout always be 20 SECONDS.

If you begin to notice inconsistent miner connectivity, identifiable by the bullet points at the start of this post, readjust the read timeout back to 1 SECOND.

If Pickaxe is running under a VPN

To promote reliability, it's recommended that Pickaxe always run local to the miners. Running under a VPN requires that the VPN remain open 24/7.

When Pickaxe is running under a VPN and connected to miners remotely, network latency drastically increases since the data is now traversing the Internet rather than being isolated to local networking equipment.

For remote connections, 1 SECOND may be too short.  If you're noticing inconsistent miner connectivity or miners failing to be discovered during a bulk import, the read timeout needs to be adjusted.

The following configuration is sufficient for this deployment (from the Pickaxe page, identify the appropriate Pickaxe and click the Configure button):

Timeouts when Pickaxe is running under a VPN.
It's recommended that the write timeout always be 20 SECONDS.

If you continue to notice inconsistent miner connectivity, identifiable by the bullet points at the start of this post, increase the read timeout by a few more SECONDS and try again.

Stay tuned for more updates! If you have any questions, contact us on Discord, Twitter, or send us an email!

Master Your Mining with Foreman. Try it for free today!