Matthew Garrett ([info]mjg59) wrote,
@ 2008-01-21 00:42:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Entry tags:advogato, ubuntu

A conversation at lunch today inspired me to work on a quick estimate of the amount of power wasted on animation and Flash-laden MySpace profiles. My conservative estimate is somewhere in the region of 320 kiloWatts, which is much less than I'd have expected. This is probably skewed by me carrying out the test on a laptop - I'd guess that it'll be worse on desktops, but I need to do some more testing to be sure (ideally involving a Watts-up and a serial connection so it can be done without a ridiculous amount of pain). By changing a couple of assumptions it's quite easy to get it up into the megaWatt range, but we're still talking "That's quite a pile of money" rather than "That's a sizable proportion of the US electricity output".

Interestingly, the vast majority of the extra CPU usage (and therefore electricity) seems to be down to Flash. Improving its performance would be a pretty big step in reducing overall power consumption, especially given the number of websites running flash adverts. Want to save the world? Turning off Flash might be a surprisingly good step.

I've written up my methodology and results here - I'd be interested in any feedback.




(33 comments) - (Post a new comment)


(Anonymous)
2008-01-21 01:44 am UTC (link)
320 kW for 8 hours a day = 2560 kWh, which at american retail costs about $0.06/kWh = $153 per workday, total over all the users. It's not even a small pile of money. It's a teeny weeny itsy bitsy yellow polka dot mini pile-ikini of money.

(Reply to this) (Thread)


[info]mjg59
2008-01-21 01:47 am UTC (link)
Where do you get the 8 hour per day figure from?

(Reply to this) (Parent)(Thread)


[info]jldugger
2008-01-21 02:07 am UTC (link)
Hours spent at work watching youtube, obviously.

Actually, I bet youtube is far worse. I pretty much avoid it when I can for long videos because it brutalizes the cpu enough to spin up the fans real good.

(Reply to this) (Parent)(Thread)

So?
(Anonymous)
2008-01-24 01:40 pm UTC (link)
So get a faster computer, dipshit.

(Reply to this) (Parent)(Thread)

Re: So?
[info]jldugger
2008-01-24 02:03 pm UTC (link)
I assure you it's plenty fast. In fact, I mostly just dislike the noise the fans make when spinning up because Flash video is not meticulously engineered. For reference, VLC/mPlayer/Totem can all decode an FLV in fractions of the CPU power Flash needs.

(Reply to this) (Parent)(Thread)

Re: So?
(Anonymous)
2008-01-24 06:13 pm UTC (link)
Err? Maybe your idea of a faster machine means taping 2 calculators together.

You obviously have a crap computer if your cpu is "Brutalized" by watching youtube videos, god forbid a game of solitaire.

(Reply to this) (Parent)

(Reply from suspended user)

(Reply from suspended user)

(Reply from suspended user)
gentoo destroys ice caps
(Anonymous)
2008-01-21 02:50 am UTC (link)
Next calculate how high the sea levels raise every time a Gentoo user types emerge -uD world. ;)

(Reply to this) (Thread)

Re: gentoo destroys ice caps
(Anonymous)
2008-01-24 02:56 pm UTC (link)
More kilowatts of power are consumed by the multitude of whiny mewly linux freetards posting drivel on blogs about how the world should be open source and everybody should use the command line for everything. And leaving multiple pcs switched on 24/7 for no good reason.

On the other hand, these same 'tards save energy in that they don't wash often, are unlikely to procreate and create siblings, and are up late at night on irc and fiddling with distros when it's more energy efficient.

(Reply to this) (Parent)(Thread)

Re: gentoo destroys ice caps
[info]ianlewis
2008-01-25 06:24 am UTC (link)
Jeez, either you don't know what a sibling is or you need to be more clear about the meaning of your insults.

(Reply to this) (Parent)(Thread)

