Bitcoin Forum
March 24, 2017, 06:17:07 PM *
News: Latest stable version of Bitcoin Core: 0.14.0  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 »
  Print  
Author Topic: Wolf's XMR/BCN/DSH CPUMiner - 2x speed compared to LucasJones' - NEW 06/20/2014  (Read 251420 times)
Wolf0
Legendary
*
Online Online

Activity: 1512


Miner Developer


View Profile
May 30, 2014, 10:25:29 PM
 #1

The other thread was too haphazard and confusing, so I started a new one. I modified CPUMiner-Multi to give 2x the speed or more when mining CryptoNote coins. It is slower on Windows, but still far faster than Lucas' miner.

I ran a test, LucasJones' repo against mine. Each had the exact same CFLAGS (-Ofast -flto -fuse-linker-plugin -funroll-loops -fsplit-ivs-in-unroller -fvariable-expansion-in-unroller -falign-loops=16 -falign-functions=16 -falign-jumps=16 -falign-labels=16). Each were run with 21 threads for a period of time over 20min. I can't be more accurate than that, because I didn't sit and time it. They were run at seperate times on the same machine - a 32 core Amazon EC2 instance with 58GB of RAM. The results? Lucas' cpuminer reported 627.58H/s - but only pulled 600 at the pool. My miner reported 1021.73 and pulled an impressive 1.25KH/s at the pool. Now, even with vardiff causing high share difficulties and luck contributing to inaccuracy, this shows a clear 100% increase. I have screenshots to prove it, but before I post them, I have to warn - I was too lazy to crop out my wallpapers, so they are NSFW.

Lucas' miner (NSFW): https://ottrbutt.com/tmp/lucasminer-proof.png
My miner (NSFW): https://ottrbutt.com/tmp/wolfminer-proof.png

So... get the source here: https://github.com/wolf9466/cpuminer-multi

Win64 binaries exist but require AES-NI. How do you know if you have it? If the binary crashes, you don't. They're here:

https://ottrbutt.com/cpuminer-multi/cpuminer-multi-wolf-05-29-2014.zip
https://ottrbutt.com/cpuminer-multi/cpuminer-multi-wolf-05-29-2014.zip.sig

I made some new ones that should provide an improvement. It's based off some new code I just pushed to my github minutes ago:

https://ottrbutt.com/cpuminer-multi/cpuminer-multi-wolf-05-30-2014.zip
https://ottrbutt.com/cpuminer-multi/cpuminer-multi-wolf-05-30-2014.zip.sig

For the GPG sigs, my key ID and fingerprint is in my signature.

For best performance - play with the number of threads. Often, less is more - there's a reason I used only 21 threads on the 32 core AWS instance in the official test - it resulted in the highest hashrate.
If you see this hosted anywhere else - be wary of it. Check the GPG sig. If you don't know how to, then just know that ottrbutt.com is the ONLY official place to find them, and copies elsewhere may be laced with malware.

Since there has been trouble reproducing my first test, I did another one, this time on a Digital Ocean 16-core. To reduce inaccuracy caused by luck, I used a port the owner of moneropool.com opened for me - it has a share diff of 1000 and no vardiff. The results are roughly the same. These screenshots are NSFW, as well. Why? Well, since hardly anyone ever donates, I may as well get to have some fun for my work Tongue

https://ottrbutt.com/tmp/lucasminer2.png
https://ottrbutt.com/tmp/wolfminer2.png

NEW -- 06/08/2014
Up to a 25% speedup if you're lucky - but only for Linux. First, do a "sysctl vm.nr_hugepages" - it'll probably say 0. Set it with "sudo sysctl -w vm.nr_hugepages=num" where "num" is the number of threads you're running times three. You may want to play with the threads again to get the best performance. Once set, use "sysctl vm.nr_hugepages" again to make sure it's set. If it's not - reboot and try again, your memory is too fragmented, and the kernel cannot allocate enough contiguous memory for the hugepages. Once done, compile the miner from git as usual and try it out.

Before this, I had maybe 200H/s on my i7-4770K - clocked to 4.5Ghz and underwater. Peak at around 220H/s.
With this new miner: https://ottrbutt.com/tmp/newminer-06082014.png

This will do almost nothing in virtualized environments like AWS.

Another update:
Even faster. Got it consistently above 230H/s on my machine, and it tends to stay above 250H/s: https://ottrbutt.com/tmp/newminer-06082014-2.png
Oh, right. It runs faster as root, since I can use setpriority() and mlock(). However, it doesn't require it.
Tested on my laptop just now - about 140H/s instead of 125H/s from the previous commits: https://ottrbutt.com/tmp/moreoptimizations.png

