Mining on CPU

This tutorial is divided into Windows and Docker, Docker is also suitable for running in the server.

The mining pools currently supporting STC are as follows:

KelepoolDxpoolPoolinViaBTC

Pool Address

ccc.zxxx123.com

port: 22

stc.ss.dxpool.net

port: 9977

stc.ss.poolin.com

port: 443

stc.viabtc.com

port: 3005

Initial Difficulty

7000

10000

8192

Adjustable, for example, fill in the password: fixed=3000

Adjustable, for example, fill in the password: d=3000

For Windows User

Download XMRig

Select and download the win64 version of the XMRig program.

Modify script

After downloading the XMRig program, unzip and right-click to "edit" the start.cmd file.

Modify the content of the start.cmd file:

@echo off
xmrig.exe --donate-level 1 -a cn/r -o ccc.zxxx123.com:22 -u an.1 -p x -k --user-agent Ibctminer/1.0.0
pause

The modified result is shown in the following figure:

Double-click to run

double-click the start.cmd file.

For Docker User

sudo docker run -d -it \
    --name starcoin-xmr \
    --restart=always \
    z0re/xmrig-stc \
    -o ccc.zxxx123.com:22 \
    -u an.1 \
    -p x \
    -a cn/r \
    --donate-level 1 \
    --cpu-max-threads-hint 90

Command Explanation:

  • -d: run the container in the background;

  • --name starcoin-xmr: specify the container name;

  • --restart=always: If the container exits unexpectedly, it will automatically restart;

  • -o ccc.zxxx123.com:22: mining pool address, such as cola ccc.zxxx123.com:22;

  • -u an.1: <sub-account name>.<number>, such as an.1;

  • -p x : password, just fill x;

  • -a cn/r: algorithm, cn/r, do not change, only use this;

  • --donate-level: dev fee;

  • --cpu-max-threads-hint 90: CPU usage ratio;

Performance Optimization

Enable Huge Pages

According to the official documentation of XMRig, enabling Huge Pages can increase the computing power by 20%~30%. The tutorial is as follows.

For Windows

Step 1:

Windows Server 2003 Resource Kit Tools must be installed first (provides SeLockMemoryPrivilege function)

Download link: https://wwa.lanzoui.com/b0f8hmm6b password: star

After downloading, unzip it, and install rktools as an administrator. If it prompts an incompatible popup, you can close it and ignore it.

Step 2:

Open a CMD window with administrator:

Enter the following command in the CMD window:

ntrights -u "这里换成自己的Windows账户名" +r SeLockMemoryPrivilege

Note:

Press and hold [Ctrl+Alt+Delete] to open the task manager. You can see your account name in the task manager. The screenshot is as follows.

The prompt "successful" is successful, and then you must restart the computer! ! !

Step 3:

After restarting the computer, run the script again to see the effect.

For Linux

Temporarily enable:

sudo sysctl -w vm.nr_hugepages=1280

Persistence is enabled (it also takes effect after restart):

sudo bash -c "echo vm.nr_hugepages=1280 >> /etc/sysctl.conf"

Modify the CPU thread usage occupancy ratio

Modify file: start.cmd

--cpu-max-threads-hint 80: The ratio of the maximum number of threads automatically configured.

Modify the number of threads

Modify file: start.cmd

-t 4: specify 4 threads; don't tune too much, it may backfire;

Check the number of threads in effect:

Last updated