Pages:
Author

Topic: [ANN] cpuminer-opt v3.14.2, open source optimized multi-algo CPU miner (Read 10368 times)

full member
Activity: 1424
Merit: 225
cpuminer-opt-24.7

v24.7 adds support for Windows 11 on ARM CPUs. There are some problems with it but there is a workaound.
For the technical details go to https://github.com/JayDDee/cpuminer-opt/issues/440. Build instructions are
included there as well as on the wiki: Building for Windows, the easy way.

In short building for Windows on ARM uses the same procedure as building for Windows on x86_64 by using MSys2 & MingW
with some CFLAGS changes and using clang instead of gcc.

Please report your experience, especially wether it works without the workaround or doesn't work at all even with the
workaround. Please include CPU model, Windows 11 build and any other pertinent information.
full member
Activity: 1424
Merit: 225
You could have added the yescrypt R16, yescryptR32 to the algo list.

Read the Wiki.
newbie
Activity: 6
Merit: 0
Hello JayDDee,
Thanks for the yespower suggestion. Now, it mines, although the rate is very less. I also tried yescrypt R8, and it was a little faster. You could have added the yescrypt R16, yescryptR32 to the algo list. Maybe, those could have been faster.
As to increase the speed, what is your suggestion regarding purchasing a USB asic stick? Are they really beneficial, or give the same performance as CPU?

And, by the way, i think only few algorithm in the list of algo on cpuminer are actually cpu friendly. Many as I see from pool websites seem to be asic/gpu based.

Sincerely,
full member
Activity: 1424
Merit: 225
You're not using CPU friendly algorithms, try something else like yespower.
Verify your command like arguments with the pool's instructions.

Hello JayDDee,
Well, as far as I searched with several pools, Yespower algo and their corollaries are for some strange altcoins, in which I do not have wallets registered currently. Can I use yespower for mining standard cryptos like BTC, DOGE, SHIB, ADA etc.? If so, which pool uses this algorithm?

No, most coins can only be mined with only one algo, there a couple who can be mined with several different ones.
If you mine at a pool with auto-exchange you can mine one coin and get paid in another, the details how are specific to each pool.
There are many pools with threads in the altcoin pools sub-forum.
newbie
Activity: 6
Merit: 0
You're not using CPU friendly algorithms, try something else like yespower.
Verify your command like arguments with the pool's instructions.

Hello JayDDee,
Well, as far as I searched with several pools, Yespower algo and their corollaries are for some strange altcoins, in which I do not have wallets registered currently. Can I use yespower for mining standard cryptos like BTC, DOGE, SHIB, ADA etc.? If so, which pool uses this algorithm?
full member
Activity: 1424
Merit: 225
You're not using CPU friendly algorithms, try something else like yespower.
Verify your command like arguments with the pool's instructions.
newbie
Activity: 6
Merit: 0

The logs are described on the Wiki.
https://github.com/JayDDee/cpuminer-opt/wiki/Console-Logs

Mining Doge is virtually imposible with a CPU, or even a high end GPU. In this example it would take over 1 day just to find a share & 8 years for a block
at your CPU's 25kh/s hash rate.

Hello JayDDee,
I think the problem is not so much with the hash rate, but the configuration and syntax. Because, in XMrig, using randomx and ghostrider algos, I am at least able to mine a few satoshis using a hash rate of just 1Kh/s. Moreover, if I use sha512256d algo, the specifications are:

New Work: Block 235252, Tx 8, Netdiff 1.3306e+07, Job 000012ae                                                                      
                      Diff: Net 1.3306e+07, Stratum 6, Target 6
                      TTF @ 4812.32 kh/s: Block 376y11d, Share 1h29m
                      Net hash rate (est) 213.24 Th/s

But, still it does not show up in the https://unmineable.com website, and neither does the balance increase. So, I think the commend I use is not right.

My command is:

./cpuminer -a sha512256d -o stratum+ssl://sha512256d.unmineable.com -u DOGE:D5rXt2Q3HGkFbGUwN7UpaJLoVs4KH52v4d.unmineable_worker_dogeappa -p x

So, is the above command right? If so, does not the url work with cpuminer? Im that case, what is a suitable url to use? Kindly answer this promptly.

Sincerely,
newbie
Activity: 6
Merit: 0
Hello JayDDee,
I agree that some memecoins are crazy. But, like Doge itself was a memecoin in its beginning days, right.  I used the randomx or ghostrider algos to mine SHIB as well as some few satoshis. Are they not PoW?

