Bitcoin Forum
December 11, 2016, 11:53:58 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 »  All
  Print  
Author Topic: PowerTune  (Read 6685 times)
krumplee
Newbie
*
Offline Offline

Activity: 7


View Profile
May 15, 2011, 03:38:54 PM
 #1

Hello Gents,

There is 'Power Control Settings' in CCC under Windows, but missing from the Linux version of CCC.
Is there any software that can alter these settings on Linux to achieve the same performance as I can reach on Windows with the same machine using Radeon HD 6970?

Thanks for replies.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481457238
Hero Member
*
Offline Offline

Posts: 1481457238

View Profile Personal Message (Offline)

Ignore
1481457238
Reply with quote  #2

1481457238
Report to moderator
Tukotih
Member
**
Offline Offline

Activity: 70


View Profile
May 15, 2011, 03:46:42 PM
 #2

Can't find the "PowerTune" in my CCC (11.5). But i don't belive it would impact that greatly on your bitmining performance since functions like the one you described usually are made to save energy and not increase performance.

Donations always appreciated: 1GkRu9rZxk5iMRzsrcZxZ3BUHV1SWNZ9RB
IMPORTANT! Switch from deepbit: http://forum.bitcoin.org/index.php?topic=8653.0
krumplee
Newbie
*
Offline Offline

Activity: 7


View Profile
May 15, 2011, 04:03:17 PM
 #3

