Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


optimization and power consumption rate


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 fir   Members   -  Reputation: -456

Like
0Likes
Like

Posted 24 August 2013 - 11:41 AM

Do the optimization made less power consumption on computers?When long calculation can be done in a day instead of the week it is obviously yes, but what with game code when you optimize  the main loop (for example 5 times) It will make processor load 5 times lower and will it make it cooler?

 

Personaly I take a power consumption of my machine into a heavy account (in practise more than computation power) because it cost money and is quite noticeable (my own old machine + monitor  takes for example I think tess than 100W maybe even 50W, it seems that it consume less than my 14' tv set - and I would not want to buy a 400W monster or something)

 

It seem that worse than the CPU is GPU, Is it? Do the GPU code optymisation techniques lower the GPU energy consumption noticeable?


Edited by fir, 24 August 2013 - 11:43 AM.


Sponsor:

#2 Adam_42   Crossbones+   -  Reputation: 2619

Like
2Likes
Like

Posted 24 August 2013 - 01:59 PM

Optimizing game code can both save on power consumption and increase it, depending on the situation. In general the more time something spends executing instructions, the more power it will consume. However most of the time any sensible optimization (i.e. one targeted at the bottleneck to improve frame rates) will increase power usage.

 

For example let's say your game is running at 20ms / frame on the CPU and 10ms / frame on the GPU. This means the GPU is 50% idle, and the CPU is at 100% load. Now lets optimize the CPU usage down to 15ms. The CPU is still at 100% load, but the GPU is now at 67% load and therefore the overall power usage has increased.

 

There's one setting that can save lots of power - turning on vsync. With it on both the GPU and CPU can end up idle for significant quantities of time while waiting for the monitor to display the next frame.

 

Optimizations that don't improve the frame rate, should save on power usage instead.



#3 PeterStock   Members   -  Reputation: 396

Like
2Likes
Like

Posted 24 August 2013 - 02:40 PM

Do the optimization made less power consumption on computers?

Yes, with the exception of the situation Adam described - if you use the extra time you have to do more stuff (render more frames), then that might not be lower power. But if you use the time to do nothing (your process/thread sleeps) then it's lower power.

When you have >60 fps then you might want to put in a frame limiter to throttle it to 60 and sleep during the 'spare' time. Or substitute whatever X you want instead of 60.

#4 Eliad Moshe   Members   -  Reputation: 813

Like
1Likes
Like

Posted 24 August 2013 - 08:11 PM

"Energy Efficient Software Development" at "Intel® Developer Zone" :

http://software.intel.com/en-us/energy-efficient-software



#5 Oolala   Members   -  Reputation: 860

Like
2Likes
Like

Posted 24 August 2013 - 08:23 PM

Adam_42 is totally correct.  Games aren't normal software.

 

Most software starts doing a task, and when it's done, it terminates.  Thus, if code optimization reduces the run time, then it very probably also reduces the consumed energy for accomplishing that task.  Games on the other hand tend to sit in a loop, and their task doesn't terminate until some external event occurs.

 

On a side note, there is also a fair bit of recent academic research that has been done on the topic of compiler optimizations specifically for energy efficiency.  It kind of started developing in the mid-1990's, but didn't see a lot of uptake until relatively recently, now that energy efficiency is becoming a really big deal.  Check out the 1994 paper "Power Analysis of Embedded Software: A First Step Toward Software Power Minimization" for a light introduction to the topic.  It's also cited nearly a thousand times, by everyone and anyone who has done work in this area, so you can very easily google scholar search for more details on this topic.

 

Bottom line though, energy efficiency is FAR more an architectural thing than a software thing.  One of the biggest decisions a software developer can do to save energy is just not compute stuff.  Everything you don't compute takes less energy than everything you do.  Thus, running your game at 30 fps is going to take less energy than running it at 60.  One of the only times that compilers start to really make a big difference with regard to energy consumption is when you're compiling for something that isn't just a processor, but features various kinds of processors and coprocessors that specialize at different things.  Anything a compiler can more from big & fast to small & slow without getting creamed on performance is going to save you energy, anything a compiler can move from general purpose to special purpose is going to save you energy.  These methodologies though aren't commonly seen in regular compilers though, because systems that are packed with specialized coprocessors aren't commonly seen in regular computers.


Edited by Oolala, 24 August 2013 - 08:26 PM.


#6 Matias Goldberg   Crossbones+   -  Reputation: 3717

Like
1Likes
Like

Posted 24 August 2013 - 11:05 PM

Since Mobile gaming has been focusing on saving energy (due to battery constraints), you may be interested in what they are doing.

For example, here's a good start (memory bandwidth consumes a lot more power & heat than cpu/gpu ALU).

visit the GDC 2012 vault (there's a free section), and google for the SIGGRAPH 2012 & 2013 presentations; there's a lot of mobile talks focusing on power efficiency. I haven't yet catch up with gdc 2013 slides so there may be something too, I don't know.



#7 King Mir   Members   -  Reputation: 2050

Like
1Likes
Like

Posted 25 August 2013 - 01:21 AM

Power consumption is proportional to how much work the processor is doing. Optimizing for speed does that, and tries to increase the number of things the processor does in parallel. Instruction Level parallelism does not add any additional overhead, that is not already incurred by virtue of the processor supporting it. So as long as you're not optimizing by making a program multi-threaded, optimizing for speed will optimize for power.

Optimizations that reduce access to main memory or improve cache performance may also reduce the power consumption of memory, I think. Certainly reducing page faults and Hard-disk IO will give power savings.

Optimizing by moving computation to the GPU is, IMO, likely to reduce power when it also improves speed, because these kinds of computations tend to use memory less efficiently when run on the CPU, but I'm not confident of that.

On the other hand, making a program threaded, or use threads more efficiently may consume more power, because there is a cost to synchronizing threads. The same applies to multi process or multi machine "programs", though power consumption tends not to be a dominant consideration in network communication.



Others have pointed out that if you optimize for speed, but increase the frame rate, you're not reducing power consumption.

Edited by King Mir, 25 August 2013 - 01:23 AM.


#8 AllEightUp   Moderators   -  Reputation: 4270

Like
3Likes
Like

Posted 25 August 2013 - 04:30 AM

A correction needs to made to the thread here. If you look at the power draw on all the SOC (System on Chip) based devices over 80% of all power goes to graphics. So, all said and done, Adam_42's comment is the only realistic argument. On the other hand, "specific" optimizations reducing the load on the GPU *WILL* be your most effective optimizations. Culling/Occlusion, back to front rendering etc are items which will massively increase battery life, even though more CPU time is required. The CPU battery cost is nearly trivial in comparison if you go look up the charts and figure out the likely draw characteristics.

#9 fir   Members   -  Reputation: -456

Like
0Likes
Like

Posted 28 August 2013 - 12:57 AM

Much tnx for all info 






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS