rieMiner - Solo + pooled Riecoin mining

Current existing mining softwares
Post Reply
Pttn
Posts: 133
Joined: 24 Aug 2018, 13:37

Re: rieMiner - Solo + pooled Riecoin mining

Post by Pttn » 06 Dec 2018, 01:26

Sure, I totally agree :D !

It would indeed be interesting to make a direct comparison with fastrie, but I would need to rewrite a Benchmark Mode for the latter, and honestly I do not really want to touch that code anymore... However, until you arrived, the rieMiner performance should have been the same as fastrie's, so comparing with rieMiner 0.9β2.3 would be good enough. I can still compare fairly easily pooled mining k-shares find rates though with little effort.

Yes, let's hope that our work will eventually pay off. I also hope that pools owner will properly inform current miners of the fastrie's successor, nobody did that so far. And you are welcome to implement what is needed to make rieMiner appropriate for direct record breaking as a new mode in rieMiner.

I sometimes considered to add a GUI to rieMiner for a future 0.91 or 0.99 version to expand the target public with something that even a 5-years old could use. Make new people discover both the prime constellations and the crypto world/mining. (in case you are wondering, the version naming scheme is 0.9, 0.99, 0.999,... for major versions, analogous to 1.0, 2.0, 3.0,..., and first non 9 digit after . is minor, etc. A perfect bug free software will be version 1)

Now, I will mostly do a lot of refactoring and testing for the stable release. This weekend, I should freeze the code and start the branch with universal code (without Asm optimizations nor precomputed data).

And again, huge thanks for all your contributions.
rieMiner - Riecoin solo + pooled miner
Personal Riecoin page (links, download,...)
freebitco.in - earn up to $200 in BTC each hour!

Pttn
Posts: 133
Joined: 24 Aug 2018, 13:37

Re: rieMiner - Solo + pooled Riecoin mining

Post by Pttn » 09 Dec 2018, 01:45

rieMiner code is now virtually ready. I will let this week for testing and maybe minor changes. Also, I will start working on the version without optimizations (Light branch). For people that used rieMiner until now, you will note that the option names completely changed, you need to read the manual again and edit your configuration file. Of course, after this, these names should remain unchanged for a while.

If someone is interested in comparing performance with fastrie, I forked it and lazily implemented a Benchmark Mode for it: https://github.com/Pttn/fastrie/tree/benchmark

Example: ./xptminer -b 1600 -s 2147483648 -t 8

For the Standard Benchmark, I got a 5.6% increase for the 2700X @4 GHz and 9.8% for the 6700K @3 GHz. However, fastrie suffered from the CPU Underuse Bug, and I had to launch 2 instances of 8 threads each.

Using PTL (Prime Table Limit, what we called Sieve Max until now) 2^33 instead of 2^31 (which is not possible on fastrie), I got a further ~25% increase in both cases for the blocks/day metric.
2^33 or 10^10 might be the sweet spot for Difficulty 1600 as 1.5*2^33 is about as fast as 2^33, and 2^34 is slower. There might be a way to calculate the ideal PTL for a given Difficulty.
rieMiner - Riecoin solo + pooled miner
Personal Riecoin page (links, download,...)
freebitco.in - earn up to $200 in BTC each hour!

Pttn
Posts: 133
Joined: 24 Aug 2018, 13:37

Re: rieMiner - Solo + pooled Riecoin mining

Post by Pttn » 09 Dec 2018, 14:31

I was just curious and ran the Benchmark without the precomputed data nor AVX, and surprisingly, there was no noticeable performance loss at all for the 2700X (after 100000 2-tuples)! In another hand, the lack of AVX did impact the performance in the 6700K, and the precomputed data too (but the change was extremely small here). The optimizations seem more Intel friendly.

However, there is indeed a performance decrease during actual mining (so the +5,6% and 9,8% previously reported would be lower bounds of the improvements).
rieMiner - Riecoin solo + pooled miner
Personal Riecoin page (links, download,...)
freebitco.in - earn up to $200 in BTC each hour!

czakris
Posts: 20
Joined: 16 Sep 2018, 05:03

Re: rieMiner - Solo + pooled Riecoin mining

Post by czakris » 09 Dec 2018, 17:16

Maybe it is not worthy now to mine solo on my fx8350, but anyway your miner works way better than before. Really great job with decreasing the time needed for generating prime table task.

Rockhawk
Posts: 48
Joined: 29 Oct 2018, 21:12

