SageTV Community  

Go Back   SageTV Community > Hardware Support > Hardware Support
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

Hardware Support Discussions related to using various hardware setups with SageTV products. Anything relating to capture cards, remotes, infrared receivers/transmitters, system compatibility or other hardware related problems or suggestions should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-27-2011, 12:42 PM
Greg Greg is offline
Sage Advanced User
 
Join Date: Jan 2009
Posts: 154
How Are Multiple CPU Cores Utilized?

I'm trying to understand how multiple CPU cores are utilized during transcoding or in other CPU intensive operations.

- Comskip: uses one core per operation, as far as I know.

- Web browsing: I read an article where even web browsing, especially with multiple open tabs are utilizing multiple cores.......even four.

- Transcoding: I believe that transcoding on-the-fly can utilize multiple cores per event. For example: transcoding a ripped DVD or a Play-On stream. But what happens if you have two independent streams going, say streaming two movies simultaneously that require transcoding. In a quad core CPU is one movie stream handled by one set of cores and the other stream handled by the other set? Is this automatically done or does the user have to select how the cores are utilized? If a dual core CPU is used is each stream directed to its own core or are both streams multiplexed or shared across both cores?

Part of this understanding is to aid in selecting an appropriate CPU: dual vs quad core. So, basically an Intel i3 or i5 vs an AMD X4 decision. I'm not sure if a fast dual core (3.0 GHz) vs a slower quad core (2.6 GHz) is the better choice.

Any help understanding this would be greatly appreciated.

Thanks,
Greg
Reply With Quote
  #2  
Old 11-27-2011, 02:05 PM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Programs don't use cores they use threads - definition here on wikipedia. Read that in particular the multi threading section and see if it answers any of your questions.

At the application level an application just tells the OS about each thread it wants to execute and lets the OS decide how (priority) and where (which core) to execute them. User's normally do not need to change anything and are quite often not allowed to change anything. Apps can appear to be single threaded and still be multi threaded if most of the work is done on a single thread. This may be how comskip works but you would have to ask the author of comskip to find out for sure.

As to transcoding if you transcode multiple streams each stream will be requesting threads from the OS and it will try to execute them according to its schedule and how the thread was requested. This may mean that each transcoding process gets a separate core but it may not they may actually SHARE cores as the OS could swap them in and out as needed.

As to which processor - faster dual core or slower quad - is better: if the app is a single threaded app or one that does most of the work on a single thread then the faster dual core would be better. If would be able to finish the single thread quicker. However if the app is multi threaded and splits the execution up more equally between its threads than the quad core would be better because it would actually be able to complete all threads faster than the dual core.

That is how I understand all of this. Multi threading is a new concept to this old COBOL programmer where my programs are single threaded.

Did that help?
Reply With Quote
  #3  
Old 11-28-2011, 01:48 AM
Greg Greg is offline
Sage Advanced User
 
Join Date: Jan 2009
Posts: 154
Quote:
Originally Posted by BobPhoenix View Post
Did that help?
It did help to a degree.........that link is pretty deep!

What I got out of it is that the user most likely will have no control over this, as it depends on the schedule...........which is fine by me. Other research indicates that transcoding generally uses multiple cores.

Just did some quick searching and it does appear that you can select how many cores to use (both physical and logical) on some transcoders......FFmpeg is one of these.

I guess if I can't make my mind up just get a fast quad core. Power usage would then go up.

Thanks,
Greg
Reply With Quote
  #4  
Old 11-28-2011, 06:01 AM
Skybolt's Avatar
Skybolt Skybolt is offline
Sage Icon
 
Join Date: Aug 2006
Location: Annapolis, MD
Posts: 1,027
You can, from the Processes tab in task manager, set what process uses how many and which core(s) are used. Right click on a process and select "Set Affinity" and you can select what or how many cores are used for that process. Using "Set Priority" will raise or lower that process's priority handleing - note that if changed from task manager that chane is only for the life of the process and will be defaulted on a restart of the process.

Although if you look at the defaults for most of Sages processes, you will see that the OS has assigned all four CPU's to the process, for the most part the OS handles the CPU assignment and Process priority, unless it has been changed by the programmer in code.

I use an older Q9400 2.6 series quad core, which supports six clients and they can all watch DVD's from the hard drive with surround sound and the CPU(s) utilizaion rarely hits 60% on that test. I used HD300's and two PC clients for that test. If your clients are PC based you will get even better performance. My point is depending how many clients you are using at once, you could most likely use a 525 Atom based board without an issue (not saying you should), if it were dedicated to SageTv as a service. Especially if you are using PC clients.

Last edited by Skybolt; 11-30-2011 at 09:04 AM. Reason: typo's
Reply With Quote
  #5  
Old 11-30-2011, 01:50 AM
Greg Greg is offline
Sage Advanced User
 
Join Date: Jan 2009
Posts: 154
Skybolt,

Good to know.........thanks for the info. Sounds like more cores is the better choice.

Thanks again,
Greg
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SageTV & Threads ( Using multiple Cores ) joe123 SageTV Software 30 05-04-2010 10:22 PM
Segregation of CPU Cores for Sage and Comskip personalt Hardware Support 4 03-12-2010 04:01 PM
Clocks v Cores gilded07 Hardware Support 17 11-05-2009 09:43 AM
Transcoding with multiple cores simonen SageTV Software 3 10-12-2009 09:20 PM
Multiple tuners, multiple playbacks in Video Dist. System Red Baron SageTV Software 3 04-27-2005 06:39 AM


All times are GMT -6. The time now is 11:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.