Relayer – Advanced Settings
There are a variety of settings that can be changed in your relayer configuration to optimize your setup. This evolving document will explore some of the more advanced settings. Keep an eye on this space as more setting tutorials are added.
Workers Setting
In the Configuration->HostIO tab of the relayer dashboard, you can adjust the number of upload workers that serves data from the relayer to the network. The variables affecting the best setting are available bandwidth, available RAM, provider selection, profile of ‘incoming traffic’ from the S3/client apps as well as CPU power (encryption and erasure coding math).
What Workers Do
When data reaches the relayer, it will be combined (if smaller objects) or cut (if larger objects) into ‘chunks’. These ‘chunks’ of data are then given to the workers. Each worker will try and manage 120 network connections and under ideal circumstances with a very good provider list, each individual worker could saturate a 1GB internet connection. However, in actuality, providers vary in network capabilities and a worker will be effected by the slowest provider. Workflow will burst at first and then slow over time. That’s where additional workers can help.
An issue can arise if there are too many workers when a workflow starts. As data comes onto the relayer, all workers will burst at the same time, effectively fighting each other for network bandwidth. This can lead to worker failure as individual connections are starved of bandwidth. When this happens you will notice that your pending uploads on the dashboard stop going to zero as workers continually fail to move data from the relayer to the network.
Recommended Setting
To start with, it is recommended to set the worker setting to 3. This should be good for standard upload bandwidth. If you are able to get consistent 1GB bandwidth or higher, then you can experiment with a higher worker setting for better performance.
To adjust your worker settings from the relayer dashboard, go to the Configuration menu and turn on Advanced Configuration and then click on the HostIO tab as shown below.
From that tab you can adjust the HOSTIO_UPLOAD_WORKERS and then click Save.