Bitcoin Forum

Bitcoin => Mining => Topic started by: Quantumboredom on March 19, 2011, 11:09:57 AM



Title: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Quantumboredom on March 19, 2011, 11:09:57 AM
Hi. I have two HD 5870 cards, and both seem to be set up and working correctly.

I am using poclbm (latest version by doing "git clone git://github.com/m0mchil/poclbm poclbm" today).
I am using Catalyst 10.9 from debian repositories.
I am using SDK 2.2.

I have configured the cards by doing:
Code:
aticonfig --crossfire=off --adapter=all
aticonfig --initial -f --adapter=all

And I've added "export DISPLAY=:0" do my .bashrc.

running just ./poclbm lists the devices:
Code:
[0]     AMD Phenom(tm) II X6 1090T Processor
[1]     Cypress
[2]     Cypress

Each devices seems to be working fine. Running poclbm like this:
Code:
/poclbm.py --user=user1 --pass=mypass -v -d 1 -w 128 -f 120 -o mining.bitcoin.cz -p 8332
for both -d 1 and -d 2 gives about 300000 khash/s as expected. However if I start both at the same time I only get a total of about 300000 khash/s. I.e. if one of the cards is doing 250000 khash/s the other one will be doing 50000 khash/s.

I am absolutely sure that I am using a different device. I.e. in one terminal I've entered:
Code:
/poclbm.py --user=user1 --pass=mypass -v -d 1 -w 128 -f 120 -o mining.bitcoin.cz -p 8332

And in the other one:
Code:
/poclbm.py --user=user2 --pass=mypass -v -d 2 -w 128 -f 120 -o mining.bitcoin.cz -p 8332

So both the devices and user names on slush's server are different.

It's working fine on windows using the poclbm GUI, so this does seem to be a Linux configuration problem. Anyone have any ideas on how to fix it?

By the way, I've also tried the same in OpenSUSE with catalyst 11.2 and SDK 2.1, 2.2 and 2.3 with the same result. Presumably there is simply some configuration I've missed.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: MDKing on March 19, 2011, 04:11:38 PM
Why -f 120? I'm using -f 2 on my dual 5870s and everything works fine.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Quantumboredom on March 19, 2011, 04:41:14 PM
Lower than 120 (i.e. 60 and lower) makes it interfere with stuff, like HD video playback, games (on Windows with -f 120 I can mine even when gaming at about half speed) and more if it's really low. Considering the performance difference is less than 10% I keep -f high to not impact usability.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Mahkul on March 19, 2011, 04:57:30 PM
Lower than 120 (i.e. 60 and lower) makes it interfere with stuff, like HD video playback, games (on Windows with -f 120 I can mine even when gaming at about half speed) and more if it's really low. Considering the performance difference is less than 10% I keep -f high to not impact usability.

What If you start the miner without any switches and also, without any programs running? I know on my Ubuntu, even smallest applications were affecting the performance.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Quantumboredom on March 19, 2011, 05:36:40 PM
Tried to close all other applications and remove the extra parameters, so I'm running:
Code:
/poclbm.py --user=user --pass=mypass -d 2 -f 120 -o mining.bitcoin.cz -p 8332
But it's still the same. Both cards perform as expected on their own but when run at the same time performance does not exceed that of a single card.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Mahkul on March 19, 2011, 05:40:35 PM
Tried to close all other applications and remove the extra parameters, so I'm running:
Code:
/poclbm.py --user=user --pass=mypass -d 2 -f 120 -o mining.bitcoin.cz -p 8332
But it's still the same. Both cards perform as expected on their own but when run at the same time performance does not exceed that of a single card.

What if you get rid of -f altogether?


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Psychoactive on March 19, 2011, 05:47:03 PM


I am absolutely sure that I am using a different device. I.e. in one terminal I've entered:
Code:
/poclbm.py --user=user1 --pass=mypass -v -d 1 -w 128 -f 120 -o mining.bitcoin.cz -p 8332

And in the other one:
Code:
/poclbm.py --user=user2 --pass=mypass -v -d 2 -w 128 -f 120 -o mining.bitcoin.cz -p 8332

So both the devices and user names on slush's server are different.


Did you check the load on both cards to really confirm both are working ?


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Quantumboredom on March 19, 2011, 05:54:16 PM
Is there a way to do that in linux? My searches are coming up empty.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Cryptoman on March 19, 2011, 05:58:42 PM
Is there a way to do that in linux? My searches are coming up empty.

Code:
aticonfig --odgc

Make sure you really have the DISPLAY=:0 environment variable set.  Enter it on the command line before starting poclbm.py.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Quantumboredom on March 19, 2011, 06:08:50 PM
Thanks, using aticonfig --odgc --adapter=all gives me the loads.

I've checked the DISPLAY variable using echo $DISPLAY. I've also tried setting the COMPUTE variable (which is preferred over DISPLAY by the SDK) to :0 but it's still the same.

Basically if I start two instances of poclbm the one I start first (say on the first card) will do about 250000 khash/s and the second one will do 50000 khash/s (it varies but those seem to be roughly the averages). The load using aticonfig reflects this (i.e. one GPU is like 80% and the other jumps around a bit but is much lower). If I then stop the first instance the load shifts to the second GPU, also reflected in aticonfig.

