Reducing CPU usage when viewing Milestone via web or mobile clients

Would you rather reduce resolution of live feeds, or reduce frame rates?

  • Reduce frame rate from camera

    Votes: 0 0.0%
  • Reduce resolution of live feed (view subtream)

    Votes: 3 100.0%
  • Both

    Votes: 0 0.0%
  • Neither (or "other" - please reply to thread with what you do!)

    Votes: 0 0.0%

  • Total voters
    3

AveryFreeman

Getting the hang of it
Joined
Jan 24, 2019
Messages
122
Reaction score
50
Location
Near Seattle
Someone asked me a question via message, and I wanted to post response in forum in case other people could benefit from it

I've noticed large CPU use when viewing all feeds via mobile client (or web). This member was asking me about it, and we discuss what we've done to ameliorate the problems.

If you also have something you do to help with the massive CPU usage of viewing the feeds, please let us know!

Hi,

I ran across your reply below regarding Milestone Essentials+. Have a few questions, would appreciate it if you can help me with.

Are you recording 24/7 or only with motion?
24x7

I'm running about 7 cameras, also on ESXi with 4CPU and 12G RAM. My video os recorder service process is constantly around 20% cpu.
I'm running 4vcpu and 8gig ram
6 cameras (three 4MP @ 30 FPS, one 5MP @ 20 FPS and two 8MP @ 15 FPS)
on server 2019 standard (1809)
2 rdm disks - used to be mapped SATA with vmkfstools -z, but now they're proper SAS LUNs from a SmartHBA
crap disks, old WD greens set never to spin down with WDIDLE.EXE (they're like 10 years old, they'll last if you don't let them park)

I thought I'd test it since I haven't really looked in months, looks like I get up to 21% CPU utilization watching 6 substream live-streams at the FPS I mentioned (or higher - I tend to do whatever the highest frame rate possible up to 30FPS on the substreams, they usually go higher than the main feeds).

Once I connect a mobile connection that will boost total system CPU up to close to 100% depending if I have all 7 cameras displaying on my phone or not (this is just a temp default initial connection view, as you can't possible look at 8 at once on phone, but you get the point).
I've done a bunch of research into this on Milestone and Blue Iris - without a GPU (iGPU surprisingly best) on Milestone (more tha BI) you'll end up pegging out your CPU (or vCPU in this case) trying to act like a GPU.

I set up Milestone for a couple friends on i3-4150s and was monitoring their usage with GPU-Z and it goes bonkers when the mobile cient hits. That's even without any transcoding (Which generally makes it worse - there's some balance between GPU and CPU but hasn't been a decent trade-off in my experience).

You can get a GPU and pass it through to your VM, I did it with a Quadro P400 for a while, but ended up running into all sorts of other weird compatibility issues - it would do odd, unexplainable stuff that I couldn't seem to fix. I can't remember exactly what, but I decided after a few days it wasn't worth it and removed the P400 and called it a day.

If you're running ESXi on a desktop, I'd recommend trying to pass the iGPU through, that might work better. Also, I am on 7.0 - 6.7 or below seems to work better with iGPU passthrough (if you're on 6.7 and it's important to you, I don't recommend upgrading, it's not worth it).

Did you had to change or optimize any settings within the smart client manager? My set up is mostly stock and would love to optimize before throwing another 4vcpu at it.
I use substreams exclusively for live views on any client (PC, mobile, web, etc.) - you go to the record server and in each camera settings menu you can add the substream and tell which one you want to use for record or playback. That'll get the CPU usage down to levels that are manageable.

I noticed you said you set all 3 streams from the cameras - I haven't ever needed more than 2 streams from the cameras, but I guess there's 3 from many cameras in case you have a particular use case, I just personally haven't thought of any (maybe if you have a super slow phone and want to run the live streams in QCIF, or something?). But keep in mind, each additional stream takes up additional resources.

Some current settings:

Under each camera's settings, video stream1/2/3 i left the frame rate at default of 25 and bit rate of 4096/1024/1024

Under record: set at 5 frames per second.

Any suggestions for Mobile server settings to keep the cpu down with a fair trade off for quality/performance?
This is all a matter of preference, really. I don't see anything wrong with that, per se - I just personally don't know why you'd send the record server anything from the camera that the record server wouldn't record.

I'd personally go the opposite route. Set it to record more frames, that way you'll be more likely to get a frame that provides a positive face ID or license plate number. If you've ever tried to ID something you'll see it can make a big difference. You don't have to view them all if they're in a recording, you can skip over as much as you like, but they'll be there in case you actually need them.

When looking at recordings I'm generally only looking at one camera at a time, so I thought as long as my live views are substreams and recordings are full quality it won't overload the client or VM, no matter what FPS I record the video at (within reason, of course). And then I have my 30FPS@4MP shots (e.g.) stored away in the event that I need them for "research".

That's one thing I really like about Milestone - it handles "higher" framerates really well compared to other VMS (try zoneminder sometime and tell me what you think ;). I haven't ever had to feel like I need to tone down the FPS, just resolution when I'm usually viewing 6 streams at once (live view).

Hope that helps! Feel free to quibble with any of my logic, I never claim to know everything.
 
Top