Beware of GPU accleration (not games)

This is a discussion on Beware of GPU accleration (not games) within the Tech Board forums, part of the Community Boards category; I just thought I'd throw this in for fun. Is gpu acceleration really as good as they make it out ...

  1. #1
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428

    Beware of GPU accleration (not games)

    I just thought I'd throw this in for fun.
    Is gpu acceleration really as good as they make it out to be? I'm talking mostly about video decoding here. Yes, it uses less cpu power, and the gpu can probably do it more efficient and faster than the cpu, but here's the catch.
    The gpu draws more power unless you have an energy efficient card. And most high-end cards are real power suckers. For example, a 9600GT can eat up to as much as 100W. That's a lot.

    So I made a test. I decoded a 720p H264 movie using the cpu and the gpu.
    And in average, the gpu used ~4W more than when using the cpu.
    There you go. Don't believe in everything they say. Don't blindly rely on gpu acceleration.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    How exactly did you compare and measure? With what software and hardware?

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    Same clip, same scenes, with and without CUDA (using CoreAVC) and looking at my energy meter.
    Player was Zoom Player, using AMD Athlon II X2 250 (3 GHz) and Geforce 9600GT.
    CPU was running at 800 MHz, consuming around 6W according to ASRock IES.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    Energy meter connected to the wall outlet?

    What's the watt reading using CPU and GPU? Also, how long did they take to decode the same video?

    And what hardware are you using? (CPU and GPU)

  5. #5
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    It wasn't that precise a reading. I simply took a couple of seconds of measurement.
    One was with the CUDA option enabled and one without. With CUDA, I can clearly see that cpu use is lower, albeit not that much.
    And yeah, the energy reader is connected to the wall outlet. It actually measures a whole lot of stuff, where the monitor, computer and a lot of other stuff on my desk is connected, but I took relative measurements.
    ~227W (CPU) against ~231W (GPU).

    Unfortunately, I only have a 65W TDP rated processor. I'd have loved to get a 45W, but they were essentially sold out. But if I had one, the number might have been even lower.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    I have a 5.5W TDP CPU .

    I think the more important question is, how long did it take to decode the video?

    If it takes the GPU only half the time it would take on the CPU, that means it will have to consume more than twice the power to make it actually consume more electricity (energy), because, of course, energy = power * time.

  7. #7
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    You can't look it that way, because it's a video. So what I meant is that I basically let the video play a few seconds while watching the energy meter.
    So consider that since it measures Watts (ie joules per second), then when I get a higher wattage reading when using CUDA, it means that even if the GPU completes faster, it still consumes more power doing it.

    Hehe, a 5.5W TDP CPU can't be good for performance, though.
    Even though this CPU is a little old (well, old architecture, really; newer cpus are too expensive), it packs plenty of power, even at a mere 800 MHz.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    Ah, so it's decoding for real time playback. Not converting a video to another format (that's the impression I got when I hear "video decoding").

    Then I agree. It may not help if the CPU is fast enough. In most cases where GPU video acceleration is designed for, though, the CPU is not strong enough, and would introduce skipping. GPU acceleration enables cheap computers with low-end processors to play high resolution videos with inexpensive low-end cards (a 8400 can be had for ~$30, and I think ATI cards are even better for video accleration).

    My 5.5W TDP CPU is an Ultra Low Voltage Core 2 Solo 1.4ghz. Roughly equivalent to a Pentium 4 at 2.8ghz. The dual core version (with same frequency) is 9W TDP.

  9. #9
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    Yes, I would agree it's helpful in such situations. But you keep hearing about how gpu acceleration is something "good" to have (or at least that's the impression you get), and that's basically what my point was - don't take it for granted. Gpu decoding is not necessarily better (doesn't mean it can't be, though).

    Core 2 Solo
    I hate single core cpus...
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    Yeah, Vista runs a bit sluggish on this laptop. Linux runs just as smooth as on my desktop, though .

    Otherwise... the single core is not as bad as I thought. Except compilations take longer since I can no longer compile with 2 threads. I don't do any heavy work on my laptop, though. For that I can connect back to my desktop with a C2D overclocked to 3ghz. On the other hand, it's loaded with benefits. 8 hr battery life, and the laptop is cool to the touch all the time, and the fan doesn't start until you put the CPU at 100% for a minute or 2. I even forgot to turn it off once (since it was too cool), and put it in my backpack. It was only slightly warm when I took it out 3 hrs later, with 70% of battery left. Lucky it has a SSD. The harddrive would probably have been killed since I don't treat my backpack nicely at all.

  11. #11
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    Oh yes, I have a similar ... netbook. But I hate the lack of processor power.
    But it sounds as if you need to upgrade to Win7
    Lucky me. I get it for free, though
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    Haha. Mine came with Vista Basic, so no free upgrade to W7 .

    Lucky me, I get Linux for free .

    A ULV C2S is about half way between Atom and "normal" processors.

  13. #13
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    Ha, mine came with XP.
    But Atom is seriously crap. It's not even 64-bit. It's really infuriating.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #14
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    Ah, so school thing?

    I can get Windows Server 2008 for free, but will have to tune it to a non-server OS. I heard I can get W7 for free if I join IEEE as a student member, too, due to a contract between MS and IEEE. I will stick to Linux for now, though. The only thing I would get Windows for is battery life. My laptop can run for ~10 hrs on Windows, but "only" ~8 on Linux. I think the Linux drivers for my hardware are not as optimized for efficiency yet, since the hardware is pretty new, so they probably just tried to make it work first.

  15. #15
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    Yes, school thing. Lots of software... FREE.
    And you get 10 hours on Vista? I wonder what you would get on Win7, since it's actually even more efficient on battery than XP.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. When done right, PC games are amazing
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 08-13-2008, 05:32 PM
  2. Violent video games?
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 58
    Last Post: 04-26-2006, 01:43 PM
  3. Hooked on old games...... still
    By Stoned_Coder in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 05-30-2005, 02:46 PM
  4. Video Games Industry. 5 years left.
    By Cheeze-It in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 12-10-2002, 09:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21