PDA

View Full Version : YouTube + Flash Plugin + Firefox = CPU Cook



Bloodwych
31st January 2008, 10:50
Recently, with Firefox 2.0.0.11 and Adobe Flash 9.0.115.0, I've noticed a dramatic increase in CPU usage on websites that use the flash plugin.

Playing one video on youtube results in 50-60% CPU usage on a 2Ghz machine, spiking all over the place. Playing two videos results in performance loss!

Something's not right. Loads of people are running into this issue and I hope it's fixed soon. I have a laptop that I gave to my parents that's cooking everytime they go to youtube and it's starting to piss me off!

The same video downloaded and played in VideoLAN uses 0-1% CPU. Very annoying!!! Any of you guys noticed the hit?

This issue is helping to speed up global warming - someone should be sued!!!

Harrison
31st January 2008, 12:20
I've watched quite a few Youtube videos lately and haven't noticed any performance hits. I've even had them playing on one monitor while I'm doing other things on the other. I will take a look at my CPU usual next time I run one though just to see how much it uses up.

Buleste
31st January 2008, 12:38
Best thing to do would be to get Speedfan os you can see just how hot hot is.

Bloodwych
31st January 2008, 13:03
I have speedfan, but the temps are not causing a problem. The noise of the laptop fan speeding up is though!

All caused by this flash plugin's CPU usage - stupidly high - 50% for the "recently viewed" animated menu at the top of the youtube page. 60-70% for viewing one vid, spiking even higher at times!

Third party players use 0-1% CPU. Surely even flash, although cross platform, can't be that inefficient? If it is, that's an unacceptable waste of electricity and resources for simple tasks like moving around images!

I'm not sure if the Internet Explorer ActiveX plugin suffers from the same issue, probably not.

Thanks for checking your PC out Harrison. Very common problem according to Google. Some over at EAB have noticed it too.

Buleste
31st January 2008, 13:14
It may be a problem with Firefox just not working well with Flash in their current incarnations. Next update will probably solve it.

Bloodwych
31st January 2008, 13:35
It may be a problem with Firefox just not working well with Flash in their current incarnations. Next update will probably solve it.

You're probably right. Fingers crossed! :)

Have you noticed an issue with your Browser/Flash config?

Buleste
31st January 2008, 13:52
I use IE7 as although i like Firefox i've just not been anle to get into it. It works fine with Flash. I ran Ahmed at Christmas and CPU usage went up to 30% which is about normal for my 2.8 P4.

Bloodwych
31st January 2008, 14:01
Yes, I think that's what I used to get on my computer of similar speed, 14-30% on video playback. Considering that's a compressed format it's acceptable.

When you consider third party ones can do it for under 2%, it's still laughable! Obviously they're not cross platform friendly and probably have more hardware acceleration support.

Harrison
31st January 2008, 14:03
OK, I just played a couple of YouTube videos with the Windows Task Manager's Performance window open and it was using 15-20% CPU usage throughout the playback of all the videos I tried.

The PC is an Athlon 64 4000+, so isn't multi-core, with 2GB of ram.

The system also had a few things running in the background at the same time. Outlook 2003, Photoshop CS3, SmaprtFTP, and another Firefox window, so all that CPU time wasn't just being used by FF+Flash.

I think the biggest factor that could increase CPU usage for flash video playback would be a system with limited ram. 512MB or less. A Flash Video is always more likely to use more CPU resources than watching something using a dedicated video codec. Most recent CPUs and Video cards have built in support for direct video decoding on playback, whereas Flash video has to be played completely in software. It's the negative aspect of a format that is codec free, more portable and cross platform.

Bloodwych
31st January 2008, 14:24
I've managed to get the CPU usage back to a reasonable level, so I apologise for wasting time on this without properly testing.

I re-installed flash and restarted the computer - it's gone back to 14-30%, spiking up to 40%, on media content and video playback. Strange, since I did re-install flash before I posted this thread (but didn't feel the need to restart the computer, only the browser).

Some update must have caused the issue.

I agree with you Harrision about flash's cross platform nature and lack of dedicated and optimized hardware acceleration, I did mention it a few times above.

I still find it strange however how it uses the same CPU power to play a compressed flv file as it does to move around and scale a few images (about 3000MIPS!!! on peak average). It could really do with being optimized better since it's now a standard internet format.

Many emulators take less resources than flash!

