nioroso-x3 / xmr-stak-power

Port of the xmr-stak-cpu monero miner to ppc64le
GNU General Public License v3.0
18 stars 9 forks source link

Adopting xmr-stak for CryptoNight variant 2 #19

Open cryptoeight opened 6 years ago

cryptoeight commented 6 years ago

Hello Nioroso, as Monero is changing PoW on 18.10.2018 i was wondering: Are you planning to adopt a new version of xmr-stak for Power supporting CryptoNight variant 2?

madscientist159 commented 6 years ago

Same question from this side. Is this something you are looking at updating? :+1:

thsitthisak commented 6 years ago

I also waiting ^^

nioroso-x3 commented 6 years ago

Yeah, I started working on this today.

madscientist159 commented 6 years ago

@nioroso-x3 I've got a working xmrig repo that I've been performance tuning the past few days alongside SChernykh. Which CPUs are you going to be tuning against? Unlike CNv7 we will need to decide which square root algorithm to use based on the expected utilization of an SMP4 core.

gcy000 commented 6 years ago

Hi nioroso-x3, I’m currently using power8 cpu for xmr...any repo for that?

rem260 commented 6 years ago

Same, multiple power smt4 sitting idle

On Wed, Oct 17, 2018, 01:05 gcy000 notifications@github.com wrote:

Hi nioroso-x3, I’m currently using power8 cpu for xmr...any repo for that?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nioroso-x3/xmr-stak-power/issues/19#issuecomment-430513978, or mute the thread https://github.com/notifications/unsubscribe-auth/AP_aRkrxnB6OKDpq-KxFJIHpw9KSi3lNks5ultbAgaJpZM4XXxGT .

cryptoeight commented 6 years ago

@madscientist159 is it possible for you to share your working repo, even that it drops the performance 50%. As you said 50% for the moment is still better than 0% if not updated at all ^^

Once the tuning is finished we can update again to get the best performance.

Thanks in advance.

nioroso-x3 commented 6 years ago

https://github.com/nioroso-x3/xmr-stak

Ok, updated it to just working, need to optimize now.

madscientist159 commented 6 years ago

Darn, you beat me to it! :smiley: Here's my optimized xmrig variant, it gets basically the same speed as CNv7 on the > 8 core chips, and ~62% of CNv7 on the 4 and 8 core devices.

https://github.com/madscientist159/xmrig

nioroso-x3 commented 6 years ago

Darn, you beat me to it! Here's my optimized xmrig variant, it gets basically the same speed as CNv7 on the > 8 core chips, and ~62% of CNv7 on the 4 and 8 core devices.

https://github.com/madscientist159/xmrig

A lookup table for sqrt? You didnt try to do two square roots at once using vec_sqrt?

madscientist159 commented 6 years ago

@nioroso-x3 Of course I did -- you can see vestiges of that in how the xmrig source was restructured to allow two square roots right up next to one another. I also tried many other arcane instructions and methods for getting the square root (even going so far as trying to fill multiple execution pipelines with combinations of xsrsqrtesp, xssqrtsp, and xssqrtqp) -- empirically, on POWER9, using a dual 8 core test machine, the given LUT was the fastest by a significant margin (over 10%).

What it all comes down to is that square root, alongside division, is probably the weakest instruction in the entire POWER9 design. Not only is the issue time for the square root instruction terrible, but the VSX units are shared among SMT threads -- the LUT allows greater parallelism.

Don't take my word alone for it -- run it through perf and see for yourself! :wink:

nioroso-x3 commented 6 years ago

Ok, I added your fast square root for the 1x threads.

thsitthisak commented 6 years ago

hi ****

https://github.com/nioroso-x3/xmr-stak

Ok, updated it to just working, need to optimize now.

it show " [2018-10-18 11:41:15] : Difficulty changed. Now: 5000. [2018-10-18 11:41:15] : New block detected. [2018-10-18 11:41:28] : Result rejected by the pool. [2018-10-18 11:41:28] : Difficulty changed. Now: 4999. [2018-10-18 11:41:28] : New block detected. [2018-10-18 11:43:13] : Result rejected by the pool. [2018-10-18 11:43:13] : Difficulty changed. Now: 5000. [2018-10-18 11:43:13] : New block detected. [2018-10-18 11:43:28] : Result rejected by the pool. [2018-10-18 11:43:28] : Difficulty changed. Now: 4999. [2018-10-18 11:43:28] : New block detected. [2018-10-18 11:43:32] : New block detected. [2018-10-18 11:43:46] : Result rejected by the pool. [2018-10-18 11:43:46] : Difficulty changed. Now: 5000. [2018-10-18 11:43:46] : New block detected. [2018-10-18 11:45:10] : New block detected. [2018-10-18 11:45:11] : Result rejected by the pool. [2018-10-18 11:45:11] : Difficulty changed. Now: 4999. [2018-10-18 11:45:11] : New block detected. [2018-10-18 11:45:21] : Result rejected by the pool. [2018-10-18 11:45:21] : Difficulty changed. Now: 5000. [2018-10-18 11:45:21] : New block detected. "" is ok or not sir.