So it seems I am definitely starting the program correctly (i.e. each instance is using it's own GPU), but it's like the work gets serialized somewhere and is limited to the performance of one card.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Cryptoman on March 19, 2011, 06:21:21 PM
The only other thing I can think of trying is deleting the /etc/X11/xorg.conf file and running "aticonfig --initial --adapter=all" again.  I've found that, for some reason, aticonfig doesn't always create a proper xorg.conf file if one exists already.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Quantumboredom on March 19, 2011, 06:31:27 PM
Tried it. Moved the old xorg.conf and did aticonfig --initial --adapter=all again and the new file was identical to the old one.

Thanks for trying to help though :). Hopefully someone else who has experienced similar problems at some point will see the thread. I find it very odd considering I've had the exact same problem with openSUSE and Debian, but others seem to get multiple GPUs to work with no hassle.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Mahkul on March 19, 2011, 06:48:29 PM
Obviously there is enough power delivered? Did you say you tried the same setup with the same power supply with windows and it worked?


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Quantumboredom on March 19, 2011, 07:06:27 PM
Oh yes, I have dual boot with Windows 7 x64 and Debian Testing x64. And the PSU is definitely beefy enough (1000 W).


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Cryptoman on March 19, 2011, 11:35:57 PM
Hopefully someone else who has experienced similar problems at some point will see the thread. I find it very odd considering I've had the exact same problem with openSUSE and Debian, but others seem to get multiple GPUs to work with no hassle.

I actually did have the same exact problem, and it was solved by setting the DISPLAY environment variable properly.  I don't know what to say.  Does it do the same thing when mining against bitcoind?


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Quantumboredom on March 20, 2011, 07:06:09 PM
It's the same if I mine solo.

What if you get rid of -f altogether?
Still the same :(

Man, every time I've tried switching to Linux there's something only Windows does. This time it's just multi-gpu, but that's a deal breaker considering I have two GPUs  :(

Thanks to everyone for trying to help. If I do figure out what's wrong I'll be sure post an update.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: LeonGeeste on March 21, 2011, 02:09:20 AM
Interesting coincidence: this evening I just ran into the exact same problem!  This weekend I set up my first rig: one HD 5870 in Ubuntu 10.10.  Once I had that working,  I added a second one, and now that it's back up, it's doing the very same thing yours is -- the two cards seem to balance against each other, with the sum being no different from what I got from a single card (300-340 Mhash/sec depending on the overclocking).

I first worried that it was reaching a bottleneck, since it's using up all the CPU.

Don't have any new ideas, but I just wanted to confirm someone else is having the same problem.

Anyone know if this happens on other cards?  What would make it throttle back like that?


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: ArtForz on March 21, 2011, 02:15:33 AM
Saw the same shit with 5970s and SDK 2.2 and 2.3.
SDK 2.1 + fglrx 10.9 - 10.11 works fine.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Cryptoman on March 21, 2011, 03:12:55 AM
Saw the same shit with 5970s and SDK 2.2 and 2.3.
SDK 2.1 + fglrx 10.9 - 10.11 works fine.

I was going to suggest dropping the SDK back to 2.1, but he said in the OP that he already tried that.  All of my miners run fglrx 10.9 and SDK 2.1 and I have no problems.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Quantumboredom on March 21, 2011, 07:51:05 AM
Wouldn't you know it, it works fine with SDK 2.1 :)

On OpenSUSE I tried all the SDK's (2.1, 2.2 and 2.3), but that was with catalyst 11.2. On Debian with catalyst 10.9 it works with SDK 2.1.

Still a bit of a pain to have to use an old SKD/driver set (I do some OpenCL developement myself so it matters a bit to me), but at least it's working :)


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: LeonGeeste on March 21, 2011, 01:19:29 PM
So how do you download ATI Stream/APP SDK 2.1 now?  I can't find it on the AMD site or on a Google search.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: dbitcoin on March 21, 2011, 01:42:54 PM
So how do you download ATI Stream/APP SDK 2.1 now?  I can't find it on the AMD site or on a Google search.

Current link for 32bit linux:
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-lnx32.tgz

Just replace version number:
http://developer.amd.com/Downloads/ati-stream-sdk-v2.1-lnx32.tgz



Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Cryptoman on March 21, 2011, 04:46:53 PM
Wouldn't you know it, it works fine with SDK 2.1 :)

I'm glad to hear you got this working.  I got lucky as the fglrx version that was automatically installed from the repository was 10.9.  In m0mchil's miner thread, there is plenty of discussion that SDK 2.1 is the least problematic, so I started with that as well.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: LeonGeeste on March 21, 2011, 11:48:40 PM
So how do you download ATI Stream/APP SDK 2.1 now?  I can't find it on the AMD site or on a Google search.

Current link for 32bit linux:
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-lnx32.tgz

Just replace version number:
http://developer.amd.com/Downloads/ati-stream-sdk-v2.1-lnx32.tgz

Thanks, dbitcoin!  Now, why didn't I think of that...


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: teknohog on March 22, 2011, 04:31:46 PM
Wouldn't you know it, it works fine with SDK 2.1 :)

I used to have the same problem, and SDK 2.1 does indeed fix it :) The driver version is 10.12 as it is the latest that works on Gentoo, with Linux kernel 2.6.37.4.

I guess I was reluctant to try this SDK, since 2.2 worked much better with HD5570 (also using an older version of poclbm), but a few Mhash/s is not a bad price for getting the full setup to work.

As a nice bonus, CPU load is way down. With SDK 2.2, each miner consumed 100% CPU, but now it is barely noticeable.


Title: Re: Two HD 5870 in Linux (Debian) performing no better than one
Post by: Quantumboredom on March 22, 2011, 04:40:49 PM
As a nice bonus, CPU load is way down. With SDK 2.2, each miner consumed 100% CPU, but now it is barely noticeable.
Yeah I noticed that as well. Perhaps the two are related.

Hopefully these issues will be fixed in SDK 2.4, which shouldn't be too far out if they keep the same release pace. I know these issues (multi-gpu on linux and high CPU use) have been brought up at the AMD forums, so let's hope they got it fixed and we don't have to wait for SDK 2.5.