记录下Nvidia jetson Xavier / TX2 /NX 云服务器/Dell笔记本 G5 1660ti 上挖矿软件编译尝试
结果:
网上看到的最好的tx2性能记录: eth 1MH/s
按照理论推测,xavier怎么也得有10~20M H/s,实际结果:我在jetson Xavier上编译,挖矿性能结果: eth 0.1~0.2MH/s
在Dell G5 1660ti独立显卡笔记本上挖矿性能:25~28MH/s
在2080Ti独显塔式服务器上挖矿性能:48~58MH/s
比较看好加载3080独立显卡的笔记本,希望近期有机会进一步测试。
以上性能与鱼池等信息基本相符。
在云GPU服务器上编译性能与鱼池基本相符。
过程
挖矿源码:ethminer
从github下载ethminer https://github.com/ethereum-mining/ethminer
$ git clone https://github.com/ethereum-mining/ethminer
编译ethminer
$ git submodule update --init --recursive
$ mkdir build
$ cd build
$ cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF # 配置CUDA,默认使用OpenCL
## 有些包网络下载可能很慢,可以先下载后放在指定位置。
$ sudo make install
编译成功结果示例:
root@ecs-87b5:/workspace/mining_test/ethminer/build# sudo make install
Scanning dependencies of target ethminer-buildinfo-git
[ 0%] Built target ethminer-buildinfo-git
[ 3%] Updating ethminer-buildinfo:
Project Version: 0.19.0-18+commit.64229f3c.dirty (prerelease)
System Name: linux
System Processor: x86_64
Compiler ID: gnu
Compiler Version: 5.4.0
Build Type: release
Git Info: 0.19.0 18 64229f3c967f63d924240bb68b87474e8e25c414 (dirty)
Timestamp: 2021-03-10T22:13:10
Scanning dependencies of target ethminer-buildinfo
[ 6%] Building C object CMakeFiles/ethminer-buildinfo.dir/ethminer/buildinfo.c.o
[ 9%] Linking C static library ethminer/libethminer-buildinfo.a
[ 9%] Built target ethminer-buildinfo
Scanning dependencies of target devcore
[ 12%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonData.cpp.o
[ 15%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Worker.cpp.o
[ 18%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Log.cpp.o
[ 21%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FixedHash.cpp.o
[ 25%] Linking CXX static library libdevcore.a
[ 25%] Built target devcore
Scanning dependencies of target hwmon
[ 28%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wraphelper.cpp.o
[ 31%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapnvml.cpp.o
[ 34%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapadl.cpp.o
[ 37%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapamdsysfs.cpp.o
[ 40%] Linking CXX static library libhwmon.a
[ 40%] Built target hwmon
[ 43%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
ptxas info : 0 bytes gmem, 264 bytes cmem[3]
ptxas info : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_30'
ptxas info : Function properties for _Z25ethash_calculate_dag_itemj
400 bytes stack frame, 660 bytes spill stores, 424 bytes spill loads
ptxas info : Used 63 registers, 324 bytes cmem[0], 36 bytes cmem[2]
ptxas info : Compiling entry function '_Z13ethash_searchPV14Search_resultsm' for 'sm_30'
ptxas info : Function properties for _Z13ethash_searchPV14Search_resultsm
80 bytes stack frame, 196 bytes spill stores, 176 bytes spill loads
ptxas info : Used 63 registers, 336 bytes cmem[0], 32 bytes cmem[2]
ptxas info : 0 bytes gmem, 264 bytes cmem[3]
ptxas info : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_35'
ptxas info : Function properties for _Z25ethash_calculate_dag_itemj
208 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 94 registers, 324 bytes cmem[0]
ptxas info : Compiling entry function '_Z13ethash_searchPV14Search_resultsm' for 'sm_35'
ptxas info : Function properties for _Z13ethash_searchPV14Search_resultsm
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 84 registers, 336 bytes cmem[0]
ptxas info : 0 bytes gmem, 264 bytes cmem[3]
ptxas info : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_50'
ptxas info : Function properties for _Z25ethash_calculate_dag_itemj
208 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 79 registers, 324 bytes cmem[0]
ptxas info : Compiling entry function '_Z13ethash_searchPV14Search_resultsm' for 'sm_50'
ptxas info : Function properties for _Z13ethash_searchPV14Search_resultsm
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 95 registers, 336 bytes cmem[0]
ptxas info : 0 bytes gmem, 264 bytes cmem[3]
ptxas info : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_52'
ptxas info : Function properties for _Z25ethash_calculate_dag_itemj
208 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 79 registers, 324 bytes cmem[0]
ptxas info : Compiling entry function '_Z13ethash_searchPV14Search_resultsm' for 'sm_52'
ptxas info : Function properties for _Z13ethash_searchPV14Search_resultsm
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 95 registers, 336 bytes cmem[0]
ptxas info : 0 bytes gmem, 264 bytes cmem[3]
ptxas info : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_53'
ptxas info : Function properties for _Z25ethash_calculate_dag_itemj
208 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 79 registers, 324 bytes cmem[0]
ptxas info : Compiling entry function '_Z13ethash_searchPV14Search_resultsm' for 'sm_53'
ptxas info : Function properties for _Z13ethash_searchPV14Search_resultsm
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 95 registers, 336 bytes cmem[0]
ptxas info : 0 bytes gmem, 264 bytes cmem[3]
ptxas info : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_60'
ptxas info : Function properties for _Z25ethash_calculate_dag_itemj
208 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 80 registers, 324 bytes cmem[0]
ptxas info : Compiling entry function '_Z13ethash_searchPV14Search_resultsm' for 'sm_60'
ptxas info : Function properties for _Z13ethash_searchPV14Search_resultsm
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 87 registers, 336 bytes cmem[0]
ptxas info : 0 bytes gmem, 264 bytes cmem[3]
ptxas info : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_61'
ptxas info : Function properties for _Z25ethash_calculate_dag_itemj
208 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 79 registers, 324 bytes cmem[0]
ptxas info : Compiling entry function '_Z13ethash_searchPV14Search_resultsm' for 'sm_61'
ptxas info : Function properties for _Z13ethash_searchPV14Search_resultsm
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 95 registers, 336 bytes cmem[0]
ptxas info : 0 bytes gmem, 264 bytes cmem[3]
ptxas info : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_62'
ptxas info : Function properties for _Z25ethash_calculate_dag_itemj
208 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 79 registers, 324 bytes cmem[0]
ptxas info : Compiling entry function '_Z13ethash_searchPV14Search_resultsm' for 'sm_62'
ptxas info : Function properties for _Z13ethash_searchPV14Search_resultsm
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 95 registers, 336 bytes cmem[0]
ptxas info : 0 bytes gmem, 264 bytes cmem[3]
ptxas info : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_70'
ptxas info : Function properties for _Z25ethash_calculate_dag_itemj
208 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 78 registers, 356 bytes cmem[0]
ptxas info : Compiling entry function '_Z13ethash_searchPV14Search_resultsm' for 'sm_70'
ptxas info : Function properties for _Z13ethash_searchPV14Search_resultsm
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 101 registers, 368 bytes cmem[0]
ptxas info : 0 bytes gmem, 264 bytes cmem[3]
ptxas info : Compiling entry function '_Z25ethash_calculate_dag_itemj' for 'sm_75'
ptxas info : Function properties for _Z25ethash_calculate_dag_itemj
208 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 76 registers, 356 bytes cmem[0]
ptxas info : Compiling entry function '_Z13ethash_searchPV14Search_resultsm' for 'sm_75'
ptxas info : Function properties for _Z13ethash_searchPV14Search_resultsm
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 100 registers, 368 bytes cmem[0]
Scanning dependencies of target ethash-cuda
[ 46%] Building CXX object libethash-cuda/CMakeFiles/ethash-cuda.dir/CUDAMiner.cpp.o
[ 50%] Linking CXX static library libethash-cuda.a
[ 50%] Built target ethash-cuda
Scanning dependencies of target ethcore
[ 53%] Building CXX object libethcore/CMakeFiles/ethcore.dir/EthashAux.cpp.o
[ 56%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Farm.cpp.o
[ 59%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Miner.cpp.o
[ 62%] Linking CXX static library libethcore.a
[ 62%] Built target ethcore
Scanning dependencies of target poolprotocols
[ 65%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolURI.cpp.o
[ 68%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolManager.cpp.o
[ 71%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/testing/SimulateClient.cpp.o
[ 75%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/stratum/EthStratumClient.cpp.o
[ 78%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/getwork/EthGetworkClient.cpp.o
[ 81%] Linking CXX static library libpoolprotocols.a
[ 81%] Built target poolprotocols
Scanning dependencies of target apicore
[ 84%] Building CXX object libapicore/CMakeFiles/apicore.dir/ApiServer.cpp.o
[ 87%] Linking CXX static library libapicore.a
[ 87%] Built target apicore
Scanning dependencies of target ethminer
[ 90%] Building CXX object ethminer/CMakeFiles/ethminer.dir/main.cpp.o
[ 93%] Building C object ethminer/CMakeFiles/ethminer.dir/buildinfo.c.o
[ 96%] Linking CXX executable ethminer
[100%] Built target ethminer
Linking CXX executable CMakeFiles/CMakeRelink.dir/ethminer
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/ethminer
挖矿前设备信息检查可以正常看到GPU信息:
$ ./ethminer -U --list-devices
## 输出范例
Listing CUDA devices.
FORMAT: [deviceID] deviceName
[0] NVIDIA Tegra X2
Compute version: 6.2
cudaDeviceProp::totalGlobalMem: 8235802624
Pci: 0000:00:00
##在云服务器上运行输出范例
root@ecs-87b5:/usr/local/bin# ./ethminer -U --list-devices
ethminer 0.19.0-17+commit.ce52c740.dirty
Build: linux/release/gnu
Id Pci Id Type Name CUDA SM Total Memory
--- --------- ---- ----------------------------- ---- --- ------------
0 21:01.0 Gpu Tesla T4 Yes 7.5 14.62 GB
1 21:02.0 Gpu Tesla T4 Yes 7.5 14.62 GB
2 21:03.0 Gpu Tesla T4 Yes 7.5 14.62 GB
3 21:04.0 Gpu Tesla T4 Yes 7.5 14.62 GB
参数解释:
-U: 指定使用CUDA方法进行计算 (-G是使用OpenCL,Jetson不支持…)
-S: 指定矿池地址
-FS: Failover矿池地址,当-S指定的矿池出现故障后会自动切换到这个地址
-O: 指定自己的钱包地址,否则就白费功夫啦
-SP: 指定stratum协议版本,需要跟矿池匹配,这里使用‘1’
-SE: 可以制定一个自己的邮件地址,可能后面会发送统计信息到这里
使用f2pool进行挖矿的命令:
我的挖矿启动命令如下:首先在f2pool注册一个账户,替换“bobby2021.ethminer”中第一个字段(user),后面的字段(worker)是自定义,方便自己有多个机器同时工作区分不同的机器。这样就可以在f2pool网站看到挖矿状况及收益。
##f2pool 中国区 启动挖矿
$ ./ethminer -P stratum1+tcp://bobby2021.ethminer@eth.f2pool.com:6688
## f2pool cloud server
root@ecs-87b5:/usr/local/bin# ./ethminer -U -P stratum://bobby2021.hwethminer@eth.f2pool.com:6688
————————————————
原文链接:https://blog.csdn.net/weixin_43480227/article/details/114323718