(Reply from suspended user)
Flash
(Anonymous)
2008-01-21 03:34 am UTC (link)
On windows flash sets the multimedia timer precision to 1 ms, resulting in a big increase in CPU usage for anything that is doing timing related things. On my laptop, windows normally has timer resolution of about 16.67 ms (I've seen 10 ms on other laptops though). At least on Windows, as soon as you visit a flash page everything using sleeps or timers gets much higher precision than they would have originally, but this is because the API sets the timer precision system-wide.

I'm pretty sure Red Hat Enterprise kernels default to a 1 khz clock so maybe it makes no difference in that situation. I think the mainline Linux clock rate is/used to be 100 hz.

(Reply to this) (Thread)


[info]ronebofh
2008-01-21 05:50 am UTC (link)
Can you explain to us mortals how to do that?

(Reply to this) (Parent)(Thread)

How to do what?
(Anonymous)
2008-01-21 09:58 pm UTC (link)
If you mean set the precision of the multimedia timers in windows it's in MMSystem.DLL:

timeBeginPeriod(x);

and

timeEndPeriod(x);

where x is the desired precision in ms.

(Reply to this) (Parent)

Unexpected side-affect
(Anonymous)
2008-01-21 04:15 am UTC (link)
Turning off Flash (or better, removing it altogether) also has the unexpected side-affect of increasing browser stability, AND sanity levels.

(Reply to this) (Thread)

Re: Unexpected side-affect
[info]brokenhut
2008-01-21 09:36 am UTC (link)
Basically, you feel a whole lot better about life and the web if you use some ad blocker that nukes flash files too. I find it nearly incomprehensible how obnoxious the (commercial) web is without these things.

(Reply to this) (Parent)

Re: Unexpected side-affect
(Anonymous)
2008-01-24 02:41 pm UTC (link)
yeah a web without video or rich interaction, mmm bet you're fun at parties with your luddite flat-earth everything-should-be-text-like-back-in-1990 whiny attitude

(Reply to this) (Parent)


[info]oedipamaas49
2008-01-21 09:26 am UTC (link)
...through the coldness of winter, impoverished families huddle around band profiles as their only source of warmth. God bless you, myspace.

[has anybody set up central heating powered by a server farm?]

Marginally more seriously:
"preventing the machine from idling while the user reads content."
but you aren't comparing myspace to simulated browsing of other content, you're comparing it to a machine doing nothing. Presumably javascript, clicking on links, etc, would bring a computer back up to C0 some of the time. Not to mention the likelyhood of having chat clients, music players, etc, running at the same time.

What I would love (more for sanity than the environment) is the ability to automatically suspend flash, javascript, etc, in inactive browser tabs. But presumably there are reasons why that can't happen.

(Reply to this) (Thread)


[info]mjg59
2008-01-21 09:43 am UTC (link)
The majority of sites are fairly static or (in the worst case) have content that's updated a few times every second. That's certainly a contribution to power consumption, but it's not anywhere near as bad as anything with embedded flash. Chat clients should really be event driven (ie, idle until someone sends or receives a message), but music players are a more interesting question. By buffering the decoding rather than doing it on an as-needed basis, you can reduce the number of transitions to C0. It turns out that this is almost as important as reducing CPU usage in the same place - each transition adds latency and power consumption, so doing lots of work in one go and then idling the rest of the time is much mroe power efficient. Then you only need to wake up to refill the buffer on the sound hardware, which is probably interrupt driven. It doesn't really end up being too bad.

(Reply to this) (Parent)(Thread)


[info]oedipamaas49
2008-01-21 04:19 pm UTC (link)
fair enough. Thanks for explaining.

(Reply to this) (Parent)

[has anybody set up central heating powered by a server farm?]
[info]pjc50
2008-01-21 03:24 pm UTC (link)
Interesting idea. You could probably manage to heat an office effectively by its server farm; I don't know whether AC systems are designed to do this, but it should be possible to redirect the output air (or at least heat) into the colder rest of the office.

If this is viable I can imagine an outsourcing model working well for medium sized sites that have a large net heating need, e.g. retirement homes: bring in a small (2-3 racks <= 5kW) server farm operated by some other company to provide a few kw of heating and small amount of money. This does require servers that are low-maintenance.

If there were a market in "switchable load", the other possibility would be to have a server farm of NkW with 2NkW of cooling plus a large phase change reservoir (ice or somesuch), then you can sell the ability to turn the AC off when a wind farm spins down.

(Reply to this) (Parent)

teminology
(Anonymous)
2008-01-21 11:02 pm UTC (link)
> methodology

Bastard.

(Reply to this)

Lame
(Anonymous)
2008-01-24 01:37 pm UTC (link)
This is possibly the single, most ridiculous, and poor case of bashing flash. You are ridiculously ignorant if you actually believe the crap you spewed in this article. Flash is here to stay, its not going away. Myspace sucks on its own, the people who clutter their profiles - tell those people to remove it, they are the caused of the mis-use of flash. Seriously, is that all you could come up with for a case against flash? You sir, are a complete moron.

(Reply to this) (Thread)

Re: Lame
(Anonymous)
2008-01-24 03:06 pm UTC (link)
It's part of the freetard religion - logic or intelligence doesn't come into it.

If you think of linux/open source zealots as a kind of technological taleban - a similar delusional, violent and irrational mindset: flash bashing is a sacred ritual, everything not linux is bad, must be killed, nobody is allowed to have fun or progress, everything must be strict xhtml

(Reply to this) (Parent)(Thread)

Re: Lame
(Anonymous)
2008-01-24 03:20 pm UTC (link)
I always turn off all the lights in my room before watching a flash-website, just to compensate my energy consumption, and totaly save the planet by doing so!

(Reply to this) (Parent)(Thread)

Re: Lame
[info]joshuawait
2008-01-29 06:58 pm UTC (link)
Oh yeah, well I always turn off all the lights, unplug all my glowing USB peripherals, yank the LED out of my KVM switch, unplug the refrigerator, unplug the DVD player, set my alarm clock to run on batteries, and call all the neighbors to tell them to do the same before I watch a Flash based video : )

