Skip to content

Ubuntu setup

xmrig edited this page Jul 30, 2017 · 4 revisions

Limits

If you want handle more than 1000 connections, you need increase limits of open files. It mandatory.

View current limit:

ulimit -n

Temporary increase limit for current session:

ulimit -n 65000

For non root user maximum number of open files is limited.

For persistent increase limits you need add to end of /etc/security/limits.conf file these lines:

proxyuser hard nofile 1048576
proxyuser soft nofile 1048576

Sometimes, especially in virtual environment need increase also limit in /proc/sys/fs/file-max, for example:

echo 800000 > /proc/sys/fs/file-max

More information https://unix.stackexchange.com/questions/36841/why-is-number-of-open-files-limited-in-linux

Swap

Enabling swap is highly recommend to improve system stability on high load.

Good manual https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04

Clone this wiki locally