Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoSt workers page #114

Merged
merged 31 commits into from
Apr 12, 2022
Merged
Changes from 5 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bfeb28f
Draft for PoSt workers page
rjan90 Mar 28, 2022
d578cba
Add optional settings
rjan90 Mar 29, 2022
945b4c7
Multiple partitions section
rjan90 Mar 29, 2022
2305533
File descriptor limt setting
rjan90 Mar 29, 2022
b40bbf6
Remote Storage Access
rjan90 Mar 29, 2022
87ffd0d
Testing the setup section
rjan90 Mar 29, 2022
af5f759
Full path relref
rjan90 Mar 29, 2022
93f1336
Copy Proof-params
rjan90 Mar 30, 2022
d4a006b
Updated parallel-read
rjan90 Mar 30, 2022
d656397
Considerations
rjan90 Mar 30, 2022
bbba97e
Cleaning more env-variables
rjan90 Mar 30, 2022
6ceeb23
Remove a false statement
rjan90 Mar 30, 2022
e936fa3
Small fix
rjan90 Mar 30, 2022
07cdc67
Update storage section
rjan90 Mar 31, 2022
4c4373a
Nvidia-driver mentions
rjan90 Mar 31, 2022
55e159f
Adding output of `proving workers`
rjan90 Apr 4, 2022
003fb74
Fix spelling/typos
rjan90 Apr 4, 2022
ad88f83
Some cosmetic changes
rjan90 Apr 4, 2022
105ed56
Fix spelling
rjan90 Apr 4, 2022
e7289a4
Fix spelling
rjan90 Apr 4, 2022
8a06944
Fix spelling
rjan90 Apr 4, 2022
a55d3e0
Link to local fd-limit guide
rjan90 Apr 4, 2022
35e74ba
Remove parant-cache
rjan90 Apr 4, 2022
a77d65d
PoSt task will disable other tasks
rjan90 Apr 5, 2022
9a8ace2
winningPoSt spec
rjan90 Apr 7, 2022
2342ed1
Fixes configure link.
johnnymatthews Apr 7, 2022
e0daf11
Remove advanced settings
rjan90 Apr 11, 2022
2739ed6
Fixes relref link.
johnnymatthews Apr 12, 2022
0258be9
Typo and remove a line
rjan90 Apr 12, 2022
38bb67d
Update content/en/storage-providers/seal-workers/post-workers.md
jennijuju Apr 12, 2022
7e27607
Update post-workers.md
jennijuju Apr 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 145 additions & 0 deletions content/en/storage-providers/seal-workers/post-workers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
title: "PoSt workers"
description: "PoSt workers are specilized instances of a `lotus-worker`. It enables you to offload windowPoSt and winningPoSt to seperate workers."
rjan90 marked this conversation as resolved.
Show resolved Hide resolved
lead: "PoSt workers are specilized instances of a `lotus-worker`. It enables you to offload windowPoSt and winningPoSt to seperate workers."
rjan90 marked this conversation as resolved.
Show resolved Hide resolved
draft: false
menu:
storage-providers:
parent: "storage-providers-seal-workers"
aliases:
rjan90 marked this conversation as resolved.
Show resolved Hide resolved
- /docs/storage-providers/seal-workers/
weight: 120
toc: true
---

jennijuju marked this conversation as resolved.
Show resolved Hide resolved
While the Lotus Miner runs _windowPoSt_ and _winningPoSt_ by default, you can use specialized lotus workers to create a cluster of windowPoSt and winningPoSt workers to handle multiple Proof-of-Spacetime partitions simultaneously.
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

A lotus worker instance can only be one of the following:
- WindowPoSt worker
- WinningPoSt worker
- Worker for sealing tasks
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

## Launching PoSt workers

Before launching your PoSt worker you need to ensure that your worker meets the minimal requirements for the job it is going to perfom. You should also consider

### Minminal spec requirements
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

These are the minimal requirements for running each of the PoSt tasks:

| **Task** | **GPU** | **VRAM** | **RAM** |
|:-----------:|:------------------:|:--------:|:-------:|
| winningPoSt | Highly recommended | | |
| windowPoSt | Highly recommended | 8\.5GiB | 128GiB |

{{< alert icon="callout" >}}
Although both tasks can be run with a powerful CPU, it is highly recommended to run on GPU as it speeds up the process significantly, and therefore reducing the chance to miss windowPoSt or winningPoSt
rjan90 marked this conversation as resolved.
Show resolved Hide resolved
{{< /alert >}}

### Remote storage access

The windowPoSt process requires reading random leafs of all the sealed sectors in a proving deadline, so when setting up windowPoSt workers one needs to consider how the workers can access those files. By default

At least one PoSt worker needs local read access to the sealed sectors. If you have multiple PoSt workers, workers without local sector access will ask workers with sector access to read challenges from their storage.

The lotus-miner instance disables PoSt-work when a PoSt worker is connected, meaning that a single windowPoSt worker can not rely on reading challenges from the lotus-miner instance. And therefore needs read access to the sealed sectors.

