satoshi
Founder
Sr. Member
Offline
Activity: 364
Ignore
|
 |
August 15, 2010, 03:52:09 PM |
|
0.3.10 has tcatm's 4-way SSE2 as an option switch. Use the switch "-4way" to turn it on. Without the switch you get Crypto++ ASM SHA-256. I could only get this working with Linux. Download: Get 0.3.10 from http://bitcointalk.org/index.php?topic=827.0Please report back your CPU and results! I think it's pretty clear that Core 2 and lower are slower, i5 faster. I don't think we've heard any i7 results yet. We need to know about the different models of AMD or other less common CPUs.
|
|
|
|
|
|
pocket dice Get 1000 SATOSHI FREE! Limited offer! CLAIM NOW Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
|
|
|
|
|
satoshi
Founder
Sr. Member
Offline
Activity: 364
Ignore
|
 |
August 15, 2010, 06:23:26 PM |
|
I hope someone can test an i5 or AMD to check that I built it right. I don't have either to test with.
I'm also curious if it performs much worse on 32-bit linux vs 64-bit.
|
|
|
|
|
|
sgtstein
|
 |
August 15, 2010, 06:26:40 PM |
|
Where is the code for this? I'm on a CentOS 5.5 box and need to build it myself. Once I do that I will report back with linux 32-bit and 1MB cache Xeon.
|
|
|
|
|
satoshi
Founder
Sr. Member
Offline
Activity: 364
Ignore
|
 |