Re: rieMiner - Solo + pooled Riecoin mining

Post by Rockhawk » 10 Dec 2018, 17:20

Pttn wrote:
09 Dec 2018, 14:31
I was just curious and ran the Benchmark without the precomputed data nor AVX, and surprisingly, there was no noticeable performance loss at all for the 2700X (after 100000 2-tuples)! In another hand, the lack of AVX did impact the performance in the 6700K, and the precomputed data too (but the change was extremely small here). The optimizations seem more Intel friendly.

However, there is indeed a performance decrease during actual mining (so the +5,6% and 9,8% previously reported would be lower bounds of the improvements).
Interesting. It's not particularly surprising the optimizations are more Intel friendly as the processors I've been working with are Intel! I guess when benchmarking the performance increase from the AVX implementation of updateRemainders is basically unnoticeable, at least on AMD. But in real mining it helps because getting the first block of remainder calculations and sieving done after a block change is a bottleneck so even a small performance difference leads to a noticeable win.

Pttn
Posts: 133
Joined: 24 Aug 2018, 13:37

Re: rieMiner - Solo + pooled Riecoin mining

Post by Pttn » 12 Dec 2018, 14:15

Rockhawk, how did you find the 128 MiB + 650 MiB*SieveWorkers terms for the memory estimation?
It seems to work good enough for big Sieves, but the estimation is imprecise for very low Prime Table Limits as it estimates ~800 MiB, while I am able to run rieMiner (from the Light Branch) without swapping in a Pentium III computer with only 384 MiB of RAM...
Any way to get a more precise estimation in these extreme cases? This might still be useful for people willing to play with rieMiner in a RaspBerry Pi for example (such thing will still find very easily blocks on TestNet, a Pentium III is needing less than or about 10 minutes)...
And what was the 6-tuple record 20 years ago :D ? I have some vintage computers, it is always interesting to see what they can do with the software of today.

Also, what do you think about the riePool's claim of a miner 20-25% faster than fastrie (closed source)?
Legit or simple false advertising? If this were true for equal settings, it would be even better than rieMiner now.
He even pretended to have written a GPU miner 4.5x faster. As an expert in this domain, do you think this possible?
The facts are still that this is the biggest Riecoin pool for now, not sure if it is because people are thinking that they are mining faster and earning more with this software.
rieMiner - Riecoin solo + pooled miner
Personal Riecoin page (links, download,...)
freebitco.in - earn up to $200 in BTC each hour!

Pttn
Posts: 133
Joined: 24 Aug 2018, 13:37

Re: rieMiner - Solo + pooled Riecoin mining

Post by Pttn » 15 Dec 2018, 03:35

I think that I did everything needed for a stable version, and tested a lot, so I released it :D ! Standalone Windows binaries are provided (also for Linux, compiled on Debian 9; not totally static but should work on Debian or Ubuntu fresh installs). Also, a PDF manual. L versions are without assembly and precomputed data optimizations, but in 99% of the cases, you should use the Win64/Deb64 versions.

Updates from fastrie, the previous reference Riecoin miner:

- Adds solo mining with a Riecoin Core wallet using the GetBlockTemplate protocol. Supports custom payout addresses (P2PKH and P2SH);
- Adds a Benchmark Mode to allow much easier performance comparisons;
- Some bug fixes like the long delay before Stratum mining starts or some random segmentation faults;
- One important bug fix is the CPU Underuse: when running with 16 threads or more with fastrie, the CPU usage would not be maxed out at current difficulties. It could be worked around by launching multiple instances with each less threads, (not practical at all and wastes a lot of memory), or reducing the Prime Table Limit (significantly lower 6-tuples find rate). Note that the issue is actually still present (notably in Testnet), but negligible in practice;
- Performance enhancements (threading improvements, assembly optimizations, precomputed data usage). From fastrie, you will get a gain of around 5-10% for the same settings and computer. You can thank Michael Bell for all his contributions;
- The assembly optimizations include usage of SSE, and AVX, AVX2 or AVX512 when available. AVX512 support is experimental and not much tested, but a huge performance increase of ~20% over AVX2 has been reported! As a trade off, the CPU needs to be x64 with SSE to be able to run rieMiner. However, a "Light" branch is provided in order to support older CPUs and other architectures (you can for example mine Testnet blocks with a Pentium II computer or a RaspBerry Pi);
- Now supports prime table limits (PTL, also called "Sieve Max") higher than 2^32, to get even better speeds by reducing the ratios between k and (k + 1)-tuples. Indeed, using a PTL of 2^33 instead of 2^31 (which is not possible on fastrie) for benchmarking with Difficulty 1600 increased the blocks/day metric a lot (about 25%)! However, in order to set such a high PTL, you would need at least 24 GB of RAM;
- Support of prime constellations types other than the Riecoin one (rieMiner can be configured to find 7 or 8-tuples, for example);
- Use of configuration files instead of command line options, much more parameters to customize;
- Complete source code refactoring for a much more modern and developer friendly code;
- Cleaner user interface, more interesting statistics.