Harrison
31st January 2008, 14:42
Very true. But Flash is quite a complex beast these days. The size of it's final FLV or SWF files is always down to the person creating the original file, or the code used (in the case of YouTube) to do the job for you. Only first hand optimisation can get a file to it's optimum size, compression ratio and quality. This is true of any video format. Optimise or encode any video format badly and the CPU hit will grind a computer to a halt.

The huge advantage with the format as far as streaming formats like YouTube are concerned is that it can do that conversion and encoding on the fly without human intervention. This is a huge step forward from using most other video codec technology where they have to be rendered before uploading.

Bloodwych
1st February 2008, 14:11
Flash is getting very close to being uninstalled because as complex as it likes to think it is, there is no excuse for this behavior that is reproducible on three different systems, one with a fresh install.

I thought the problem was fixed, but it's simply random. Sometimes flash will use less CPU time, others it will decide to double it's CPU usage. It looks like it has a stupidly high priority set but this really is an annoying issue, even more so for Laptops.

No programs should require 90% of my CPU, or some 9000 MIPS, for moving round an animated banner. The graph spikes start once I hit the YouTube homepage and move the cursor over the animated banner. Without the cursor movement, it spikes up to 60% when refreshing the images, 0% when stationary. Playback of one video can decide to use 60-80%, making the system sluggish and unresponsive:

Bloodwych
1st February 2008, 15:26
As well as the high CPU usage on animated banners, here is the usage when playing one video, then showing the flash video list at the end.

Playing a video uses between 60-70%
Showing a stationary flash list 30-40%

Definitely some issue going on here. Hardware acceleration is fine in other software (although I doubt flash uses it), so it's not the video drivers.

All I can do is wait for a flash/browser update.

Demon Cleaner
1st February 2008, 15:32
I just tested, I have the same version of flash and firefox, but I don't get such high cpu usage.

Bloodwych
1st February 2008, 15:46
What kind of numbers are you getting and what's your CPU?

This might be a conflict specific to certain hardware setups and drivers I suppose. But as I said above, googling shows many others have this high CPU issue with flash content.

The above graphs are from a 2Ghz Barton CPU, 1GB 400Mhz DDR. Not exactly cutting edge, but this issue has just popped up recently with Flash 9.

My parents have a similar speed laptop, Pentium M 1.6Ghz, that has the same issue. That of course results in poor battery performance and a loud cooling fan when surfing flash rich sites, such as YouTube.

Demon Cleaner
1st February 2008, 15:53
This is on my PC at work, which is a Core 2 Duo 1.86GHz and 2Gb of RAM running XP SP2.

Bloodwych
1st February 2008, 16:19
Ok, to prove that I'm not totally alone and there is a problem with Flash, this page runs my computer and others CPU up to 100% usage and WARNING: literally locks my PC until I close it:

http://www.lanik.us/misc/ff-flash-test.html

It's nothing more than a page with several embedded flash videos (check the simple source code), none of them set to play. All they are doing is sitting there waiting to be played.

Any page with similar heavy flash content, video or no video, banners, adverts, widgets etc can cause the same effect (but not always). Each object has the potential to use excessive amounts of CPU.

AlexJ
1st February 2008, 16:25
On viewing that page, my CPU goes up to 98% but I'm not experiencing any lag or slowdown. And looking at it my PC's underclocked itself again so it's effectively running as a Athlon MP 1800+. Normally it'd be a slightly overclocked 2600+.

Stephen Coates
1st February 2008, 16:28
I havn't measured it recently, but I'm pretty sure that meter thing goes up quite a bit when watching flash videos, but it doesn't really make the system noticably slower when doing tasks like looking at other sites.

I probably don't have the latest version of flash installed as I got a popup saying that there is an update and would I like to download it as soon as I switched my computer on.

That alone is enough to annoy me.


Ok, to prove that I'm not totally alone and there is a problem with Flash, this page runs my computer and others CPU up to 100% usage and WARNING: literally locks my PC until I close it:

http://www.lanik.us/misc/ff-flash-test.html

It's nothing more than a page with several embedded flash videos (check the simple source code), none of them set to play. All they are doing is sitting there waiting to be played.

Any page with similar heavy flash content, video or no video, banners, adverts, widgets etc can cause the same effect. Each object uses excessive amounts of CPU.

That link took me to 100%, but still no slowdown.

EDIT: This was with Opera, not with Firefox. Has anyone else experienced this problem with other browsers?

Demon Cleaner
1st February 2008, 16:40
On that page mine goes up to 10-15% and when starting a video, it goes up to 35%.

Bloodwych
1st February 2008, 16:41
Thanks for trying. It really is a hard issue to track down - some people don't have any issues with that page, even low CPU usage! Others have locked PC's (you do have to wait a while for the page to fully load), some like yourselves.