August 15, 2010, 06:43:27 PM |
|
I just uploaded a quick build so testers can check if I built it right. (I don't have an i5 or AMD) If it checks out, I'll put together the full package and do all the release stuff.
|
|
|
|
|
|
sgtstein
|
 |
August 15, 2010, 06:46:25 PM |
|
Okay, makes sense. I have an i7 930 I'll try and test out with too.
|
|
|
|
|
|
tcatm
|
 |
August 15, 2010, 09:50:41 PM |
|
If I didn't know better, I would say the key is the CPU cache size. Seems all the CPU that run slower have 2 MB or less onboard cache, where as the Core i5 starts with at least 3MB of onboard CPU cache.
That's unlikely. The loop accesses 432 bytes of data. That should fit in most caches.
|
|
|
|
|
|
Ground Loop
|
 |
August 15, 2010, 11:49:40 PM |
|
5,911 khash with -4way 11,260 without (Dual Xeon E5450, 64-bit, 8 threads)
|
Bitcoin accepted here: 1HrAmQk9EuH3Ak6ugsw3qi3g23DG6YUNPq
|
|
|
|
tcatm
|
 |
August 16, 2010, 12:03:18 AM |
|
-4way: 12518 khash/s without: 6550 khash/s
It's a little bit slower than my patch (~14000kash/s).
edit: I ran the binary on an older AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ with the same effect we see on older intel cpus: -4way: 1120khash/s without: 2012khash/s
|
|
|
|
|
|
tcatm
|
 |
August 16, 2010, 12:08:38 AM |
|
Did anyone verify it to produce correct results on 32 bit hosts?
|
|
|
|
|
gebler
Newbie
Offline
Activity: 16
Ignore
|
 |
August 16, 2010, 12:32:57 AM |
|
Running 32-bit Linux on an AMD Athlon 64 X2, I get the following results:
normal: 2850 khash/s with -4way: 1708 khash/s
I haven't checked if the hashes are correct, just the speed.
|
18h6HV7RPU4xFwiap2RdzsqDjcgsEmh3vy
|
|
|
|
|
|
tcatm
|
 |
August 16, 2010, 12:43:39 AM |
|
I propose to compile sha256.cpp with -O3 -march=amdfamk10 (will work on 32bit and 64bit) as only CPUs supporting this instruction set (AMD Phenom, Intel i5 and newer) benefit from -4way and it'll improve performance by ~9%.
|
|
|
|
|
HostFat
Staff
Legendary
Offline
Activity: 1708
Ignore
|
 |
August 16, 2010, 12:47:23 AM |
|
I propose to compile sha256.cpp with -O3 -march=amdfamk10 (will work on 32bit and 64bit) as only CPUs supporting this instruction set (AMD Phenom, Intel i5 and newer) benefit from -4way and it'll improve performance by ~9%.
Good  Will this also work on Windows OS?
|
|
|
|
|
tcatm
|
 |
August 16, 2010, 12:50:04 AM |
|
I propose to compile sha256.cpp with -O3 -march=amdfamk10 (will work on 32bit and 64bit) as only CPUs supporting this instruction set (AMD Phenom, Intel i5 and newer) benefit from -4way and it'll improve performance by ~9%.
Good  Will this also work on Windows OS? Didn't try it, but CFLAGS are not OS dependent at all so I guess it'll work.
|
|
|
|
|
|
NewLibertyStandard
|
 |
August 16, 2010, 01:49:01 AM |
|
You might want to add columns for whether hyper-threading is enabled, number of physical cores and how many cores Bitcoin is using. Without 4way, I get very slightly better results when I have half of my virtual cores hashing. With 4way, I get significantly better performance when I have all my virtual cores enabled. I think I get about the same amount of hashes when hyper threading is turned off with or without 4way.
|
Treazant: A Fullever Rewarding Bitcoin - Backup Your Wallet TODAY to Double Your Money! - Dual Currency Donation Address: 1Dnvwj3hAGSwFPMnkJZvi3KnaqksRPa74p
|
|
|
|
aceat64
|
 |
August 16, 2010, 02:13:28 AM |
|
You might want to add columns for whether hyper-threading is enabled, number of physical cores and how many cores Bitcoin is using. Without 4way, I get very slightly better results when I have half of my virtual cores hashing. With 4way, I get significantly better performance when I have all my virtual cores enabled. I think I get about the same amount of hashes when hyper threading is turned off with or without 4way. I've updated the page with your suggestions, I've also added footnotes to explain some of the fields.
|
Don't mess with my network. Or Texas. Drink Fund: 1GVdTj2uYG5JWChAcQHWzUMbcWCMGYUNZs
|
|
|
|
jgarzik
|
 |
August 16, 2010, 02:30:52 AM |
|
My -4way results: slower for two older boxes, faster for newer one.
("model name" comes from Linux's /proc/cpuinfo, which reports directly from CPU)
1) model name : Intel(R) Pentium(R) D CPU 3.00GHz
total cores: 2 without -4way: 0.999 Mhash/sec with -4way: 0.850 Mhash/sec
2) model name : Dual Core AMD Opteron(tm) Processor 280
total cores: 4 without -4way: 4.6 Mhash/sec with -4way: 4.0 Mhash/sec
3) model name : Genuine Intel(R) CPU 000 @ 3.20GHz
total cores: 4 without -4way: 5.7 Mhash/sec with -4way: 7.0 Mhash/sec
|
Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer. Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
|
|
|
satoshi
Founder
Sr. Member
Offline
Activity: 364
Ignore
|
 |
August 16, 2010, 02:57:57 AM |
|
I propose to compile sha256.cpp with -O3 -march=amdfamk10 (will work on 32bit and 64bit) as only CPUs supporting this instruction set (AMD Phenom, Intel i5 and newer) benefit from -4way and it'll improve performance by ~9%.
GCC 4.3.3 doesn't support -march=amdfamk10. I get: sha256.cpp:1: error: bad value (amdfamk10) for -march= switch With 4way, I get significantly better performance when I have all my virtual cores enabled. I think I get about the same amount of hashes when hyper threading is turned off with or without 4way.
Hey, you may be onto something! hyperthreading didn't help before because all the work was in the arithmetic and logic units, which the hyperthreads share. tcatm's SSE2 code must be a mix of normal x86 instructions and SSE2 instructions, so while one is doing x86 code, the other can do SSE2. How much of an improvement do you get with hyperthreading? Some numbers? What CPU is that?
|
|
|
|
|
|
lfm
|
 |
August 16, 2010, 03:10:34 AM |
|
model name : AMD Phenom(tm) II X4 940 Processor at 3.0 ghz linux 64
with -4way "hashespersec" : 11132770
without "hashespersec" : 5877668
|
|
|
|
|
|