For comparing performance with fastrie, you can use the rieMiner's Benchmark Mode and my fastrie fork (benchmark branch). Note that you need to test long enough to get precise numbers.

Happy Mining :D !

There is something weird with 32 bits builds though... The performance is much worse, like 4x slower, even on a same Windows computer (that can run both), not sure why. I do not really care as not much people will mine with 32 bits computers, but still. I was unable to find the issue, even replacing UInt64_ts by UInt32_ts did not help. Or maybe it is normal?

Also starting from now, my presence will be much more rare.
rieMiner - Riecoin solo + pooled miner
Personal Riecoin page (links, download,...)
freebitco.in - earn up to $200 in BTC each hour!

czakris
Posts: 20
Joined: 16 Sep 2018, 05:03

Re: rieMiner - Solo + pooled Riecoin mining

Post by czakris » 16 Dec 2018, 15:19

Pttn, can you give me an example of config file working with solo mining on 16.3 and your latest miner, please? I tried to get out from benchmark mode but failed.

Pttn
Posts: 133
Joined: 24 Aug 2018, 13:37

Re: rieMiner - Solo + pooled Riecoin mining

Post by Pttn » 16 Dec 2018, 20:46

czakris wrote:
16 Dec 2018, 15:19
Pttn, can you give me an example of config file working with solo mining on 16.3 and your latest miner, please? I tried to get out from benchmark mode but failed.
Please man, just read the manual before asking these things... Copy paste of the example with explanations:

Code: Select all

# Mining mode: Solo for solo mining via GetBlockTemplate, Pool for pooled mining using Stratum, Benchmark for testing. Default: Benchmark
Mode = Solo

# IP and port of the Riecoin wallet/server or pool. Default: 127.0.0.1 (your computer), port 28332 (default port for Riecoin-Qt)
Host = 127.0.0.1
Port = 28332

# Username and password used to connect to the server (same as rpcuser and rpcpassword in riecoin.conf for solo mining).
# If using Stratum, the username includes the worker name (username.worker). Default: empty values
Username = user
Password = /70P$€CR€7/

# Custom payout address for solo mining (GetBlockTemplate only). Default: this donation address
PayoutAddress = RPttnMeDWkzjqqVp62SdG2ExtCor9w54EB

# Number of threads used for mining. Default: 8
Threads = 8

# The prime table used for mining will contain primes up to the given number.
# Use a bigger limit if you have 16 GiB of available RAM or more, as this will reduce the ratio between the n-tuple and (n + 1)-tuple counts (but also the 1-tuple find rate).
# Reduce if you have less than 8 GiB of RAM (or if you want to reduce memory usage).
# It can go up to 2^64 - 1, but setting this at more than 2^33 will usually be too much and decrease performance. Default: 2^31
PrimeTableLimit = 2147483648

# Refresh rate of the stats in seconds. 0 to disable them and only notify when a long enough tuple or share is found, or when the network finds a block. Default: 30
RefreshInterval = 60

# For solo mining, submit not only blocks (6-tuples) but also k-tuples of at least the given length.
# Additionally, the base prime of such tuple will be shown in the Benchmark Mode. Default: 6
TupleLengthMin = 4
And I said a few posts ago:
For people that used rieMiner until now, you will note that the option names completely changed, you need to read the manual again and edit your configuration file. Of course, after this, these names should remain unchanged for a while.
rieMiner - Riecoin solo + pooled miner
Personal Riecoin page (links, download,...)
freebitco.in - earn up to $200 in BTC each hour!

czakris
Posts: 20
Joined: 16 Sep 2018, 05:03

Re: rieMiner - Solo + pooled Riecoin mining

Post by czakris » 17 Dec 2018, 04:07

Problem solved. Thx Pttn!

Post Reply