ViCadia is supported by its readers. If you buy products through affiliate links, we may earn a commission. Learn more
How To'sMining

How to Overclock GPU for Mining Using Batch File Commands

6 Mins read

Overclocking your GPU is one of the most important things when it comes to mining cryptocurrencies. By applying custom core and memory clocks you can improve your card’s mining hashrate, as well as efficiency. You can even underclock or undervolt your card in order to decrease its power consumption and improve its stability while mining different cryptocurrencies.

Read also: The Best PCI-E Riser Cables for Cryptocurrency Mining in 2022

In essence, there are two ways to overclock your graphics card for mining. The first one involves using some kind of specialized overclocking software, such as MSI Afterburner, or your graphics card’s drivers (NVIDIA Control Panel or AMD Adrenalin Software). The second method involves installing and configuring cryptocurrency mining software, such as NBMiner, T-Rex miner, or GMiner, which come with built-in GPU overclocking features.

These days, most cryptocurrency miners allow you to directly apply custom GPU overclock settings directly through their interface. This comes with several benefits compared to using specialized overclocking software, such as MSI Afterburner.

Firstly, you can create as many custom mining profiles as you like with different overclock settings and for different crypto coins. For example, you can create a custom overclock profile for mining Ethereum, and a custom overclock profile for mining ERGO. Every time you start mining these coins, your miner will automatically apply overclock settings you have defined in its batch file. Once you close down the miner, your GPU clocks will automatically revert to their default settings, meaning you won’t have to re-open your overclock utility every time to reset GPU clocks.

Secondly, crypto miners allow you to explicitly define your custom GPU clocks in absolute figures, instead of relative figures. For example, if you want to set your GPU core clock to 1,500 MHz, then you can tell your miner to set your GPU core clock to 1,500 MHz. If you are using MSI Afterburner, then you need to tell the program to increase GPU core clock by +50 MHz, or +100 MHz, relative to your GPU’s stock core clock. Now, this may not seem like a really big deal, but it’s much more convenient to use a crypto miner for overclocking your GPU, since it saves you the hassle of recalculating frequency increase every time you want to apply new clocks. It also enables you to swiftly apply custom overclocks you find on the Internet, or easily share your settings with others.

How To Overclock GPU Using Miner Batch File

To overclock your GPU using a cryptocurrency mining program, you’ll first need to create or modify its existing batch files which are stored in its root folder on your computer. For example, if you saved your crypto miner in C:\CryptoMiner folder, then you want to navigate to that folder in order to find and modify miner’s batch files to apply custom GPU overclock settings. This shouldn’t be new to you, since by now you should have already filled up some of these files with your wallet address and mining pool data before you started mining.

If you want to overclock your GPU using a crypto miner, you’ll need to use special commands inside its batch file. However, each cryptocurrency miner comes with a different set of console commands. This means that you can’t just copy the code from some miner’s batch file and paste in the other’s batch file. You must obey the miner’s command syntax in order to make it work properly.

Down below we’ve listed custom batch file codes with GPU overclocking commands for different cryptocurrency miners. Just copy and paste the code into your miner’s batch file, and modify it according to your own preferences. The parts of the code that you need to replace with your own code are marked for each miner accordingly.

NBMiner Overclock Commands

To apply custom GPU overclock settings using NBMiner, first navigate to the folder where you saved NBMiner and in its root folder find start_eth_overclock batch file. Open the file, and then apply this custom code:

@cd /d "%~dp0"
nbminer -a ethash -o {Mining pool address} -u {Your wallet address}.{Your miner name}/{Your pool password} -log -pl {WW}%% -cclock @{XXXX} -mclock {YYYY} -fan {FF}
pause

