Close

More Cores = More Cameras. What about Virtual Cores?

Share tips and tricks related to Sighthound Video or your full security setup.

Moderator: Staff

no avatar
classicshotokan
 
Posts: 25
Joined: Tue Dec 21, 2010 12:52 pm
Location: Portland, Maine

More Cores = More Cameras. What about Virtual Cores?

by classicshotokan » Sat Sep 10, 2011 11:04 am

Apple offers the Intel i7 chip as an option. This chip has 4 physical cores (same as i5 chip) but runs software that creates 8 virtual cores. This is Apple's description of the technology:

Hyper-Threading (Intel Core i7 only) — a technology that allows two threads to run simultaneously on each core. So a quad-core iMac has eight virtual cores, all of which are recognized by Mac OS X. This enables the processor to deliver faster performance by spreading tasks more evenly across a greater number of cores.

Does anyone have any experience with this?
Does it allow you to run more cameras?

User avatar
Semper Vaporo
 
Posts: 331
Joined: Sat Oct 09, 2010 11:51 am

Re: More Cores = More Cameras. What about Virtual Cores?

by Semper Vaporo » Tue Sep 13, 2011 1:08 pm

I think that you will find that question is almost impossible to answer directly... No simple YES, or NO. Way too many "Depends" get involved.

To really explain it I would need to explain what is going on inside the silicon chip in great detail and this forum is not the place to write a textbook!

There is some possibility that two threads could be run "simultaneously" in one core such that they do not interfere with each other's timing. But it "depends" on what those threads are doing and how long each instruction actually takes to be completed in the arithmetic and logic processor of the single core. "IF" and that is a BIG "IF", the instructions of each thread can be executed in the time frame necessary to get the next instruction of the other thread ready to be executed, then they will appear to run "simultaneously", each sharing the arithmetic/logic circuitry alternately, and will execute in the same length of time as one process would on a single thread core.

But not all computer instructions take the exact same length of time, so one thread may take extra time to get the result through the arithmetic/logic circuitry, thus slowing the execution time of the other thread. And here comes that Depends again... it depends on what each thread is doing.

Video processing is lots and lots of "busy work" for a processor... Sum all the values of a certain area of the image, take the average, if the average is "too high" then subtract some value from the value of each pixel in the image to drag the average back to some acceptable level, subtract each pixel value in one image from the corresponding value of another image and then test each result for a value that is outside of some "noise" level to see what changed from one image to the next. Compare each pixel value from one difference set to the next difference to see if those changes have moved in the area being inspected. MATH, MATH, MATH, the arithmetic processor is very busy.

If the processes are written to handle the images one pixel at a time, then the timing of the instructions could be very uniform, but the process would be VERY SLOW when working with large images. Video processing is very common in today's computers, so the hardware has been optimized to do multiple value processing within the hardware (not in a serial software process). The hardware can average the values using ONE instruction, which is fast, but takes a variable length of time, based on how large the image is. Same for subracting one image from an other to detect differences. And those video processing instructions may not be occurring in the "core" of the main processor, but rather have been off-loaded to a "Video Processor" and the program in the "Core" is just twiddling it's thumbs waiting for the answer. If there is only one Video Processor, then both threads in the one Core are being slowed waiting for the Video Processor to finish the work of the other one.

Unless someone has already tried to run VDV on a quad-core, dual threading computer, and can report on their experience, then I bet YOU get to be the expert on how well it works... at least how well it works on YOUR particular hardware (how good is YOUR video processor), using YOUR particular cameras (are they noisy?), at YOUR particular resolutions (HD or CGA), viewing YOUR particular scenes at whatever lighting conditions and particular motions are in process at the time.

MY best guess, based on my somewhat foggy understanding of dual threading would be that if one core can run 2 cameras comfortably, then a dual threading core could run more than 2, but probably not 4 cameras, comfortably, over a day with average cameras, with average complexity scenes.... Maybe!

I used to use a triple-core laptop PC for VDV with 4 cameras and found that laptops are just not really designed for 24/7 operation and it got sick from the heat it generated itself. Fine computer for a few hours per day of web surfin', programming, Text processing and spreadsheets (or playing solitaire), but not hot and heavy video processing all day, every day.

I now have a quad core tower and notice a definite difference in operation. Not all good. With the 3-core I noted (with Task Manager's Performance tab) that the 3 cores seemed to handle the 4 cameras and the Windows overhead (Kernal time) operation about equally, each showing about 30% to 50% usage. With the quad-core, I see that the 4th core seems to run at 50% most of the time and half of that is Windows' overhead. The other 3 are still 20 to 40% usage... Cores 1 and 3 always being slightly higher than core 2. Cores 1, 2, and 3 show very little of the Kernal time except about every 5 minutes when all the processors show a 4 or 5 second jump to about 75% usage (kernal time being about half of that in each core). I think the video processor of the tower is not as good as the one in the laptop (the "Windows Experience Index" [a new Win-7 feature] shows 4.4 for the laptop video processor and only 3.9 for the new tower PC), so I am considering getting a more powerful video card... maybe something optimized for games would be better (given that games are often very video intensive).
Semper Vaporo,

no avatar
alistair
 
Posts: 12
Joined: Tue Sep 13, 2011 4:32 pm

Re: More Cores = More Cameras. What about Virtual Cores?

by alistair » Tue Sep 13, 2011 4:35 pm

I'm running VDV on a late model i7 Mac Mini Server.

The server is also tasked with running Asterisk (VoIP server) for the phones in my home, Indigo (Home Automation), iTunes services, and a few other backend services.

VDV is running against four Vivotek IP7361 cameras at its maximum resolution (1280x1024) and while the fan on the mini does like to ramp up, average CPU load over all CPUs sits at around 50%.

YMMV, but I'd guess I have capacity for another 3, possibly four, cameras if I needed them.

-Alistair

no avatar
classicshotokan
 
Posts: 25
Joined: Tue Dec 21, 2010 12:52 pm
Location: Portland, Maine

Re: More Cores = More Cameras. What about Virtual Cores?

by classicshotokan » Tue Sep 13, 2011 5:20 pm

I'm currently running 5 cameras routinely on a dedicated one year old duel core mac mini, with room to add at least one more.

I guess a quad core mac will handle a dozen cameras.


Return to General Discussion