(Reply to this) (Parent)(Thread)

Re: Lame
(Anonymous)
2008-01-30 01:39 pm UTC (link)
lol

(Reply to this) (Parent)(Thread)

Re: Lame
[info]madopal
2008-02-16 05:50 pm UTC (link)
Why is it that flamebait of this sort is almost always posted as anonymous? Scared someone might come along and ridicule your opinions? Oh, that would mean you're confident enough to come out of your safe bunker long enough to stop throwing rocks, which, clearly, you're not.

The point is that much of what is done on the web is without reason, and it wastes a heck of a lot of energy in doing so. And honestly, for every Flash-riddled Myspace profile, there are 3-5 corporate websites with needless Flash intros. That doesn't even count the question of how many websites could easily be redesigned without Flash of any sort, or the prevalence of Flash ads.

Flash per se isn't bad, and I don't remember an argument above where anyone proposed the removal of Flash from the Web. It was an intellectual exercise to see how much energy was being used in one example (Myspace), nothing more.

Keep propping up that Open Source/Linux straw man and then knocking it down. It's really helping your arguments.

(Reply to this) (Parent)

Power consumption is a factor in all our lives
(Anonymous)
2008-03-13 06:26 pm UTC (link)
I can understand that most people do not see this as a problem, but non the less, electric utilities and electrical distribution networks have been looking at this and similar problems for years. Electrical loads from tv's, refrigerators, and other major appliances have been accounted for in the electrical networks, but both real power and what is called "imaginary power" (sounds funny but it is a technical term for a component of the power used by inductive electrical devises like computers) continues to increase.

All those little connected loads from brick transformers, and switching transformers powering small devises like laptops, cell phones, ipods, etc. etc. etc. add up when you consider them en mass.

The next time you have one of those transformers plugged in, put your hand on it on a cool day, and you will find it warm to the touch. What you are feeling is the heat of the sun stored in fossil fuel some millions of years ago being released into the room and then the house and then the earth.

Or for the less environmentally considerate types, the warm feeling is your money burning as your electric bill goes up .25 watts at a time.

Lou "Weegie" B
weegieb@gmail.com

(Reply to this) (Parent)(Thread)

Re: Power consumption is a factor in all our lives
[info]mjg59
2008-03-13 08:57 pm UTC (link)
You might want to read David Mackay's article on this. Worrying about power loss via chargers is pretty equivalent to worrying about the effect of coastal erosion on the continuing viability of the Stonehenge site.

(Reply to this) (Parent)

Re: Power consumption is a factor in all our lives
[info]gordwick
2009-08-26 05:20 pm UTC (link)
Thanks, that's very insightful, my concern is not my laptop, it's my fridge and my other large appliances. No matter what other new appliances I chose on the market today I'll have to deal with the heat of the sun stored in fossil fuel, I'll still have heat stored into my room, we don't really have too many options at the moment, do we?
http://www.appliancepartspros.com/Sears-Parts.aspx

(Reply to this) (Parent)


(33 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…