[Qgis-psc] Environmental policy

Even Rouault even.rouault at spatialys.com
Fri Jan 24 11:13:22 PST 2020


> I wonder if we can’t also consider ‘low power’ QGIS mode where we consume
> the minimum amount of energy on the device QGIS is deployed on? Maybe a
> nice fat ’Save the environment’ (runs QGIS on 1 cpu) ‘Kill the environment’
> (runs on all cpus + GPU) toggle switch in the status bar would be a cool
> addition in 2020?

Interesting, but it is far from being obvious to me. I wouldn't be surprised 
if the results were actually the inverse.

I suspect the total power consumption of a CPU must be something like:

total_power = constant + number_vcpus_active * per_vcpu_power

It must be horribly more complicated than that. In particular for hyper-
threaded siblings. There might also perhaps be a over consumption factor in 
having serveral vCPUs active? 

So assuming that the parallelized algorithms scale close to linearly (and are 
not stuck in busy loops in spinlocks), I'd bet that for a given CPU, you will 
consume (a bit) less in making all vCPUs busy.

Let's assume that constant = 1 W and per_vcpu_power = 10 W, that the CPU has 2 
cores and that this runs in 1 sec with this 2 cores (and that there's no over 
consumption due to 2 vCPU busy):

energy = 1 * (1 + 2 * 10) = 21 W.s

If using just 1 core, then you'll need 2 seconds to do the same job:

energy = 2 * (1 + 10) = 22 W.s

The constant might actually not come from the CPU itself, but more from all 
other electronic components (RAM, screen, etc.) making the computer drain 
power, while you wait for the result.

The use of the GPU can potentially save power if submitting it to it 
computations for which its efficiency is > CPU. After all, taking a 
provocative example, if professional bitcoin miners use dedicated hardware, 
that's because it saves energy rather than doing the same on general purpose 
CPUs...

A 'Save the environment' mode could probably be disabling pre-fetching of the 
tiles around the displayed area. But I'm not even sure. It would certainly 
require doing actual power measurements to avoid the risk of false claims...

Doing computations with a coarser resolution would certainly help.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com



More information about the Qgis-psc mailing list