Sith

nioroso-x3 commented 6 years ago

I tested it in the killallasics.moneroworld.com pool, you have to set cryptonight_v8 explicitly

winsonhet commented 6 years ago

Power 8 +ubuntu 16.04+at11.0 before update new version,V7 xmr-stak-power have been running well two month install new version https://github.com/nioroso-x3/xmr-stak make install error

Scanning dependencies of target xmr-stak-c [ 3%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_groestl.c.o [ 7%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o [ 11%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_jh.c.o [ 14%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o [ 18%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_keccak.c.o [ 22%] Linking C static library bin/libxmr-stak-c.a [ 22%] Built target xmr-stak-c Scanning dependencies of target xmr-stak-backend [ 25%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/version.cpp.o [ 29%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/jconf.cpp.o [ 33%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o [ 37%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/cpuType.cpp.o [ 40%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o [ 44%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o [ 48%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o [ 51%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o [ 55%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o [ 59%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o [ 62%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/webdesign.cpp.o [ 66%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/utility.cpp.o [ 70%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/executor.cpp.o [ 74%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/console.cpp.o [ 77%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/uac.cpp.o [ 81%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/telemetry.cpp.o [ 85%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/socket.cpp.o [ 88%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/jpsock.cpp.o [ 92%] Linking CXX static library bin/libxmr-stak-backend.a [ 92%] Built target xmr-stak-backend Scanning dependencies of target xmr-stak [ 96%] Building CXX object CMakeFiles/xmr-stak.dir/xmrstak/cli/cli-miner.cpp.o [100%] Linking CXX executable bin/xmr-stak CMakeFiles/xmr-stak.dir/xmrstak/cli/cli-miner.cpp.o: In function main': cli-miner.cpp:(.text.startup+0x70): undefined reference toOPENSSL_init_ssl' cli-miner.cpp:(.text.startup+0x88): undefined reference to OPENSSL_init_ssl' cli-miner.cpp:(.text.startup+0xa4): undefined reference toOPENSSL_init_crypto' cli-miner.cpp:(.text.startup+0xb8): undefined reference to OPENSSL_init_ssl' cli-miner.cpp:(.text.startup+0xc8): undefined reference toOPENSSL_init_crypto' bin/libxmr-stak-backend.a(socket.cpp.o): In function tls_socket::init_ctx()': socket.cpp:(.text+0xc2c): undefined reference toTLS_method' socket.cpp:(.text+0xcb8): undefined reference to `SSL_CTX_set_options' collect2: error: ld returned 1 exit status CMakeFiles/xmr-stak.dir/build.make:105: recipe for target 'bin/xmr-stak' failed make[2]: [bin/xmr-stak] Error 1 CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/xmr-stak.dir/all' failed make[1]: [CMakeFiles/xmr-stak.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

nioroso-x3 commented 6 years ago

You are missing some library, it compiles fine in Centos 7.

rem260 commented 6 years ago

Ugh, performance is pretty terrible.

Power8, 74 threads, 1400h/s, was about 3k on cnv7

I can tell by the quiet machine room that the system is not working very hard.

madscientist159 commented 6 years ago

@rem260 Another Firestone user from the description of the sound? :wink:

Can you give my xmrig version a try? On a 36 core POWER9 box it's running at around 68% of CNv7 and I'm actively working to try to boost that further. There's a tremendous amount of cache thrashing going on and POWER is very weak on both square root and division (basically the two worst instructions in the entire design), making things significantly worse.

nioroso-x3 commented 6 years ago

Ugh, performance is pretty terrible.

Power8, 74 threads, 1400h/s, was about 3k on cnv7

I can tell by the quiet machine room that the system is not working very hard.

I haven't implemented the big endian aes optimization I had for cnv7, which was the bottleneck for power8. I'll work on that next week.

thsitthisak commented 6 years ago

I tested it in the killallasics.moneroworld.com pool, you have to set cryptonight_v8 explicitly

Hi I used ubutu, right now it's ok nothing re-complie, but performance was gone 50% ^^ Thank a lot

gokou340 commented 6 years ago

Any updates on the optimization?

thsitthisak commented 6 years ago

i think no have any update and performance very poor ^^