Posts Tagged ‘GPU power usage

nvidia-smi-power-limit

There are a number of tools available that can allow you to monitor and control various aspects of your GPU and most fo them do come with nice graphical user interface to make things simple. When mining however you might want to have easy console command control over the GPU behavior to be able to execute commands that change things from a Batch file fro example right before a given miner software is stated. For Nvidia GPUs there is the Nvidia System Management Interface (nvidia-smi) command line utility that can help you do that in a simple and effective way, we have already showed an example using it to control the power state of the GPUs for getting some extra performance with non-overclocked video cards that are not running at the maximum power state when doing compute tasks such as mining for crypto currencies. Now it is time to show you some more useful tricks for using the nvidia-smi to check and modify the maximum TDP (Power Limit) that a given GPU can use as well as how to monitor constantly the GPU temperature and power usage and possibly log them in a file if you need that recorded for some further analysis.

The nvidia-smi utility is part of the video drivers and you can find it installed in the folder “C:\Program Files\NVIDIA Corporation\NVSMI\” on Windows, so you need to run the command line (cmd) and navigate to that folder in order to be able to issue commands. You then need to run nvidia-smi with some specific parameters based on what you need it to do such as specifying which GPU you need to play with by ID and then the command that needs to be sent or the data read from it.

So if you want to see what is the power limit of the first Nvidia GPU in the system:

nvidia-smi -i 0 --format=csv --query-gpu=power.limit

If you do not include the i parameter followed by the GPU ID you will get the power limit of all of the available video cards, respectively with a different number you get the details for the specified GPU. Then comes the fun part, changing the power limit to a lower value in order to reduce power consumption without affecting the performance or with slight decrease to get better power efficiency while mining. So in the following example we set the power limit to 175W for the first GPU down from the maximum of 275W that is has preset in the BIOS:

nvidia-smi -i 0 -pl 175

nvidia-smi-temperature-report

The next useful thing we want to be able to do via the console is to check the temperature of an Nvidia GPU and have it reported each second with the ability to also save the results in a text file should we need to do some additional analysis of the results. Using nvidia-smi to read the temperature of the first GPU each 1000 ms (1 second) can be done with the following command:

nvidia-smi -i 0 --loop-ms=1000 --format=csv,noheader --query-gpu=temperature.gpu

In order to stop the reporting of the temperature in degrees Celsius you need to press CTRL + C. If you need to have the result recorded to a text file you can run the following command:

nvidia-smi -i 0 --loop-ms=1000 --format=csv,noheader --query-gpu=temperature.gpu > temperature.txt

nvidia-smi-power-usage

The same way you can get the temperature of a GPU in the system reported you can also have a report on the current power draw of each Nvidia GPU in Watts for example every second. The reporting of power usage is very accurate and does not require any hardware as it is already implemented on a hardware level in the more recent Nvidia-based video cards. What you need to do is to run the following command:

nvidia-smi -i 0 --loop-ms=1000 --format=csv,noheader --query-gpu=power.draw

In order to stop the reporting of the temperature in degrees Celisus you need to press CTRL + C. If you need to have the result recorded to a text file you can run the following command:

nvidia-smi -i 0 --loop-ms=1000 --format=csv,noheader --query-gpu=power.draw > powerusage.txt

The reporting of the current power usage can be very helpful when tweaking your Nvidia-based video card for achieving the best power usage / mining performance ratio and also in order to compare power usage between different crypto algorithms. The nvidia-smi tool has some other useful features that may be handy for users, do note however that the changes you make with it are not permanent, they will need reapplying if you restart your computer, but you can automate them with a simple batch file by running a command right before you start up your miner software.


top