Yes, cryptofaucets seem to give crypto for free, but one thing they want is our precious time. In this way, they seem to be on par with mining, in the sense that mining uses our electric power, time, machines; and faucets use time; so faucets are somewhat better for me personally. Atleast with CPU, they are the way for easy crypto. And for robust ASICs, it requires prior investment, which is difficult for newbies and financially backwards like me.

Sincerely,

full member
Activity: 1424
Merit: 225
Hello JayDDee,
Thanks for your quick reply. So then, CPU miner will not even help you earn even 1 DOGE coin in a day. By the way, I think crypto faucets are better in earning potential than CPU miner with my CPU.

I also tried XM Rig for mining. Though not completely staisfying, I am at least earning few meme coins through it. Don't you have support for new meme coins like Shiba Inu, Pepe coins, Floki etc.?

Sincerely,

The choice of coin, specifically the POW algorithm it uses, makes the difference. With XMrig you weren't trying to mine Doge.
cpuminer-opt supports many algorithms that are more CPU friendly. Algos like sha256, scrypt, X11, etc have high performance ASIC based miners that blow any CPU or GPU out of the water.

cpuminer-opt supports POW mining algorithms. It can mine any coins that uses one of these algorithms. Meme coins are just a marketing gimmick to lure newbies and many don't use real POW
or have some made up "algorithm" to make it look good.

Faucets dilute any value the coin might otherwise have. There's no value in something you can get for free.
newbie
Activity: 6
Merit: 0
Hello JayDDee,
Thanks for your quick reply. So then, CPU miner will not even help you earn even 1 DOGE coin in a day. By the way, I think crypto faucets are better in earning potential than CPU miner with my CPU.

I also tried XM Rig for mining. Though not completely staisfying, I am at least earning few meme coins through it. Don't you have support for new meme coins like Shiba Inu, Pepe coins, Floki etc.?

Sincerely,
full member
Activity: 1424
Merit: 225
Hello JayDDee,
I just downloaded CPU miner on Debian and started to mine for doge. But, I am unable to understand the comments the terminal shows. Like in this typical message, what are the meanings of various terms and numbers:

New Block 10317097, Tx 0, Netdiff 1669.2, Job 11d29
                      Diff: Net 1669.2, Stratum 50000, Target 0.76294
                      TTF @ 25.54 kh/s: Block 8y8d, Share 1d11h
                      Net hash rate (est) 231.26 Gh/s

It would be of great help if you could help in understanding these terms, as I am new to crypto mining and interested in learning about them.

Sincerely,

The logs are described on the Wiki.
https://github.com/JayDDee/cpuminer-opt/wiki/Console-Logs

Mining Doge is virtually imposible with a CPU, or even a high end GPU. In this example it would take over 1 day just to find a share & 8 years for a block
at your CPU's 25kh/s hash rate.
newbie
Activity: 6
Merit: 0
Hello JayDDee,
I just downloaded CPU miner on Debian and started to mine for doge. But, I am unable to understand the comments the terminal shows. Like in this typical message, what are the meanings of various terms and numbers:

New Block 10317097, Tx 0, Netdiff 1669.2, Job 11d29
                      Diff: Net 1669.2, Stratum 50000, Target 0.76294
                      TTF @ 25.54 kh/s: Block 8y8d, Share 1d11h
                      Net hash rate (est) 231.26 Gh/s

It would be of great help if you could help in understanding these terms, as I am new to crypto mining and interested in learning about them.

Sincerely,

full member
Activity: 1424
Merit: 225
Here are some tips to help using cpu-affinity with hybrid CPUs. Hybrid CPUs have 2 types of cores, big or performance cores with small or efficiency cores.
ARM CPUs have used hybrid CPUs for several years, Intel since Alderlake and now AMD with Zen5.

The first thing is to identify which cores are which. This can be achieved by adding "--hash-meter" option which will display a hashrate for each CPU core.

The different hashrates easily identify the performance vs efficiency cores. This is simple for ARM & AMD but a little more complicated for Intel. Intel hybrid CPUs
only have SMT (hyperthreading) on the performance cores so it would be comparing hyperthreaded P-cores with non hyperthreaded E-cores. This is not
a valid comparison and could show misleading results.

For Intel CPUs hyperthreading can be disabled in the BIOS but that is drastic just for testing. Instead, a single thread can be run affined to each core in turn to
get a reliable comparison not affected by hyperthreading. In the end the best performance may be had on some algos by running only one thread on the P-cores
avoiding hyperthreading, while running a thread on all the E-cores which don't support hyperthreading. This will require a more complicated affinity mask than
would typically be used on Ryzen, ARM or non-hybrid Intel CPUs.