We are using our server with different purpose and have to move from windows to linux to avoid paying for windows on many servers. However I have downloaded Catalyst 11.5 (http://www2.ati.com/drivers/linux/ati-driver-installer-11-5-x86.x86_64.run) and the Windows one is different than the Linux one and I did not see 'Power Control Settings' -20% to +20% under Linux. For our purpose it really increases performance because setting to +20% can achieve approximately 2200 million SHA1 hashes per sec instead of 1700 million per sec with a single 6970 on 950Mhz.
krumplee
Newbie
*
Offline Offline

Activity: 7


View Profile
May 16, 2011, 08:50:44 PM
 #4

Can't find the "PowerTune" in my CCC (11.5). But i don't belive it would impact that greatly on your bitmining performance since functions like the one you described usually are made to save energy and not increase performance.
Yes, save energy by lowering the core speed which decreases performance.
Anyway I have found how to set PowerControl under linux. There are 2 undocumented functions in libatiadlxx.so
int ADL_Overdrive5_PowerControl_Set(int adapterIndex, int percent); // percent can be between -20 and 20
int ADL_Overdrive5_PowerControl_Get(int adapterIndex, int *resultPercent, int *yetUnknown); // don't know yet what is the third parameter, seems always 0
Using HD6970 setting core speed to 950Mhz and PowerControl percent to 20% significantly increases performance.
I think this will be added to AMDOverdriveCtrl soon and maybe AMD will release a CCC or aticonfig where these values can be set.
This can be useful for mining as well.
M4v3R
Hero Member
*****
Offline Offline

Activity: 607



View Profile
May 16, 2011, 09:14:11 PM
 #5

@krumplee: how do you use this undocumented function?
krumplee
Newbie
*
Offline Offline

Activity: 7


View Profile
May 16, 2011, 09:35:13 PM
 #6

@krumplee: how do you use this undocumented function?

Download ADL SDK from http://developer.amd.com/Downloads/ADL_SDK_3.0.zip
It is enough to copy adl_sdk.h into /usr/include

Save the following code as powercontrol.cpp

Code:
#include <iostream>
#include <cstdlib>
#include <adl_sdk.h>

using namespace std;

extern "C"
{
    int ADL_Main_Control_Create (ADL_MAIN_MALLOC_CALLBACK, int);
    int ADL_Adapter_NumberOfAdapters_Get(int *);
    int ADL_Overdrive5_PowerControl_Set(int, int);
    int ADL_Overdrive5_PowerControl_Get(int, int *, int *);
}

void* __stdcall Alloc ( int iSize )
{
    void* lpBuffer = malloc ( iSize );
    return lpBuffer;
}

void __stdcall ADL_Main_Memory_Free ( void** lpBuffer )
{
    if ( NULL != *lpBuffer )
    {
        free ( *lpBuffer );
        *lpBuffer = NULL;
    }
}

int main()
{
        int adapters, a=99, b=99;
        if(ADL_Main_Control_Create (Alloc, 1) != ADL_OK)
        {
                cout << "ADL initialization error!" << endl;
                return -1;
        }
        
        if(ADL_Adapter_NumberOfAdapters_Get(&adapters) != ADL_OK)
        {
                cout << "Cannot get the number of adapters!" << endl;
                return -1;
        }
        cout << "Found " << adapters << " adapters" << endl;
        for(int i=0; i<adapters; i++)
        {
                if(ADL_Overdrive5_PowerControl_Set(i, 20) != ADL_OK)
                {
                        cout << "Failed to set " << i << " power control" << endl;
                        return -1;
                } else { cout << "Value set for " << i << endl; }
                
                if(ADL_Overdrive5_PowerControl_Get(i, &a, &b) != ADL_OK)
                {
                        cout << "Failed to get " << i << " power control" << endl;
                        return -1;
                }
                cout << "result: " << a << "%, b: " << b << endl;
        }
        return 0;
}

Finally compile:
g++ -DLINUX -o powercontrol powercontrol.cpp -latiadlxx
M4v3R
Hero Member
*****
Offline Offline

Activity: 607



View Profile
May 16, 2011, 09:54:10 PM
 #7

I get an ADL_ERR when executing this. But it's probably because I use Catalyst 11.2, and I hear that ADL SDK works for 11.3 and newer. Too bad, because 11.3 and newer don't work in my setup for some reason. Still, thanks for the help.
krumplee
Newbie
*
Offline Offline

Activity: 7


View Profile
May 16, 2011, 09:58:48 PM
 #8

I get an ADL_ERR when executing this. But it's probably because I use Catalyst 11.2, and I hear that ADL SDK works for 11.3 and newer. Too bad, because 11.3 and newer don't work in my setup for some reason. Still, thanks for the help.
11.5 also out. You may want to try it...
http://www2.ati.com/drivers/linux/ati-driver-installer-11-5-x86.x86_64.run
Jaime Frontero
Full Member
***
Offline Offline

Activity: 126


View Profile
May 17, 2011, 03:40:05 AM
 #9

Can't find the "PowerTune" in my CCC (11.5). But i don't belive it would impact that greatly on your bitmining performance since functions like the one you described usually are made to save energy and not increase performance.
Yes, save energy by lowering the core speed which decreases performance.
Anyway I have found how to set PowerControl under linux. There are 2 undocumented functions in libatiadlxx.so
int ADL_Overdrive5_PowerControl_Set(int adapterIndex, int percent); // percent can be between -20 and 20
int ADL_Overdrive5_PowerControl_Get(int adapterIndex, int *resultPercent, int *yetUnknown); // don't know yet what is the third parameter, seems always 0
Using HD6970 setting core speed to 950Mhz and PowerControl percent to 20% significantly increases performance.
I think this will be added to AMDOverdriveCtrl soon and maybe AMD will release a CCC or aticonfig where these values can be set.
This can be useful for mining as well.

interesting.

"Using HD6970 setting core speed to 950Mhz and PowerControl percent to 20% significantly increases performance."

what does it do to your temps?
krumplee
Newbie
*
Offline Offline

Activity: 7


View Profile
May 17, 2011, 07:47:11 AM
 #10

what does it do to your temps?
Just guessing.
Increases.
Smiley
einsteinx2
Newbie
*
Offline Offline

Activity: 27


View Profile
June 26, 2011, 03:46:39 AM
 #11

@krumplee, thanks so much for posting this. It compiled and worked fine on my Ubuntu rigs. Gave me an extra 5 mhashes per card on each of my 6950's. For some reason it fails to set my 5870 though. Is there some command line option I should be specifying with it to make that work? I'm doing it over SSH so I'm putting DISPLAY=:0 at the beginning of the line. That's working for my dual 6950 rigs, but one of my rigs with one 6950 (card 0) and one 5870 (card 1) it's failing on the 5870. I've also tried DISPLAY=:0.1 at the beginning, as that's necessary when setting fan speeds on card 1 but no luck. Any ideas? I'm really interested to see what kind of increase I get on that card.
TurdHurdur
Full Member
***
Offline Offline

Activity: 217


View Profile
June 26, 2011, 10:54:11 AM
 #12

The latest version of AMDOverdriveCtrl features PowerTune adjustment. It only works on 6xxx series cards, though.
padrino
Legendary
*
Online Online

Activity: 1260



View Profile
June 26, 2011, 03:40:10 PM
 #13

@krumplee, thanks so much for posting this. It compiled and worked fine on my Ubuntu rigs. Gave me an extra 5 mhashes per card on each of my 6950's. For some reason it fails to set my 5870 though. Is there some command line option I should be specifying with it to make that work? I'm doing it over SSH so I'm putting DISPLAY=:0 at the beginning of the line. That's working for my dual 6950 rigs, but one of my rigs with one 6950 (card 0) and one 5870 (card 1) it's failing on the 5870. I've also tried DISPLAY=:0.1 at the beginning, as that's necessary when setting fan speeds on card 1 but no luck. Any ideas? I'm really interested to see what kind of increase I get on that card.

Powertunerequires some BIOS support and if I recall right it's not available in 5xxx cards.

1CPi7VRihoF396gyYYcs2AdTEF8KQG2BCR
darkpandora
Member
**
Offline Offline

Activity: 98



View Profile
June 26, 2011, 04:54:27 PM
 #14

so what is powertune and what does it do? gives more power to the gpu core?

K U R D I  S T A N
K U R D I S T A N
K U R D I S T A N
krumplee
Newbie
*
Offline Offline

Activity: 7


View Profile
July 11, 2011, 09:46:02 PM
 #15

Greetings everyone,

I have tried powertune on several different cards, but only works on 6xxx series.
There are some other undocumented ADL functions out there.
Worth to post them, but I am busy nowadays.
As I will have a little time I will share with you guys.
Someone sent me PM about the posted code above.
He was confused why ADL_Adapter_NumberOfAdapters_Get(int *) gives many adapters.
I will try to explain it next time.

BR, KrumpLee.
goxed
Legendary
*
Offline Offline

Activity: 1582


Mining hardware dev and reviewer.


View Profile
July 11, 2011, 09:59:58 PM
 #16

Actualy IIRC powertune is a feature intended for the 69XX Radeon, to curb power to a given maximum TDP.
Thanks so much for the code. I modified it a bit to be used for systems with mixed GPU's.

Code:
if(ADL_Overdrive5_PowerControl_Set(i, 20) != ADL_OK)
                {
                        cout << "Failed to set " << i << " power control" << endl;
                        //return -1;
                } else { cout << "Value set for " << i << endl; }

                if(ADL_Overdrive5_PowerControl_Get(i, &a, &b) != ADL_OK)
                {
                        cout << "Failed to get " << i << " power control" << endl;
                        //return -1;
                }

The g++ compiler in my ubuntu 10.10 installation could not locate the library so I copied libatiadlxx.so to the local location
cp /usr/lib/fglrx/libatiadlxx.so .

and used
g++ -o powertune ./powercontrol.cpp ./libatiadlxx.so


Looking to review Bitcoin / Crypto mining Hardware.
Jazkal
Sr. Member
****
Offline Offline

Activity: 319



View Profile
July 12, 2011, 12:53:48 PM
 #17

so what is powertune and what does it do? gives more power to the gpu core?
On Windows, running on a 6970, I get about 320 Mh/s with no powertune. With powertune set to +5% or higher, I get 425 Mh/s. And that is with no other changes made to anything.
XRcode
Full Member
***
Offline Offline

Activity: 135


View Profile
July 13, 2011, 09:52:12 PM
 #18

I also need to give my cards extra power to achieve 420mhash


The three gigabytes come stock at 920mhz, they dont need extra power, i just OC them to 940mhz


The three visionteks i have are reference cards, They get 360mhash out of the box, and 420mhash with +10% power and 940mhz clocks

XRcode
Full Member
***
Offline Offline

Activity: 135


View Profile
July 13, 2011, 09:55:14 PM
 #19

I also need to give my cards extra power to achieve 420mhash


The three gigabytes come stock at 920mhz, they dont need extra power, i just OC them to 940mhz


The three visionteks i have are reference cards, They get 360mhash out of the box, and 420mhash with +10% power and 940mhz clocks




I forgot to mention.... The gigabytes get way too hot... They need extra cooling.... They have three fans but no vapour chamber... They blow all the hot air around inside the case. Temps 80C-90C with extra three fans for more airflow ontop of the three on each card.

The Visionteks have a single fan but run 25C cooler because the hot air is exhausted out of the back of the card... They are also 10 times louder then the other cards. they run 60C-75C
shivansps
Sr. Member
****
Offline Offline

Activity: 346


View Profile
July 13, 2011, 10:24:59 PM
 #20

Its not "extra power", powertune underclocks your card if you overclock it over 850mhz, thats why mhashs start decresing if you overclock the cards over 845mhz.

Thats why +20% is needed to get over 900mhz, or the driver will never allow it, you are able to set the clocks, but it gets undercloked.

1NEvmZTwLhqBgr3h7LwZap1sEHsyf3QFuv
Pages: [1] 2 »  All
  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!