wz_mini_hacks icon indicating copy to clipboard operation
wz_mini_hacks copied to clipboard

High CPU usage in self hosted mode

Open sandstormkeshav opened this issue 2 years ago • 8 comments

When running the v3 in self hosted mode, I see iCamera.patched using 93% of the CPU. When I was not in self hosted mode, it was about 30%. Is there a reason for the greater usage or is this a bug?

sandstormkeshav avatar Oct 27 '22 06:10 sandstormkeshav

Same problem on my V3 cam with this mode

baudev avatar Oct 27 '22 07:10 baudev

Yes, I notice this issue too. I haven't been able to quite work the cause, but I suspect my no-ops are causing one of the threads in iCamera to go into a tight loop until something times out.

The CPU usage does seem to taper down after a few minutes past the initial boot phase and it becomes stable after that. Does it for you?

kohrar avatar Oct 27 '22 16:10 kohrar

Yes, I notice this issue too. I haven't been able to quite work the cause, but I suspect my no-ops are causing one of the threads in iCamera to go into a tight loop until something times out.

The CPU usage does seem to taper down after a few minutes past the initial boot phase and it becomes stable after that. Does it for you?

Even after about 15 minutes of uptime I am still seeing about 90% CPU usage EDIT: Actually after about 20 minutes, it drops to 40%!

sandstormkeshav avatar Oct 27 '22 21:10 sandstormkeshav

Yes, 20 minutes after I've 33%! Seems widely acceptable, thanks

baudev avatar Oct 27 '22 22:10 baudev

Thanks for the reports @sandstormkeshav and @baudev. That seems to be in line with what I'm experiencing too.

I'll see what I can do about the iCamera patch to address this when I have some free time.

kohrar avatar Oct 27 '22 22:10 kohrar

I've noticed that the RTSP stream is a little jumpy in self hosted mode, moving in 2 seconds chunks mostly. I wonder if this is the issue.

I've moved out of self hosted mode for now as these cameras are recording so 2 seconds jumps is not wanted.

I'd be interesting to see if anyone else has seen this in relation to the above issue?

Rustymage avatar Dec 23 '22 08:12 Rustymage

Could you be more precise ? What do you mean by "2sec chunks" ?

I'm currently using one V3 in self host mode and I've no RTSP problem

baudev avatar Dec 23 '22 08:12 baudev

the time stamp will go 1, 2, 4, 6, 7, 8, 10... It's random but within a 10 second period of time, you might loose 3-4 seconds on the timestamp.

You can see tis visually too with skipping frames if there's obvious movement, otherwise it's hard to spot.

Removing self hosted mode resolves this. The timestamp is inserted by the camera and not from the recording device in case that matters.

Video is of issue.

https://user-images.githubusercontent.com/19926955/209306014-cebeead3-8d43-4d4e-bb1f-6036bb95d0db.MOV

Rustymage avatar Dec 23 '22 09:12 Rustymage