When I run cpuminer-multi as a normal user, the first message I get is "I go faster as root". It indeed does not appear anymore when run as root (with command
What is made possible by being root? Is it safe?
Monero Stack Exchange is a question and answer site for developers and users of the secure, private and untraceable cryptocurrency Monero. It only takes a minute to sign up.Sign up to join this community
There are two operations at the operating system level that can be perform to improve performance in some cases but require the software to be run as superuser (root). This is mostly useful for a user who want to mine while using their computer intensively for other tasks (see comments by Gilles and hyc below).
Niceness on Unix systems is a level of priority for a task relatively to others. It is enforced by the kernel. If priority is the same as other tasks, the access to the CPU is not optimal.
Niceness is set to 6 instead of the default 20 (the lower the niceness is, the higher the priority is)
If the system does not have enough RAM, part of it might be moved to the swap space when not used and then moved again to RAM when needed. This cause CPU time to be spoiled.
The system call
[mlock] allows to lock a variable in RAM.
persistentctx (of type
cryptonight_ctx) contains the context of Cryptonight algorithm and is protected.
Is it safe ?
You must be careful when running a software as root on your computer. There is however no risk here is you've download the mining software from the official repository.