Third update for today:
More optimized CFLAGS - even faster. Laptop test, for comparison with previous: https://ottrbutt.com/tmp/evenmoreoptimizations.png
You'll need to re-run autogen.sh after pulling this one.

Fourth update!
I got my desktop's i7-4770K above 300H/s. Will test on my laptop in a bit, but: https://ottrbutt.com/tmp/andmoreoptimizations.png
No more per-thread output - it was in the thread function and printing to stdout is slow. Also, I moved a divide out of said function, as they are ouch slow.

NEW -- 06/09/2014
Windows x64 binaries! AES-NI only!

https://ottrbutt.com/cpuminer-multi/cpuminer-multi-wolf-06-09-2014.zip
https://ottrbutt.com/cpuminer-multi/cpuminer-multi-wolf-06-09-2014.zip.sig

I did another comparison between my binaries and Lucas'. His seemed to benefit from the flags I use as well - I used the same ones for both. Mine is a lot faster, however, it's less consistent, which is something I'll have to work on.

https://ottrbutt.com/tmp/lucasminer.png
https://ottrbutt.com/tmp/wolfminer.png

06/12/2014
Some Win binaries for those without AES-NI.

https://ottrbutt.com/cpuminer-multi/cpuminer-multi-wolf-06-12-2014.zip
https://ottrbutt.com/cpuminer-multi/cpuminer-multi-wolf-06-12-2014.zip.sig

06/17/2014
Pushed another commit - I removed all algorithms but CryptoNight. The files are still there for now, but unused. Compile time is WAY down, code size and binary size, as well. Don't use the -a or --algo switches anymore.

06/18/2014
I rolled back the earlier commit - broke stuff. I tested and pushed a similar one just now, though. The -a switch must still be used for now, but there is no code for other algos, making it a lot slimmer. I also tested it before pushing this time.  Cheesy

06/19/2014
Removed the -a and --algo switches from the help text. It will still accept them, but ignore them for compatibility. No need to use them anymore. I also set the default algorithm to CryptoNight.

06/20/2014
Added a check for AES-NI that is compiled in only if the miner is being built for AES-NI. AES-NI binaries built from this source or newer should output a message telling the user that the CPU does not have AES-NI, rather than crashing.

07/07/2014
Non-AES-NI implementation fixed just now. No binaries yet - but you can compile from github.

07/09/2014
Did a LOT of code cleaning - also remembered to add an optimization flag I'd been meaning to put in for ages. Probably won't do too much, though.

Had a thought a little later - removed that lingering, now-pointless OpenSSL requirement.

Okay, done. Have a Windows x64 binary for non-AES-NI. Does it submit shares? Yes. Does it work on a non-AES-NI system? Beats me.

https://ottrbutt.com/cpuminer-multi/minerd-wolf-07-09-14.exe
https://ottrbutt.com/cpuminer-multi/minerd-wolf-07-09-14.exe.sig

No DLLs anymore!

09/03/2014
Just wanted to say that to my surprise, a pool, MONERO.RS, has donated to me for my work on the CPU miner!  Cheesy

If you like it - donate! My addresses are on my GitHub, also below (XMR address needs code tags or BCT screws it up):

XMR:
Code:
42QWoLF7pdwMcTXDviJvNkWEHJ4TXnMBh2Cx6HNkVAW57E48Zfw6wLwDUYFDYJAqY7PLJUTz9cHWB5C4wUA7UJPu5wPf4sZ
BTC: 1WoLFumNUvjCgaCyjFzvFrbGfDddYrKNR

Code:
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
1490379427
Hero Member
*
Offline Offline

Posts: 1490379427

View Profile Personal Message (Offline)

Ignore
1490379427
Reply with quote  #2

1490379427
Report to moderator
1490379427
Hero Member
*
Offline Offline

Posts: 1490379427

View Profile Personal Message (Offline)

Ignore
1490379427
Reply with quote  #2

1490379427
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1490379427
Hero Member
*
Offline Offline

Posts: 1490379427

View Profile Personal Message (Offline)

Ignore
1490379427
Reply with quote  #2

1490379427
Report to moderator
1490379427
Hero Member
*
Offline Offline

Posts: 1490379427

View Profile Personal Message (Offline)

Ignore
1490379427
Reply with quote  #2

1490379427
Report to moderator
1490379427
Hero Member
*
Offline Offline