Replace the parts of the code inside brackets with your custom code. Be sure to exclude all brackets from your final code!

  • Replace {Mining pool address} with your mining pool address (e.g. stratum+tcp://eth-eu2.nanopool.org:9999)
  • Replace {Your wallet address} with your crypto wallet address.
  • Replace {Your miner name} with your miner’s name
  • Replace {Your pool password} with your pool login password (optional). If you don’t use any passwords, be sure to delete “/”
  • Replace {WW} with you GPU power limit (in percent)
  • Replace {XXXX} with your target GPU core clock (in MHz)
  • Replace {YYYY} with your target GPU memory clock (in MHz)
  • Replace {FF} with your target fan speed (in percent)

After you have inserted your custom code, save the file. Run the file as administrator to see the effects.

T-Rex Miner Overclock Commands

To apply custom GPU overclock settings using T-Rex miner, first navigate to the folder where you saved T-Rex miner and in its root folder find and modify any of its batch files (depending on the crypto coin you prefer to mine). Open a batch file, and then apply this custom code (this example applies to Ethereum batch file):

{T-Rex.exe path} -a ethash -o {Mining pool address} -u {Your wallet address}.{Your miner name}/{Your pool password} -p x --lock-cclock {XXXX} --mclock {YYYY}
pause

Replace the parts of the code inside brackets with your custom code. Be sure to exclude all brackets from your final code!

  • Replace {T-Rex.exe path} with the path to your T-Rex executable (e.g. C:\CryptoMiner\T-Rex\t-rex-0.25.9-win\t-rex.exe)
  • Replace {Mining pool address} with your mining pool address (e.g. stratum+tcp://eth-eu2.nanopool.org:9999)
  • Replace {Your wallet address} with your crypto wallet address.
  • Replace {Your miner name} with your miner’s name
  • Replace {Your pool password} with your pool login password (optional). If you don’t use any passwords, be sure to delete “/”
  • Replace {XXXX} with your target GPU core clock (in MHz)
  • Replace {YYYY} with your target GPU memory clock (in MHz)

After you have inserted your custom code, save the file. Run the file as administrator to see the effects.

GMiner Overclock Commands

To apply custom GPU overclock settings using GMiner, first navigate to the folder where you extracted GMiner and in the program’s root folder find and modify any of its batch files (depending on the crypto coin you’d like to mine). Open a batch file, and then apply this custom code (this example applies to Ethereum batch file):

{GMiner executable path} --algo ethash --server {Mining pool address} --user {Your wallet address}.{Your miner name} --lock_cclock {XXXX} --mclock {YYYY} --pl {WW} --fan {FF}
pause 

Replace the parts of the code inside brackets with your custom code. Be sure to exclude all brackets from your final code!

  • Replace {GMiner executable path} with the path to your GMiner executable (e.g. C:\CryptoMiner\GMiner\miner.exe)
  • Replace {Mining pool address} with your mining pool address (e.g. eth-eu2.nanopool.org:9999)
  • Replace {Your wallet address} with your crypto wallet address.
  • Replace {Your miner name} with your miner’s name
  • Replace {Your pool password} with your pool login password (optional)
  • Replace {XXXX} with your target GPU core clock (in MHz)
  • Replace {YYYY} with your target GPU memory clock (in MHz)
  • Replace {WW} with you GPU power limit (in percent)
  • Replace {FF} with your target fan speed (in percent)

After you have inserted your custom code, save the file. Run the file as administrator to see the effects.

lolMiner Overclock Commands

To apply custom GPU overclock settings using lolMiner, first navigate to the folder where you extracted lolMiner and in the program’s root folder find and modify any of its batch files (depending on the crypto coin you’d like to mine). Open a batch file, and then apply this custom code (this example applies to Ethereum batch file):

set "POOL={Mining pool address}"
set "POOL2={Mining pool address}" 
set "WALLET={Your wallet address}.{Your miner name}"

set "EXTRAPARAMETERS=--cclk {XXXX}--mclk {YYYY}"	

***

for /f "delims=" %%F in ('dir /b /s "{lolMiner.exe path}" 2^>nul') do set MyVariable=%%F	

Replace the parts of the code inside brackets with your custom code. Be sure to exclude all brackets from your final code!

  • Replace {Mining pool address} with your mining pool address (e.g. eth-eu2.nanopool.org:9999)
  • Replace {Your wallet address} with your crypto wallet address.
  • Replace {Your miner name} with your miner’s name
  • Replace {XXXX} with your target GPU core clock (in MHz)
  • Replace {YYYY} with your target GPU memory clock (in MHz)
  • Replace {lolMiner.exe path} with the path to your lolMiner executable (e.g. C:\CryptoMiner\1.48\lolMiner.exe)

After you have inserted your custom code, save the file. Run the file as administrator to see the effects.

Conclusion

Now you know how to overclock your graphics card using the console commands of various crypto miners. As you can see, overclocking your card this way is quite easy and very convenient. You can create as many batch files and overclock profiles as you like, so don’t hesitate to experiment with various configurations. There are also many other parameters which you can specify that we didn’t mention in this guide. For example, some miners let you set custom fan curves, define core voltage offsets, and even specify memory temperature lists. For more information about this, please see the documentation for each crypto miner.

Read more

70 posts

About author
Before he joined ViCadia, Nicholas worked as a journalist for several tech magazines. Over the years he gained a lot of knowledge about computers. His main area of interest are processors, motherboards, and operating systems.
Articles
    Related posts
    How To's

    Undervolting Graphics Cards: What It Means and How It Works?

    6 Mins read
    The best way to retain maximum performance and decrease power consumption of your GPU is to undervolt it. Here is how to do it.
    How To's

    What To Do With Old Graphics Card?

    3 Mins read
    Do you have an old graphics card lying around that needs to be disposed of and you don’t know what to do with it? Here is a couple of solutions.
    How To's

    How to Install ChromeOS Flex?

    5 Mins read
    Want to breathe a new life into your old notebook? The Google ChromeOS Flex is the right solution for you. Here is how to install it.

    Leave a Reply

    Your email address will not be published. Required fields are marked *