Bitcoin Forum
April 25, 2024, 08:46:22 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: New (more optimized) MRO CPUMiner [Updated 05/28/2014] [PROOF OF 2X INCREASE]  (Read 16793 times)
Wolf0 (OP)
Member
**
Offline Offline

Activity: 81
Merit: 1002


It was only the wind.


View Profile
May 21, 2014, 03:18:19 PM
Last edit: May 30, 2014, 10:29:15 PM by Wolf0
 #1

New thread here: https://bitcointalk.org/index.php?topic=632724

Some of my optimizations were just committed to the repo (thanks LucasJones for improving on it), but for all the people on Windows, I made binaries. Optimizations only take effect if your CPU has AES-NI.

<links removed so there's no confusion>

For my GPG key ID and fingerprint, see my signature. Oh, and one more thing - main page is NSFW, so don't go there - same warning is on the litecointalk thread where I compile SGMiner and several forks of it for Win64 every week.

You can donate here if it helps you: 43jtN2e88d4ayn7gxsLwB94fmYzLuXymuGdJxotnvYsCaK3UuhvQRNgKrZUD4i5kxTRtpz49FrB1e2K YiXu4TNyEEGUwu9E

EDIT: Dammit, crashes now. I'm on it.

EDIT2: I think it was the way I compiled winpthreads. Will fix in a minute.

EDIT3: Well, it's not working ATM. LucasJones compiled one, which I'm hosting here: https://ottrbutt.com/cpuminer-multi/cpuminer-multi-1.0.2-LucasJones.zip

It's dynamically linked, which kinda sucks, but it works.

EDIT4: Never mind, fluffypony has taken care of it: https://bitcointalk.org/index.php?topic=583449.msg6857197#msg6857197

EDIT5: Scratch that last part, fluffypony posted binaries of the Monero code, not the miner, which had AES-NI support integrated completely seperately, but at about the same time. I had nothing to do with that.

EDIT6: I have made several improvements to the cpuminer. The best part is - servers will not see much of an increase, but desktops will, evening the playing field a little. There are some limitations and special instructions, however:

It only works on Linux. Several assembly routines that I wrote are *nix specific.
You have to compile it from my repo at https://github.com/wolf9466/cpuminer-multi
The only optimizations are for the AES-NI implementation. The slow one will be about the same.

Do NOT use all threads! Use the number of cores minus one, or it will be rather slow. For this purpose, hyperthreads count as cores.
Do NOT use "./configure CFLAGS="myflags""! This wipes out the already optimized flags I added to the defaults. Put the CFLAGS before the "./configure". I recommend only using -march=native, as it's not set by default.
If you are trying on a system without AES-NI, you must pass "--disable-aes-ni" to configure, or it won't build.
Hashrate will fluctuate a lot with high share diff. Try to find somewhere with a low share diff to benchmark.

Getting reports of 20% hashrate increase! Need more people to test!
Just got a report of almost 2x increase over LucasJones' repo! Test and post!

While testing, I'm beginning to notice that cores - 1 isn't actually optimal. A number between the number of physical cores and the number of threads is. My i7-4770k performs better with 6 threads.

NEW CODE RELEASED! This is even better - and it's portable to Windows!

05/28/2014
Okay, guys - this time, I'll stop coding for more than ten seconds and give you some detail, since it doesn't matter how fast my miner is if no one is using it. 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-loops=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 it here: https://github.com/wolf9466/cpuminer-multi
No binaries yet (Windows or otherwise) - but there should be some soon!

05/29/2014
Build some Win64 binaries. Enjoy.

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

05/30/2014
Mikhaila (the server that ottrbutt is on) is going down at 5:00 AM May 31st GMT for upgrade.
1714077982
Hero Member
*
Offline Offline

Posts: 1714077982

View Profile Personal Message (Offline)

Ignore
1714077982
Reply with quote  #2

1714077982
Report to moderator
1714077982
Hero Member
*
Offline Offline

Posts: 1714077982

View Profile Personal Message (Offline)

Ignore
1714077982
Reply with quote  #2

1714077982
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714077982
Hero Member
*
Offline Offline

Posts: 1714077982

View Profile Personal Message (Offline)

Ignore
1714077982
Reply with quote  #2

1714077982
Report to moderator
AdamWhite
Hero Member
*****
Offline Offline

Activity: 605
Merit: 500



View Profile
May 21, 2014, 04:14:04 PM
 #2

What kind of performance improvements are you seeing with these opimizations? Thanks!
huhliki.k
Full Member
***
Offline Offline

Activity: 144
Merit: 100


View Profile
May 21, 2014, 04:48:12 PM
 #3

no libwinpthread-1.dll
restless
Legendary
*
Offline Offline

Activity: 1151
Merit: 1001


View Profile
May 21, 2014, 05:22:45 PM
 #4