Posts: 1490379427

View Profile Personal Message (Offline)

Ignore
1490379427
Reply with quote  #2

1490379427
Report to moderator
QuadraQ
Sr. Member
****
Offline Offline

Activity: 403



View Profile
May 30, 2014, 11:46:13 PM
 #2

I can confirm there is indeed a speed improvement. Tested on one machine with an Intel i5 2320 running Windows 7 Ultimate 64-bit.

Using Lucas build: 76-88 H/s averaging about 79/80
Wolf 5/29 build: 90-99 H/s averaging about 93/94
Wolf 5/30 build: 87-96 H/s averaging about 91/92



██████████████████████████████████████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████████████████████████████
███████████████████████████████████████████████████████████████████████▄▄▄███████████████████████
███████████████████████████████████████████████████████████████████████▀▀▀████████████████████████
██████████████████████████████████████████████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████████████████████████████████████████████




INTRODUCING WAVES
ULTIMATE ASSET/CUSTOM TOKEN BLOCKCHAIN PLATFORM







followtheboss
Full Member
***
Offline Offline

Activity: 126


View Profile
May 31, 2014, 09:27:03 AM
 #3

Hello,
thx for your miner working nice on my i3 4130 on win8 64bit
i go from 65 h/s to 80h/s  it's about +20%

I like it  Grin

cheers

restless
Hero Member
*****
Offline Offline

Activity: 882


View Profile
May 31, 2014, 10:54:47 AM
 #4

Build from 30.05 seems to be as fast as 29-05. Maybe slightly faster. but the diff is small, like 47 per thread to 47.5 on i5-2500
aikklond
Hero Member
*****
Offline Offline

Activity: 602


View Profile
May 31, 2014, 01:06:19 PM
 #5

How can I set thread count?

on A8-5600 it starts 3 threads and I get a total of 42 H/s (approx 14 per thread)

tequillaquagga
Member
**
Offline Offline

Activity: 70


View Profile
May 31, 2014, 02:28:04 PM
 #6

