Add systemd memory note on install and in config (#11641)

* Add systemd memory note on install

* Add memory usage note to system config for daemon

* Remove limits by default
This commit is contained in:
Rod Vagg 2024-02-23 05:33:06 +11:00 committed by GitHub
parent cb67eebf4b
commit 3a87b3e9e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 5 deletions

View File

@ -246,7 +246,9 @@ install-daemon-service: install-daemon
install -C -m 0644 ./scripts/lotus-daemon.service /etc/systemd/system/lotus-daemon.service
systemctl daemon-reload
@echo
@echo "lotus-daemon service installed. Don't forget to run 'sudo systemctl start lotus-daemon' to start it and 'sudo systemctl enable lotus-daemon' for it to be enabled on startup."
@echo "lotus-daemon service installed."
@echo "To start the service, run: 'sudo systemctl start lotus-daemon'"
@echo "To enable the service on startup, run: 'sudo systemctl enable lotus-daemon'"
install-miner-service: install-miner install-daemon-service
mkdir -p /etc/systemd/system
@ -254,7 +256,9 @@ install-miner-service: install-miner install-daemon-service
install -C -m 0644 ./scripts/lotus-miner.service /etc/systemd/system/lotus-miner.service
systemctl daemon-reload
@echo
@echo "lotus-miner service installed. Don't forget to run 'sudo systemctl start lotus-miner' to start it and 'sudo systemctl enable lotus-miner' for it to be enabled on startup."
@echo "lotus-miner service installed."
@echo "To start the service, run: 'sudo systemctl start lotus-miner'"
@echo "To enable the service on startup, run: 'sudo systemctl enable lotus-miner'"
install-provider-service: install-provider install-daemon-service
mkdir -p /etc/systemd/system

View File

@ -10,9 +10,13 @@ ExecStart=/usr/local/bin/lotus daemon
Restart=always
RestartSec=10
MemoryAccounting=true
MemoryHigh=8G
MemoryMax=10G
# If running a node in a shared, memory constrained environment, enable MemoryAccounting to put
# pressure on allocations. This will slow the process down but keep it approximately within the
# limit specified.
#MemoryAccounting=true
#MemoryHigh=64G
#MemoryMax=96G
LimitNOFILE=8192:10240
[Install]