CPU load

Report and discuss bugs here!
Post Reply
Helge
Posts: 54
Joined: Mon Oct 17, 2005 4:34 pm

CPU load

Post by Helge »

SORRY - mixed up between CPU and memory in use in this post. I have corrected the text now to CPU wich is correct.

Not sure this is a bug, but it still bothers me :( (running v0.3.0)

In two of my webcam PC's, Yawcam seem to lock up a large part of the CPU resources - most of it actually. In one of my PCs (an old 933 MHz Pentium 3 w/1 GB RAM), "System Idle - System" shows up in the top of the list when I sort by CPU in Task manager... so this is clearly not a problem in all PCs. In the two other PCs (one is a 2,2 GHz P4 w/ 1 GB RAM) "System - System" (seems to be related to Yawcam!) is in the top of the list using approx 70 to above 90 % of CPU resources. When I close Yawcam a lot of CPU resources is free (approx 75 % free). When I start Yawcam again the same thing happens - Approx all CPU resources are in use and a lot of this is used by "System"?

What puzzels me a bit is that even though the large amount of CPU resources used clearly is related to running Yawcam and free by closing Yawcam it is not yawcam but "system" that is reported using that much CPU in Task manager.

How may I solve this problem?

Image
The graph show the drop in used CPU resources by closing yawcam. Yawcam have in this case previously been running for approx 30 minutes. The rise in CPU resources in use a few moments later is related to starting Yawcam again.

I am only using the FTP of Yamcam (HTTP, stream etc is not used and not startet). FTP upload schedule is 10 minues in one of the PC's where Yawcam is using a lot of CPU and 30 minutes in the two others. All cameraes is set to 640X480 pixels (image chip resolution). The type of camera does not seem to matter.
Helge
Posts: 54
Joined: Mon Oct 17, 2005 4:34 pm

Post by Helge »

I have spent some more time trying to find out why Yawcam use so much CPU resources on two of my computers and not on the third computer running Yawcam - no success. There are at least two things that puzzles me:

1. It does not clearly seem to be related to the CPU speed of the PC or the amount of RAM. All the PC's have 1 GB RAM and it is the fastest 2,2 GHz P4 and the slowest 733 MHz P3 where close to all CPU resources are in use when Yawcam is running (96 - 100 %). When Yawcam is not running, only approx 25 % of CPU is in use on these two PC's. The third PC where the CPU load running Yawcam is varying between 50 % and 80 % is an old 933 MHz P3.

2. On the two PC's where the approx 100% CPU load is clearly related to running Yawcam or not. However, in Task manager it is still system and not Yawcam that is reported as the process that uses that much CPU resources? But when.... exactly yawcam is closes all this CPU resources are not used by "system" anymore?


Are really Yawcam "supposed" to use/lock up that much percentage of a 2,2 GHz P4 CPU resources as shown by the graph in my previous post? In fact running Windows XP SP2 itself and a weatherstation software that post weather data to web by FTP do not load the CPU more than shown in the graph above when CPU load is approx. 25 %. Running Yawcam grabs all the remaining 75 %........ :shock:
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

Have you tried switching cameras between the computers? Some camera drivers uses more CPU than others.
The native communication with the driver of the webcam is reported in the System process in the task manager. So different drivers will affect the percentage reported here in different grades.
Also, closing the preview window can help to reduce the CPU load.

There might be some things I can do to reduce the cpu load when the ftp output is used. I'm looking in to that right now...

/malun
Helge
Posts: 54
Joined: Mon Oct 17, 2005 4:34 pm

Post by Helge »

Thanks for your input. I do not use the preview window except for short time adjusting of webcams after power outages. Then I connect by Windows XP Remote Desktop and fine adjust the two Creative Live Motion cameraes.

The next time I am in the vacations house I will follow up your hint about checking CPU load dependent on the type of webcam. Based on my last tests (during Christmas) I got the impression that the type of webcam did not matter, but I will check again.
Helge
Posts: 54
Joined: Mon Oct 17, 2005 4:34 pm

Post by Helge »

malun wrote:Some camera drivers uses more CPU than others.
The native communication with the driver of the webcam is reported in the System process in the task manager. So different drivers will affect the percentage reported here in different grades.
Spent a few minutes on investigating this issue again. Logged on to my "main computer" in my vacation house by WinXPpro Remote Desktop and checked Task manager for CPU load. Yawcam had been running for days using ONLY FTP . I use image array so Yawcam also rename the 47 previous pictures on the server at every upload. I have set the time interval in Yawcam to 600 sec so a new image is uploaded every 10 minutes. This do however leave many minutes pause in between the upload intervals where I expected that Yawcam did not need "this huge" amount of CPU load.

I wanted to follow up your thought about the camera driver being a possible cause for CPU load Malun. But since I am currently 400 km away from my vacation house it is difficult to swap cameraes between the PC's :wink: I did however think of another solution to check if it is Yawcam or the camera driver. Shutting down Yawcam and starting the webcam software that came with the camera. This is a Creative Live Motion camera so it is Creative Webcam Center that is installed together with Yawcam on this PC. As the screen dump of Task Manager show (I put in the red explaining text) the CPU load is hitting the roof with Yawcam running. Closing Yawcam, the CPU load drops to approx 20 % (The XP OS, and a weather station software running). Starting Creative Webcam Center the CPU load shortly rise approx 80% during loading the software but soon drops to alomost the same level as without any webcam software running. I guess this indicates that it is NOT the camera driver that causes such high CPU load, rather the Yawcam software? Unfortunately the Creative webcam software do not have the nice image array functionality of your Yawcam :cry:
Image


malun wrote:Also, closing the preview window can help to reduce the CPU load.
I only use the preview window shortly when I need to adjust the position of the Live Motion Cameraes (pan&tilt). I never leave the preview window on.
BlueKnight84
Posts: 3
Joined: Fri Jun 06, 2008 8:48 pm

Post by BlueKnight84 »

I'm thinking it has more to do with Java.

Maybe we should focus our attention to that.
Helge
Posts: 54
Joined: Mon Oct 17, 2005 4:34 pm

Post by Helge »

BlueKnight84 wrote:I'm thinking it has more to do with Java.
If that is the case it must mean that a webcam software based on java in general or Yawcam in particular is more heavy on the CPU load than webcam softwares that are not based on Java?
kwikone
Posts: 17
Joined: Thu Jul 20, 2006 5:40 pm

Post by kwikone »

BlueKnight84 wrote:I'm thinking it has more to do with Java.

Maybe we should focus our attention to that.
What I found was that when going from a 1 CPU to a 2 CPU the amount of CPU being taken up by the Java threads was upwards by as much as 3 - 4 times as much. ie: 1 CPU 900 mhz java taking about 15%; 2 CPU 1.8 Ghz java taking 37%. (This was with Java 6 update 3). Setting the affinity of java to a single processor dropped the usage to about 17%.

However, after updating to update level 5 it now is between 15 - 20% with the normal affinity (both processors).

To me that is a sure indication of something within Java doing this.
kwikone
Posts: 17
Joined: Thu Jul 20, 2006 5:40 pm

Post by kwikone »

Helge wrote:If that is the case it must mean that a webcam software based on java in general or Yawcam in particular is more heavy on the CPU load than webcam softwares that are not based on Java?
Actually, it is true of *any* java application versus native compiled applications.
mkn
Posts: 1
Joined: Sat Jul 04, 2009 9:23 pm

Post by mkn »

kwikone wrote: Actually, it is true of *any* java application versus native compiled applications.
And this is *actually* complete rubbish. I have written software in C/C#, PHP, Perl, VB, Pascal, Java and others for more than 25 years now and I *know* Java performs the way any other application does. There are quite a very well performing few examples used by many of us, say, Azureus/Vuze or Eclipse, for instance. More examples will be provided if needed.

Please learn some Java (or at least check the facts) instead of making an even bigger fool of yourself. And I am not alone, the performance myth has been trashed almost ten years ago. Bad programmers make bad/slow software in any language.

BTW; I noticed the same thing: Yawcam hogs the CPU and is practically unusable at its current state. Any news about this one?
amberika
Posts: 1
Joined: Fri Dec 11, 2009 1:12 pm

Post by amberika »

How do I connect my new cpu to my cable modem? I have a cable modem. I bought a new laptop and when I plug the cable into my new cpu it does not recognize the internet connection. What do I need to do to connect my new laptop to my cable modem? Thanks!
_______________________
yahoo keyword tool ~ overture ~ traffic estimator ~ adwords traffic estimator
Last edited by amberika on Tue Dec 15, 2009 10:01 am, edited 1 time in total.
vattz
Posts: 11
Joined: Sat Dec 12, 2009 10:11 pm

Post by vattz »

EDIT: ya i use 0.3!

Hi, i mailed yawcam devel 2 times (today it was 2nd :D), he might check his email... whatever...
i have old intel single cored box with usb & lan, onboard graphics 8mb etc... and however, proc is 1300mhz and systemm+java's process use 99% of it, but only when i enable motion sensor - nothing else, JPG; FTP, HTTP or streaming doesn't do that - ideas for making this problem gone? box will be with-3-cables-only - power, usb to webcam and LAN cable ^_^ - vnc controlled... and it rly messes up when it blocks fully to CPU... also, i like yawcam very much :D


edit2: not to spam your forum, i ask here - SMTP on gmail fails. what about POP/IMAP mailing @ movement @ motion sensor?
vattz
Posts: 11
Joined: Sat Dec 12, 2009 10:11 pm

Post by vattz »

vattz wrote:EDIT: ya i use 0.3!

Hi, i mailed yawcam devel 2 times (today it was 2nd :D), he might check his email... whatever...
i have old intel single cored box with usb & lan, onboard graphics 8mb etc... and however, proc is 1300mhz and systemm+java's process use 99% of it, but only when i enable motion sensor - nothing else, JPG; FTP, HTTP or streaming doesn't do that - ideas for making this problem gone? box will be with-3-cables-only - power, usb to webcam and LAN cable ^_^ - vnc controlled... and it rly messes up when it blocks fully to CPU... also, i like yawcam very much :D


edit2: not to spam your forum, i ask here - SMTP on gmail fails. what about POP/IMAP mailing @ movement @ motion sensor?

@edit2: i fixed the SMTP fail
@msg:
If i start up my comp, yawcam starts as i setted it - @ startup. But, not motion detector and not streaming is enabled, but computer is still stucking around (high CPU usage), then i have to enable and redisable streaming AND motion, and then it works proper. i think it's that box's fault, because on mine it doesn't spam up cpu to 100%... kinda NEVER... :S
i think i'm gonna abuse my fail server and take out couple of 256mb ram slots... i'll see what happens with more ram. (-*hopes he doesn't break anything*-)
Post Reply