Since Ryzen supports hyperthreading on both P & E cores, and ARM doesn't support hyperthreading at all a simple test with all threads running will quickly identify
which cores are which type. It is less likely to require changing the affinity mask strategy on these CPUs so it's mostly just for informational purposes.

Here's sample output from an Orange Pi 5 Plus clearly showing a hybrid CPU with 2 very distinct performance levels representing the different core types:
Code:
[2024-06-30 00:31:57] Thread 0, CPU 0: 26.05 h/s
[2024-06-30 00:31:57] Thread 3, CPU 3: 25.09 h/s
[2024-06-30 00:31:57] Thread 1, CPU 1: 24.14 h/s
[2024-06-30 00:31:57] Thread 2, CPU 2: 23.97 h/s
[2024-06-30 00:31:59] Thread 4, CPU 4: 89.12 h/s
[2024-06-30 00:31:59] Thread 5, CPU 5: 86.82 h/s
[2024-06-30 00:31:59] Thread 6, CPU 6: 88.70 h/s
[2024-06-30 00:31:59] Thread 7, CPU 7: 87.18 h/s

Unfortunately I don't have a sample from an Intel hybrid CPU which would more useful in illustrating its more complicated architecture.
full member
Activity: 1424
Merit: 225
cpuminer-opt-24.3 has been available for a few days with some updates to prepare for new CPUs with new features. For those who don't update frequently
this is a good time to do so.
Update: cpuminer-opt-24.4 has been released with a couple of bug fixes and other improvements. Always check for the latest release.

All of the features listed below are now detected and reported by cpuminer-opt. Some features don't have compiler support yet.
No changes to Windows package are planned at this time.

AMD Zen5: just announced, no new features but improved AVX512 performance. Some Zen5 CPUs may be Zen5c or hybrid. All Zen5 CPUs will support AVX512.
Compiling for Zen5 requires GCC-14 but the Zen4 build with AVX512, SHA & VAES is almost identical.

ARM: Qualcom has announced Windows will be available on ARM laptops. There is no way yet to build cpuminer-opt for Windows on ARM, A Ubuntu VM is recomended,
however mining with laptops in general is not recommended.

SHA512: This feature is already available on some ARM CPUs and will become avalable on Intel CPUs with Arrowlake-S. Ryzen support is not yet known. SHA512 will not
have a big impact on mining. It's used mostly in long chained algos, X16 and longer, therefore only represents a small portion of the entire POW algo. I have not found a canned
implementation for either platform yet and writing them from scratch may not be worth the effort. No promises. SHA512 feature is now reported by cpuminer-opt as FYI.

AVX10: replacement for AVX2 & AVX512 with support for AVX512 features without 512 bit vectors fot Intel E-cores. AVX10 won't be available this year and there is no compiler
available for AVX10 yet. AVX10 will be reported as a CPU or SW feature when CPUs become available. Algo support will be identical to AVX512 for CPUs with 512 bit
vectors and AVX2 for CPUs with only 256 bit vectors. AVX10 wil have no effect on CPUs with AVX512 but will use new instructions on Intel CPUs with E-cores that are limited
to 256 bit vectors. AMD has not made any announcements about supporting AVX10 but they don't need to. All Ryzen CPUs from zen4 & zen4c onward have the full AVX512 feature set.
Update: AVX10-512 is expected to be available on Intel Granite Rapids server CPUs in late 2024.

APX; adds support for 3 operand instructions for all scalar code. This will reduce the number of instructions by eliminating many register moves. No source code changes
are required just a recompile with support for APX when CPUs and compiler become available. APX is expected to coincide with AVX10 on Intel CPUs, no hints about AMD yet.
APX is reported as a feature for CPU and SW but algo support is not applicable as there is no associated change in source code.

SVE2: is an ARM feature already available on some ARM CPUs. It's a vector feature incompatible with NEON that can support larger vectors. Few CPUs support SVE2
and even fewer have vector registers larger than NEON's 128 bits. Adding SVE2 will be more difficult than NEON. SVE2 also has its own versions of SHA & AES that will also have
to be included, increasing the amount of work required. If SVE2 is to be supported it will only be considered when there are sufficient consumer CPUs available that can make proper
use of the feature. SVE2 feature and vector size is now reported by cpuminer-opt as FYI.

SM3, SM4: are crypto extensions soon to be available on X86_64 as well as aarch64. To my knowledge SM3 is used only by 2 obsolete POW algorithms and SM4 is not used by any.
There are no plans for cpuminer-opt to support either.