{{< alert icon="warning" >}}
Storage providers should design their sealed sector access depending on their setup size and also redundancy required. If only one PoSt worker has access to the sealed sector that can create a single point of failure. If you have multiple partitions in a deadline, having multiple PoSt workers reading challenges from the same source may cause unwanted I/O load.
{{< /alert >}}

### Environment variables

Ensure that workers have access to the following environment variables when they run. These are similar to those used by the Miner daemon ([explained in the setup guide]({{< relref "setup" >}})):
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

```
# MINER_API_INFO as obtained before
export MINER_API_INFO:<TOKEN>:/ip4/<miner_api_address>/tcp/<port>/http`
export MARKETS_API_INFO:<TOKEN>:/ip4/<miner_api_address>/tcp/<port>/http`
export BELLMAN_CPU_UTILIZATION=0.875 # optimal value depends on exact hardware
export FIL_PROOFS_MAXIMIZE_CACHING=1
export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1 # when GPU is available
export FIL_PROOFS_USE_GPU_TREE_BUILDER=1 # when GPU is available
export FIL_PROOFS_PARAMETER_CACHE=/fast/disk/folder # > 100GiB!
export FIL_PROOFS_PARENT_CACHE=/fast/disk/folder2 # > 50GiB!
rjan90 marked this conversation as resolved.
Show resolved Hide resolved
```

The PoSt workers will fail to start if the file descriptor limit is not set high enough. Raise the the file descriptor limit temporarily before running with `ulimit -n 1048576` or permanently by following the [Permanently Setting Your ULIMIT System Value](https://github.com/filecoin-project/lotus/discussions/6198) guide.
rjan90 marked this conversation as resolved.
Show resolved Hide resolved
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

rjan90 marked this conversation as resolved.
Show resolved Hide resolved
{{< alert icon="tip" >}}
When initially fetching parameter files, remember to set the [`IPFS_GATEWAY` variable when running from China]({{< relref "nodes-in-china" >}})
{{< /alert >}}

### Run the PoSt worker

```shell
lotus-worker run <flags>
```

The above command will start the worker. You´ll need to specify which PoSt operation you want the worker to perform with one of the following flags set to true.
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

```
--winningpost enable winning post (default: false)
--windowpost enable window post (default: false)
```
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

A PoSt worker instance can only be either a winningPoSt worker, or a windowPoSt worker.

When a winningPoSt or windowPoSt worker connects to the _lotus-miner_, the lotus miner will delegate all winningPoSt or windowPoSt tasks to that worker. If both tasks are delegated to seperate PoSt workers, no PoSt tasks will be executed locally on the miner instance. If a worker is stopped, the lotus-miner instance switches back to local PoSt automatically.
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

You can verify that PoSt workers are connected to the lotus-miner with `lotus-miner proving workers`:
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

```shell
$ lotus-miner proving workers
Worker 0, host computer
CPU: [ ] 0 core(s) in use
RAM: [|||||||||||||||||| ] 28% 18.1 GiB/62.7 GiB
VMEM: [|||||||||||||||||| ] 28% 18.1 GiB/62.7 GiB

Worker 1, host othercomputer
CPU: [ ] 0 core(s) in use
RAM: [|||||||||||||| ] 23% 14 GiB/119.2 GiB
VMEM: [|||||||||||||| ] 23% 14 GiB/119.2 GiB
GPU: GeForce RTX 2080, not used
```

You can also verify that PoSt workers are connected in the workers-section of `lotus-miner info`.
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

```shell
$ lotus-miner info
Workers:
Seal: 15
WdPoSt: 4
WinPoSt: 3
```
rjan90 marked this conversation as resolved.
Show resolved Hide resolved

### Optional settings

Although the default settings are reasonable you can configure some advanced settings when running the PoSt workers, that can be tested for local optimizations of your hardware.

rjan90 marked this conversation as resolved.
Show resolved Hide resolved
```
--post-parallel-reads value maximum number of parallel challenge reads (0 = no limit) (default: 0)
```

Lets you set an upper boundary of how many challenges it reads from your storage simultaneously. At defualt this is set to no limit, meaning that it will try to read all challenges at the same time from your storage.

```
rjan90 marked this conversation as resolved.
Show resolved Hide resolved
--post-read-timeout value time limit for reading PoSt challenges (0 = no limit) (default: 0s)
rjan90 marked this conversation as resolved.
Show resolved Hide resolved
```

Lets you set a cut off time for reading challenges from storage, after which it will abort the job. At default this is set to no limit.

## Multiple partitions

If you have multiple partitions in a single proving deadline, each partition will run on seperate workers in parallel, up to the number of partitions.

Consider this proving deadline with four full partitions:

```
rjan90 marked this conversation as resolved.
Show resolved Hide resolved
lotus-miner proving deadlines
Miner: f011235
deadline partitions sectors (faults) proven partitions
0 4 9396 (0) 0
```

If the storage provider has four windowPoSt workers connected, each of the partitions will be computed on each of the workers in parallel. If one windowPoSt worker gets disconnected, leaving you with only three windowPoSt workers, the first three partitions will be computed in parallel, while the last partition will be picked up by the first windowPoSt worker to finish its computation.