Regardless, Flash shouldn't be exhibiting this behavior, as it causes so many issues when surfing the web. Surfing is meant to be a low resource task, especially if you're running other things in the background. With flash, it's now becoming a CPU hog for some users and a real pain for certain laptops.

Anyway, thanks for the feedback everyone. I'll keep posting in PC tech forums and send an email/feedback to Adobe themselves.


On that page mine goes up to 10-15% and when starting a video, it goes up to 35%.

After reading around, I think here lies a possible answer - they've optimized flash for modern multi core CPUs as no one with more than one core seems to be having issues.

Some single core users are having a knightmare, probably because the priority mechanism is messed up.

Harrison
1st February 2008, 17:19
This may be a silly question but you have installed the motherboard drivers on your system? Such high CPU hits when accessing visually intensive content such as Flash is normally due to the motherboard drivers not being installed.

When they are not installed the graphics card will be running in a kind of safe mode and will not be doing any hardware acceleration at all, instead leaving this to the CPU to do it all in software.

Bloodwych
1st February 2008, 17:30
This may be a silly question but you have installed the motherboard drivers on your system? Such high CPU hits when accessing visually intensive content such as Flash is normally due to the motherboard drivers not being installed.

When they are not installed the graphics card will be running in a kind of safe mode and will not be doing any hardware acceleration at all, instead leaving this to the CPU to do it all in software.

Definitely worth a mention, but yes the motherboard drivers are installed. No other software has any issues, all very low CPU usage, just flash content.

It's not all flash content either - some animated adverts and games are well behaved, others, like YouTube's content (players, animated menu system), are just horrible!

I'm going to try going back to an earlier ghost image - I think it had a pre-flash 9 plugin - and see what kind of figures get churned out.

Bloodwych
1st February 2008, 23:31
LOL! My own home page is the worst offender with the flash embedded player! :whistle::lol:

In the following pic:

Stage 1 - Task Manager "covering" embedded player
Stage 2 - Task Manager "beside" embedded player
Stage 3 - Press play on embedded player

OMFG!!!! :shocked 100% CPU and unresponsive PC. Have to close the tab to get my CPU back!

Ok, time for that ghost image to bail me out...

Harrison
2nd February 2008, 01:30
Is definitely something up with your system setup then. I just played that video on your site and maximum CPU usage I got was about 55% as it began playing, then it stayed around 30-40%.

Stephen Coates
2nd February 2008, 06:46
That video on your site took my processor up to 100%, but still no serious slow down.

Can I highly recomend Windows Media Player or Quicktime? Or maybe even just puting a link to the video so that nothing has to load up and then people can just download the video if they want to watch it?

Teho
2nd February 2008, 11:08
Norwegian tech-news site Itavisen.no had an article recently concerning what to do if you had troubles with Flash. Or actually, it said that if you have problems with your browser crashing for no good reason it's often the Flash component that's messed up. It suggests reinstalling it, but running Adobe's own Flash uninstall tool (found here (http://download.macromedia.com/pub/flashplayer/current/uninstall_flash_player.exe)) first, which will completely remove any trace of flash from your system. Could perhaps be worth a try.

Bloodwych
2nd February 2008, 11:36
Thanks for trying. I'm going to try and sort it out now. The fact that CPU usage drops dramatically when I simply cover the embedded player onscreen with Task Manager hints at a Flash/video driver conflict or issue.

Strange issue is, it is repeatable on both an AMD desktop and Intel Laptop. Only similarity between the two is the software used.


That video on your site took my processor up to 100%, but still no serious slow down.


Mine, yours and others too! The fact is, although you still get a responsive PC, others including myself are getting a sluggish system that takes minutes to complete tasks rather than seconds.

Flash still should not be running CPU's up to 100% usage - it increases temps, reduces battery life, causes cooling fans to rev up and is straight out annoying!!! It's unacceptable behavior from something that's becoming an internet standard.

This is working against the operating systems "green" functions as well as interfering with multitasking - all while you're doing the simple task of surfing the web.


Can I highly recomend Windows Media Player or Quicktime? Or maybe even just puting a link to the video so that nothing has to load up and then people can just download the video if they want to watch it?

Thanks for the suggestions. I initially used YouTube because it's very popular and wanted a vid of ClassicWB to popup when peeps do a search on there.

Now that flash suddenly is causing this issue, I'm seriously considering following through with your suggestions. I think I'd use Xvid however, as that's a universal freeware format and I don't like exclusive commercial orientated players like Real, Quicktime or WPM.