x86_64 AMX, aarch64 SME: are soon to be avialbale matrix extensions that are focussed on AI, Matrix accelerators are sometimes called NPUs because of their support for
low precision types like BF16 and INT8 commonly used in neural networks. At this time neither architecture offers matrix support for INT32 or INT64 which are necessary for crypto mining.
full member
Activity: 1424
Merit: 225
USING "-march=native" WORKS
====================

Editing the "build-armv8.sh" script to read "-march=native" resulted in a working executable.  My Rpi-4 now mines "Yescript" algo at ~66H/s, getting a share once every 24 minutes on average.  Slow, perhaps, but Yescript is a top earner on ZergPool today.

Thanks!       --scryptr

arm-build.sh does that already, no editing required. It's the preferred procedure for any arm compile just as build.sh is for x86_64.
armbuild-all.sh & build-all.sh are mostly for compile testing different CPU architectures but include some hints in case the CPU Isn't
supported by certain compiler versions. build-allarch.sh for X86_64 does the same thing.

The next release will have some new examples for features like armv9.

About performance, we can't expect much from one RPi4 but it would be interesting to see how power efficient would be a cluster of Pi's big enough to match a desktop CPU in hashrate.

FYI, a Mac Mini with an M2 gets 3300h/s on yescrypt, but it doesn't run natively, have to use a VM with Linux.
legendary
Activity: 1797
Merit: 1028
USING "-march=native" WORKS
====================

Editing the "build-armv8.sh" script to read "-march=native" resulted in a working executable.  My Rpi-4 now mines "Yescript" algo at ~66H/s, getting a share once every 24 minutes on average.  Slow, perhaps, but Yescript is a top earner on ZergPool today.

Thanks!       --scryptr
full member
Activity: 1424
Merit: 225
Illegal instruction (core dumped)

Illegal instruction is always a bad compile, probably trying to use SHA when the CPU doesn't support it.
Always use -march=native unless it's a new CPU and an old compiler. Your version of GCC is current so it should work for RPi4,
maybe even RPi5. -march=armv8 should also work for RPi4 but it may not be optimum.
legendary
Activity: 1797
Merit: 1028
ERROR MESSAGE
===========

Yesterday I tried again to use Cpuminer-Opt with my Rpi-4, and in comparison, with my Rpi-5. The results follow:

Rpi-4--

                         **********  cpuminer-opt 24.1  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AVX512, SHA and VAES extensions by JayDDee.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT

CPU: ARM 64 bit CPU, HWCAP 00000887
SW built on May  7 2024 with GCC-12.2.0 Linux
CPU features:  AArch64 NEON
SW features:   AArch64 armv8 NEON  AES SHA256
Algo features:        SSE2   NEON   SHA256
[2024-05-15 15:25:57] Enabled optimizations: NEON
[2024-05-15 15:25:57] CPU affinity [!!!!]
[2024-05-15 15:25:57] Stratum connect stratum+tcp://yespowerr16.mine.zergpool.com:6534
[2024-05-15 15:25:57] API listening to 127.0.0.1:4048
[2024-05-15 15:25:57] 4 of 4 miner threads started using 'yespowerr16' algorithm
[2024-05-15 15:25:57] Stratum extranonce1 0x81022f3d, extranonce2 size 4
[2024-05-15 15:25:58] Stratum connection established
[2024-05-15 15:25:58] CPU temp: curr 42 C max 0, Freq: 1.800/1.800 GHz
Illegal instruction (core dumped)

Rpi-5 --

                         **********  cpuminer-opt 24.1  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AVX512, SHA and VAES extensions by JayDDee.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT

CPU: ARM 64 bit CPU, HWCAP 00119fff
SW built on May  4 2024 with GCC-12.2.0 Linux
CPU features:  AArch64 NEON
SW features:   AArch64 armv8 NEON  AES SHA256
Algo features:        SSE2   NEON   SHA256
[2024-05-15 15:33:18] Enabled optimizations: NEON
[2024-05-15 15:33:18] CPU affinity [!!!!]
[2024-05-15 15:33:18] Stratum connect stratum+tcp://yespowerr16.mine.zergpool.com:6534
[2024-05-15 15:33:18] API listening to 127.0.0.1:4048
[2024-05-15 15:33:18] 4 of 4 miner threads started using 'yespowerr16' algorithm
[2024-05-15 15:33:19] Stratum extranonce1 0x81022f78, extranonce2 size 4
[2024-05-15 15:33:19] Stratum connection established
[2024-05-15 15:33:19] CPU temp: curr 62 C max 0, Freq: 1.500/1.500 GHz
[2024-05-15 15:33:19] New Stratum Diff 0.5, Block 1680000, Tx 0, Job 6201
                      Diff: Net 0.0030778, Stratum 0.5, Target 7.6294e-06