How are you measuring the speed?
There is no indication in simpleminer output Sad

PS:
Pools report 3-4 H/s per i3 cpu... so that means people are (ab)using hundreds of CPUs which they don't own ?!
phzi
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500


View Profile
May 21, 2014, 05:43:51 PM
 #5

Pools report 3-4 H/s per i3 cpu... so that means people are (ab)using hundreds of CPUs which they don't own ?!
You can get 45H/s on an older core2duo, so something sounds wrong with those numbers.
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
May 21, 2014, 05:49:16 PM
 #6

Some of my optimizations were just committed to the repo (thanks LucasJones for improving on it), but for all the people on Windows, I made binaries. Optimizations only take effect if your CPU has AES-NI.

https://ottrbutt.com/cpuminer-multi/05-21-2014-cpuminer-multi-win64-git-Wolf0.zip
https://ottrbutt.com/cpuminer-multi/05-21-2014-cpuminer-multi-win64-git-Wolf0.zip.sig

For my GPG key ID and fingerprint, see my signature. Oh, and one more thing - main page is NSFW, so don't go there - same warning is on the litecointalk thread where I compile SGMiner and several forks of it for Win64 every week.

You can donate here if it helps you: 43jtN2e88d4ayn7gxsLwB94fmYzLuXymuGdJxotnvYsCaK3UuhvQRNgKrZUD4i5kxTRtpz49FrB1e2K YiXu4TNyEEGUwu9E

EDIT: Dammit, crashes now. I'm on it.

EDIT2: I think it was the way I compiled winpthreads. Will fix in a minute.

EDIT3: Well, it's not working ATM. LucasJones compiled one, which I'm hosting here: https://ottrbutt.com/cpuminer-multi/cpuminer-multi-1.0.2-LucasJones.zip

It's dynamically linked, which kinda sucks, but it works.

EDIT4: Never mind, fluffypony has taken care of it: https://bitcointalk.org/index.php?topic=583449.msg6857197#msg6857197
Static linking of pthreads is very very difficult.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
restless
Legendary
*
Offline Offline

Activity: 1151
Merit: 1001


View Profile
May 21, 2014, 05:56:00 PM
Last edit: May 21, 2014, 06:07:10 PM by restless
 #7

Pools report 3-4 H/s per i3 cpu... so that means people are (ab)using hundreds of CPUs which they don't own ?!
You can get 45H/s on an older core2duo, so something sounds wrong with those numbers.
But HOW are you measuring these H/s Huh?
There is NO info output from simpleminer
When I use pools "lookout" feature against my wallet it shows... like 15h/s from i5@3.2GHz :/

PS:
WOW, new version seems a lot faster!
Amph
Legendary
*
Offline Offline

Activity: 3206
Merit: 1069



View Profile
May 21, 2014, 07:37:50 PM
 #8

how many coin per day with one i5 4670k?
Amph
Legendary
*
Offline Offline

Activity: 3206
Merit: 1069



View Profile
May 21, 2014, 08:04:51 PM
 #9

Pthread DLL should now be included.

how many coin per day with one i5 4670k?

Are you just hoping that someone has that exact CPU and will come across your post and tell you? I mean, it'd be a reasonable question if you posted your hashrate...

that's my only piece, i just want to know if it is worth it to leave my cpu mining this
signo88
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
May 21, 2014, 08:12:11 PM
 #10

no libwinpthread-1.dll

Is possibile to resolve this error?

Thanks..
Arlong
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
May 21, 2014, 08:32:10 PM
 #11

Wolf0,are there any plans for a 32bit cpuminer?
Arlong
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
May 21, 2014, 08:44:55 PM
 #12

Quote
Just... why? If your CPU is so old that it's not x86-64, then... why on earth would you be mining with it? It'd eat more power than it would ever make you in coin.

I still have 4 computers running on XP 32bit which for various reasons can't upgrade them to 64bit and i have free electricity.So i just thought i should give them a try Wink
Either way,thanks for providing 64bit binaries

PS. Please send me your MRO address for a small donation
carloss
Member
**
Offline Offline

Activity: 64
Merit: 10


View Profile
May 21, 2014, 08:52:56 PM
 #13

What kind of performance improvements are you seeing with these opimizations? Thanks!

Usually people say around 30%, but some people have reported 50%.

Yep, almost 50% performance gain. Excellent job!
Mantiska
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
May 22, 2014, 05:00:01 AM
 #14

Awesome! ~280 H/s per cpu. Nice job!
restless
Legendary
*
Offline Offline

Activity: 1151
Merit: 1001


View Profile
May 22, 2014, 05:27:29 AM
 #15

Commands?   Undecided

--help is your friend if you have never used cpuminer. You'll need to use the cryptonight algorithm.

I have used cpuminer before but not with cryptonight...  how about an example in OP?    Roll Eyes