Who can successfully build on OSX?
I got:
 ./configure: line 5666: syntax error near unexpected token `,'
./configure: line 5666: `LIBCURL_CHECK_CONFIG(, 7.15.2, ,'

when running configure

The Camel Marches On
vokain
Legendary
*
Offline Offline

Activity: 1680


V.V.V.V.V.


View Profile
May 31, 2014, 03:06:37 PM
 #7

So I can just type this in terminal and it'll update?

cd ~/ && rm -rf cpuminer && mkdir cpuminer && cd cpuminer && git clone http://github.com/wolf9466/cpuminer-multi.git && pushd cpuminer-multi && cd ~/cpuminer/cpuminer-multi && ./autogen.sh && export CFLAGS="-march=native"  && ./configure && make && unset CLFAGS && popd

...مكتوب
Escape the plutocrats’ zanpakutō, Flower in the Mirror, Moon on the Water: brave “the ascent which is rough and steep” (Plato).
Ed4252
Full Member
***
Offline Offline

Activity: 190


View Profile
May 31, 2014, 04:39:56 PM
 #8

got a cpuminer solution for 32 bit comp?
restless
Hero Member
*****
Offline Offline

Activity: 882


View Profile
May 31, 2014, 04:54:50 PM
 #9

How can I set thread count?

on A8-5600 it starts 3 threads and I get a total of 42 H/s (approx 14 per thread)
At least for Intel CPUs, running (cores -1) threads gives best speed
Otherwise with -t x, as in most cpu miners
Kyune
Sr. Member
****
Offline Offline

Activity: 287


View Profile
May 31, 2014, 04:55:05 PM
 #10

Win64 binaries exist but require AES-NI.
If I compile from source should I be able to run it on a processor without AES-NI then?  I compiled it successfully in an Virtualbox Ubuntu 13.04 virtual machine (on a Win 7 host without AES-NI), but get:

Code:
[2014-05-31 09:46:38] Using JSON-RPC 2.0
[2014-05-31 09:46:38] 2 miner threads started, using 'cryptonight' algorithm.
Illegal instruction (core dumped)

upon starting up the miner.

BTC:  1K4VpdQXQhgmTmq68rbWhybvoRcyNHKyVP
fusecavator
Member
**
Offline Offline

Activity: 117


View Profile
May 31, 2014, 05:39:07 PM
 #11

Win64 binaries exist but require AES-NI.
If I compile from source should I be able to run it on a processor without AES-NI then?  I compiled it successfully in an Virtualbox Ubuntu 13.04 virtual machine (on a Win 7 host without AES-NI), but get:

Code:
[2014-05-31 09:46:38] Using JSON-RPC 2.0
[2014-05-31 09:46:38] 2 miner threads started, using 'cryptonight' algorithm.
Illegal instruction (core dumped)

upon starting up the miner.

That error is probably indicating that it is still trying to use AES-NI. Code changes might be required.

I'm not getting anywhere near the speed improvement wolf claims, but it is an improvement.
dewdeded
Legendary
*
Offline Offline

Activity: 896


Monero Evangelist


View Profile WWW
May 31, 2014, 06:48:04 PM
 #12

got a cpuminer solution for 32 bit comp?
CryptoNight the PoW-algo is announced as 64-bit only.

Maybe someone more knowledge than me, will tell you, if this true and gonna stay way (or 32-bit CryptoNight miners are possible with dirty hack or something).
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1526

Reverse engineer from time to time


View Profile
May 31, 2014, 06:59:48 PM
 #13

Is there a reason why you didn't edit out the furry images?

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
MadGhost
Sr. Member
****
Offline Offline

Activity: 294

★777Coin.com★ Fun BTC Casino!


View Profile
May 31, 2014, 07:01:46 PM
 #14

Thanks for the miner . I will try it and post my results .

vokain
Legendary
*
Offline Offline

Activity: 1680


V.V.V.V.V.


View Profile
May 31, 2014, 07:02:28 PM
 #15

Is there a reason why you didn't edit out the furry images?

'let your freak flag fly'?

i.e. be cool, don't let other people tell you how to live, and do your own thing Smiley

...مكتوب
Escape the plutocrats’ zanpakutō, Flower in the Mirror, Moon on the Water: brave “the ascent which is rough and steep” (Plato).
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1526

Reverse engineer from time to time


View Profile
May 31, 2014, 07:05:02 PM
 #16

Is there a reason why you didn't edit out the furry images?

'let your freak flag fly'?

i.e. be cool, don't let other people tell you how to live, and do your own thing Smiley
Hey look, if he's trying to imply he is homosexual, I am fine with that, but those images weren't really necessary for the miner screenshots.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
vokain
Legendary
*
Offline Offline

Activity: 1680


V.V.V.V.V.


View Profile
May 31, 2014, 07:08:58 PM
 #17

Is there a reason why you didn't edit out the furry images?

'let your freak flag fly'?

i.e. be cool, don't let other people tell you how to live, and do your own thing Smiley
Hey look, if he's trying to imply he is homosexual, I am fine with that, but those images weren't really necessary for the miner screenshots.

yeah I do have to agree, nah they weren't necessary

but like you kinda said, I'm fine with self-expression, and I might argue that that is more right than not expressing oneself

...مكتوب
Escape the plutocrats’ zanpakutō, Flower in the Mirror, Moon on the Water: brave “the ascent which is rough and steep” (Plato).
QuadraQ
Sr. Member
****
Offline Offline

Activity: 403



View Profile
May 31, 2014, 09:00:20 PM
 #18

I was trying to send a donation for your work, but I guess I need payment ID.



██████████████████████████████████████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████████████████████████████
███████████████████████████████████████████████████████████████████████▄▄▄███████████████████████
███████████████████████████████████████████████████████████████████████▀▀▀████████████████████████
██████████████████████████████████████████████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████████████████████████████████████████████




INTRODUCING WAVES
ULTIMATE ASSET/CUSTOM TOKEN BLOCKCHAIN PLATFORM







Wolf0
Legendary
*
Online Online

Activity: 1512


Miner Developer


View Profile
May 31, 2014, 10:18:39 PM
 #19

Win64 binaries exist but require AES-NI.
If I compile from source should I be able to run it on a processor without AES-NI then?  I compiled it successfully in an Virtualbox Ubuntu 13.04 virtual machine (on a Win 7 host without AES-NI), but get:

Code:
[2014-05-31 09:46:38] Using JSON-RPC 2.0
[2014-05-31 09:46:38] 2 miner threads started, using 'cryptonight' algorithm.
Illegal instruction (core dumped)

upon starting up the miner.

Configure with --disable-aes-ni

Code:
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
Wolf0
Legendary
*
Online Online

Activity: 1512


Miner Developer


View Profile
May 31, 2014, 10:19:40 PM
 #20

Is there a reason why you didn't edit out the furry images?

I had been up for four days straight reading and writing code - at that point I just didn't care Tongue

Code:
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!