e2a1ca7caa
Worker processes may have memory limitations imposed by Systemd. But /proc/meminfo shows the entire system memory regardless of these limits. This results in the scheduler believing the worker has the entire system memory avaliable and the worker being allocated too many tasks. This change attempts to read cgroup memory limits for the worker process. It supports cgroups v1 and v2, and compares cgroup limits against the system memory and returns the most conservative values to prevent the worker from being allocated too many tasks and potentially triggering an OOM event. |
||
---|---|---|
.. | ||
docs | ||
ffiwrapper | ||
fr32 | ||
fsutil | ||
mock | ||
partialfile | ||
sealtasks | ||
stores | ||
storiface | ||
tarutil | ||
cbor_gen.go | ||
cgroups_linux.go | ||
cgroups.go | ||
faults.go | ||
manager_calltracker.go | ||
manager_test.go | ||
manager.go | ||
piece_provider_test.go | ||
piece_provider.go | ||
README.md | ||
request_queue_test.go | ||
request_queue.go | ||
resources.go | ||
roprov.go | ||
sched_resources.go | ||
sched_test.go | ||
sched_worker.go | ||
sched.go | ||
selector_alloc.go | ||
selector_existing.go | ||
selector_task.go | ||
stats.go | ||
teststorage_test.go | ||
testworker_test.go | ||
worker_calltracker.go | ||
worker_local.go | ||
worker_tracked.go |
sector-storage
a concrete implementation of the specs-storage interface
The sector-storage project provides a implementation-nonspecific reference implementation of the specs-storage interface.
Disclaimer
Please report your issues with regards to sector-storage at the lotus issue tracker
Architecture
Manager
Manages is the top-level piece of the storage system gluing all the other pieces together. It also implements scheduling logic.
package stores
This package implements the sector storage subsystem. Fundamentally the storage
is divided into path
s, each path has it's UUID, and stores a set of sector
'files'. There are currently 3 types of sector files - unsealed
, sealed
,
and cache
.
Paths can be shared between nodes by sharing the underlying filesystem.
stores.Local
The Local store implements SectorProvider for paths mounted in the local filesystem. Paths can be shared between nodes, and support shared filesystems such as NFS.
stores.Local implements all native filesystem-related operations
stores.Remote
The Remote store extends Local store, handles fetching sector files into a local store if needed, and handles removing sectors from non-local stores.
stores.Index
The Index is a singleton holding metadata about storage paths, and a mapping of sector files to paths
LocalWorker
LocalWorker implements the Worker interface with ffiwrapper.Sealer and a store.Store instance
License
The Filecoin Project is dual-licensed under Apache 2.0 and MIT terms:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)