If you've used cpuminer before, then what I supplied in my post should have been enough, I think - but never mind, I'll give you a full command:

Code:
minerd -a cryptonight -o moneropool.org:80 -O 43jtN2e88d4ayn7gxsLwB94fmYzLuXymuGdJxotnvYsCaK3UuhvQRNgKrZUD4i5kxTRtpz49FrB1e2KYiXu4TNyEEGUwu9E:x -t 4 --no-longpoll

Replace the pool if you want, and the add- actually, no, don't replace the address  Cheesy
The number after -t is the number of threads you want it to run, and --no-longpoll is a workaround for a pool bug with longpolling.

Quote
Just... why? If your CPU is so old that it's not x86-64, then... why on earth would you be mining with it? It'd eat more power than it would ever make you in coin.

I still have 4 computers running on XP 32bit which for various reasons can't upgrade them to 64bit and i have free electricity.So i just thought i should give them a try Wink
Either way,thanks for providing 64bit binaries

PS. Please send me your MRO address for a small donation

That is the first good reason I've ever heard. Let me see if I can get it working. By the way, my address is: 43jtN2e88d4ayn7gxsLwB94fmYzLuXymuGdJxotnvYsCaK3UuhvQRNgKrZUD4i5kxTRtpz49FrB1e2K YiXu4TNyEEGUwu9E

OMG... all this time I was using fluffy's miner... thought these are same :/
Amph
Legendary
*
Offline Offline

Activity: 3206
Merit: 1069



View Profile
May 22, 2014, 06:54:23 AM
 #16

Awesome! ~280 H/s per cpu. Nice job!

how many monero per day?
carloss
Member
**
Offline Offline

Activity: 64
Merit: 10


View Profile
May 22, 2014, 08:25:06 AM
 #17

What kind of performance improvements are you seeing with these opimizations? Thanks!

Usually people say around 30%, but some people have reported 50%.

Yep, almost 50% performance gain. Excellent job!

Thanks! If you want to donate, my address is in the post above yours.

2 MRO is heading your way Cool
OracionSeis
Hero Member
*****
Offline Offline

Activity: 756
Merit: 500


View Profile
May 22, 2014, 10:49:15 AM
 #18

This build doesn't work on Mac OS X. I'll be posting a pull request pretty soon to fix it.

Time off to sleep ... ( ̄︶ ̄)~
carloss
Member
**
Offline Offline

Activity: 64
Merit: 10


View Profile
May 22, 2014, 07:23:03 PM
 #19

Btw I am not able to compile the miner on Centos 6.5 system:
Code:
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson    -O3 -MT minerd-cryptonight.o -MD -MP -MF .deps/minerd-cryptonight.Tpo -c -o minerd-cryptonight.o `test -f 'cryptonight.c' || echo './'`cryptonight.c
In file included from cryptonight.c:13:
crypto/c_jh.h:17: error: redefinition of typedef ‘BitSequence’
crypto/c_groestl.h:36: note: previous declaration of ‘BitSequence’ was here
crypto/c_jh.h:18: error: redefinition of typedef ‘DataLength’
crypto/c_groestl.h:37: note: previous declaration of ‘DataLength’ was here
cryptonight.c:178:1: warning: "RND" redefined
cryptonight.c:141:1: warning: this is the location of the previous definition
cryptonight.c:208:1: warning: "RND" redefined
cryptonight.c:178:1: warning: this is the location of the previous definition
cryptonight.c:245:1: warning: "RND" redefined
cryptonight.c:208:1: warning: this is the location of the previous definition
make[2]: *** [minerd-cryptonight.o] Error 1
make[2]: Leaving directory `/home/carloss/cpuminer-multi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/carloss/cpuminer-multi'
make: *** [all] Error 2

More info about the system:
Code:
[carloss@minerC cpuminer-multi]$ uname -a
Linux minerC 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[carloss@minerC cpuminer-multi]$ cat /etc/*release
CentOS release 6.5 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)

[carloss@minerC cpuminer-multi]$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)

On Ubuntu 12.04 machines it works fine.

Any idea?
coolkris
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
May 23, 2014, 02:56:24 PM
 #20


Commands?   Undecided

--help is your friend if you have never used cpuminer. You'll need to use the cryptonight algorithm.

I have used cpuminer before but not with cryptonight...  how about an example in OP?    Roll Eyes

If you've used cpuminer before, then what I supplied in my post should have been enough, I think - but never mind, I'll give you a full command:

Code:
minerd -a cryptonight -o moneropool.org:80 -O 43jtN2e88d4ayn7gxsLwB94fmYzLuXymuGdJxotnvYsCaK3UuhvQRNgKrZUD4i5kxTRtpz49FrB1e2KYiXu4TNyEEGUwu9E:x -t 4 --no-longpoll


[/quote]

How to config a backup pool? Thanks!

Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!