Norwegian tech-news site Itavisen.no had an article recently concerning what to do if you had troubles with Flash. Or actually, it said that if you have problems with your browser crashing for no good reason it's often the Flash component that's messed up. It suggests reinstalling it, but running Adobe's own Flash uninstall tool (found here (http://download.macromedia.com/pub/flashplayer/current/uninstall_flash_player.exe)) first, which will completely remove any trace of flash from your system. Could perhaps be worth a try.

I'll check it out - as you said, worth a try. Thanks for the information. :)

Harrison
2nd February 2008, 12:57
If you did want to explore XVid then you can embed DivX/XVid videos into a webpage just like youtube and utilise the DivX browser plugin for playback. Just as Stage 6 does.

Bloodwych
2nd February 2008, 16:23
Thanks for the info Harrison. That's what I'll probably use - I'll get much better quality too!

I never knew about that Stage 6 site - looks interesting!

I went back to an earlier install and the issue lies with Flash 9 and Firefox 2 on these machines. Tried disabling hardware acceleration on the graphics cards and in the Flash settings to rule out a conflict, but it made no difference.

Internet Explorer with the ActiveX Flash 9 has much lower CPU utilization. 20-30% on playback, 1-3% on a paused embedded player and about 20% for animated menus. That's both on YouTube and my own ClassicWB Features page. About what you'd expect and what I was getting before recent software updates.

Nothing I can do really - YouTube needs Flash. All I can hope is that Firefox 3 and Flash will work better on these two machines, or I may have to go back to Internet Explorer - especially on the Laptop. :(

Bloodwych
3rd February 2008, 12:00
Above, I kept on mentioning how a Google search soon brings up loads of threads about this issue.

This article in particular really describes the problem in detail:

http://robertlindsay.blogspot.com/2006/07/fix-for-nasty-firefox-cpu-bug.html

....and lays the blame at the closed source Flash player, although admits Firefox has some issues itself. Since users of other browsers have reported similar issues, I tend to agree that Flash really needs to sort out its non-ActiveX plugin.

Harrison
4th February 2008, 13:23
It's a little more complex. The problem with Active-X is that the technology is Microsoft exclusive, so other browsers/platforms don't utilise it. If this reason it is normally bad coding practice to use Active-X control in flash moves to call external browser control when you want a flash file to be cross browser compatible.

As for blaming Flash because it is closed source, just imagine how quickly Macromedia, and now Adobe, would have lost their ground in the Shockwave/Flash market if they had allowed the whole code base to be open source. The made the final output format SWF open source so that other application developers could support it and make it a universal online vector format, which was a great move, but I support the decision to keep the actual Flash source code closed. Imagine if Microsoft could suddenly get their hands on the open source for Flash. It would mean the quick death of Adobe!

Bloodwych
4th February 2008, 16:44
I hear what you're saying, but the issue remains for some users and the common denominator is Flash randomly eating up CPU cycles to insane levels for relatively simple tasks, but worst of all creating a constant high load in certain situations where it should be relatively idle.

Adobe, with its closed source, should be more responsible for how their Flash product is affecting the internet, laptops and users PC's. It seems to me it works fine with IE, but not so well in other browsers. More work has to be done to improve this, but I'd imagine one side simply blames the other!

It could of course be the Flash writers themselves writing CPU hogging adverts, menus and players without optimizing. I did see a few articles on the net urging web page designers writing Flash applications to be responsible and check/optimize CPU usage.

Regardless of the issues, I'm finished with the problem. I can't do anything about it beyond report the issue to Adobe and Mozilla and hope others have done the same. If a fix comes out great, if not then I've done all I can. With the continuing rise of dual core CPUs, the problem is probably only going to get worse as Flash can hog one core without the user really knowing the difference - unless they've got a single core CPU.

Thanks everyone for the feedback!

Harrison
4th February 2008, 17:04
Badly optimised actionscript code within a flash file could definitely be a big cause of browser problems. Especially if they have coded active X controls that other browsers cannot interpret, leading to the flash file semi hanging the browser and increasing the CPU load while it tried to debug the error. Other causes could be large image and other files used in the flash files asset library.

All these are poor excuses though as Flash has always had a great optimisation system built in where you can analyse a flash file, how it loads, where the peeks and dips in loading bandwidth are, as well as many other things.

Flash Video is in itself quite a new format though, and with Adobe taking over Macromedia just after this ability was added to flash could be some more reasons for recent bugs in the format.