[2024-05-15 15:33:49] New Work: Block 1680000, Tx 0, Netdiff 0.0030778, Job 6202
                      Diff: Net 0.0030778, Stratum 0.5, Target 7.6294e-06
                      TTF @ 129.90 h/s: Block 1d04h, Share 4m12s
[2024-05-15 15:34:04] New Block 1680001, Tx 0, Netdiff 0.0030138, Job 6203
                      Diff: Net 0.0030138, Stratum 0.5, Target 7.6294e-06
                      TTF @ 129.92 h/s: Block 1d03h, Share 4m12s
                      Net hash rate (est) 287.65 kh/s
[2024-05-15 15:34:30] New Block 1680002, Tx 0, Netdiff 0.0034862, Job 6204
                      Diff: Net 0.0034862, Stratum 0.5, Target 7.6294e-06
                      TTF @ 129.91 h/s: Block 1d08h, Share 4m12s
                      Net hash rate (est) 427.80 kh/s




It was a brief test, as I sent the Pi units back to mining quickly.  The Rpi-4 also produced a nearly identical error with "Yescript" algorithm.       --scryptr
full member
Activity: 1424
Merit: 225

THE CODE COMPILES
=============

My Rpi 5 and Opi 5 units, also my Rpi 4, have all successfully compiled v24.1.  I used the "ARMv8" build script after finding a hint in the above reply. The "necessary packages" may have been missing.

After using your very latest prerequisite string, the build went to completion.  The executable worked on each unit, printing out help.txt and Version info in each case.  But, the Rpi 4 errored out when attempting to mine YescriptR16, likely due to its incomplete set of crypto instructions.  It is currently mining Zephyr with XMRIG 6.20, slowly.

The Rpi 5 mines Verus at about 4850kH/s, the Opi 5 units at about 6800kH/s.  They are using Oink's ccminer.  I also have some older CPUs mining Verus with Monk's ccminer.

Perhaps you should look into a CCminer-Opt branch?  A fine tune may really improve performance.  Monk's version gets a lot of rejects at times.       --scryptr  

Thanks for the update. I'd lke to see the errors on RPi4. Is it only yescryptr16 that fails? Is it an error or crash? Are you building with -march=native or -march=armv8? Native is usually preferred
unless the CPU isn't known to the compiler. Edit: This is usually only necessary with new CPUs and old compilers.

Another note, CPU feature reporting isn't working on ARM but SW features are. If you build with -march=native the SW features should match the CPU's actual features,
except that I haven't yet figured out how to detect the ARM minor version, so you only see armv8, not armv8.N.

I'm not looking at adding Verus. There's no code resuse with cpuminer so it would be adding bloat. Oink's version is already optimized so I probably wouldn't be able to improve it.
legendary
Activity: 1797
Merit: 1028
Although I have been able to compile Xmrig on my Rpi 4, none of your recent crypto builds worked.  I finally was able to purchase an Rpi 5 from Adafruit and will try again.

I have several Orange Pi 5 boards mining Verus coin.  I'll be able to check the Rpi 5 hashrate in comparison.

I think I missed this point. The Windows builds won't work on RPI or OPi, they're for X86_64 not Arm.
If you have problems compiling on RPi (or OPi) with Linux it's probably missing packages. It may depend on how you install Linux.
If you installed from an custom image file it may not have all necessary packages. I installed using using normal installation
procedure for Ubuntu using the Arm server ISO and had no issues compiling afterward.

THE CODE COMPILES
=============

My Rpi 5 and Opi 5 units, also my Rpi 4, have all successfully compiled v24.1.  I used the "ARMv8" build script after finding a hint in the above reply. The "necessary packages" may have been missing.

After using your very latest prerequisite string, the build went to completion.  The executable worked on each unit, printing out help.txt and Version info in each case.  But, the Rpi 4 errored out when attempting to mine YescriptR16, likely due to its incomplete set of crypto instructions.  It is currently mining Zephyr with XMRIG 6.20, slowly.

The Rpi 5 mines Verus at about 4850kH/s, the Opi 5 units at about 6800kH/s.  They are using Oink's ccminer.  I also have some older CPUs mining Verus with Monk's ccminer.

Perhaps you should look into a CCminer-Opt branch?  A fine tune may really improve performance.  Monk's version gets a lot of rejects at times.       --scryptr 
Pages:
Jump to: