|
SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Profiler Multi-threading
Not having any knowledge of the Profiler code I was just wondering if there is a possibility of having it multi-threaded? The reason I ask is the slow startup. I realize there is the option to postpone the Profiler initialization to get SageTV up and running faster but then the upcoming recordings don't get populated until it is eventually run at some future time.
I notice that when Profiler is initializing a single CPU of my system is pegged until it is completed. Meaning the code runs a single blocking thread until complete. I don't believe that simply postponing this task is enough. Certainly there are other tasks that can only run once the Profiler has completed initialization but is there a reason for completely blocking startup until that point? Not just that but is it possible for the Profiler initialization code itself to be multi-threaded?
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3 Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD |
#2
|
||||
|
||||
Quote:
Regarding it blocking, you can't watch any live tv or do any recording until the scheduler is up and running, which is very dependent on carny getting done with what it's doing, so it does need to block. If you are looking to get in and watch something right away, that's exactly what the limited init flag is for.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#3
|
||||
|
||||
Quote:
|
#4
|
|||
|
|||
Not sure what changed but I used to have carny init disabled and the recording schedule was always there right away. Now since some time before I upgraded to v9 the profiler init must complete before my upcoming recordings will populate. Disabling carny init leaves it blank till it decides to run.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3 Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD |
#5
|
||||
|
||||
You want to use carny_limited_init=true to have the fast startup, which means it only calculates Favorite recordings before startup is completed and then does the Intelligent recordings in the background after that.
There's also carny_disable_init=true...which if you set that, then you'll likely have no scheduled recordings at all after startup. And yes, this code could definitely be multi-threaded...but this would only benefit startup as it already does lots of sleep calls in it to prevent using too much CPU when it's running normally. I am very much inclined to have it force carny_limited_init to be true if there are a certain number of Agents in the DB so people don't need to worry about setting that....or just do it all the time since I think it's a much bigger complaint to say "Why does it take an hour for SageTV to startup?" rather than "Why does it take hours for Intelligent recording entries to show up?". Any opinions on that?
__________________
Jeffrey Kardatzke Founder of SageTV |
#6
|
|||
|
|||
Quote:
BTW, they are actually disable_carny_init and limited_carny_init. I would have to agree with you that the limited_carny_init should be defaulted to true. People that have a problem with it can always set it to false. Probably making an Advanced option available in the STV with wording such as "Full Startup Initialization" or "Fast Startup Initialization" so users don't have to dig in the properties file and get confused about those two carny options like I did. Also, since the names of the options are in many cases such as this named after the different internal components of SageTV they aren't necessarily self explanatory to new or nontechnical users.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3 Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD |
#7
|
||||
|
||||
I see no problem with delaying full processing until after up and running. Certainly would minimize worry about really long startups, leading to people forcing close the app. Perhaps it might warrant an icon when the full processing is going on, similar to the media scan icon, to perhaps help explain to users why their intelligent recordings are all of a sudden not happening after they just restarted to update a plugin, etc.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#8
|
||||
|
||||
OK, I changed the default in the code...this will only affect new installs though since it won't override an existing setting.
__________________
Jeffrey Kardatzke Founder of SageTV |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Transcoder multi-threading working for anyone? | blade | SageTV Beta Test Software | 4 | 12-24-2008 03:40 PM |
Multi-Disc DVD Profiler Import | Brent | SageMC Custom Interface | 17 | 12-22-2008 05:54 PM |
Would Sage benefit from multi-core, multi cpu configurations? | kamikaze2112 | Hardware Support | 10 | 09-26-2008 09:13 AM |
Is SageTV set up for multi-threading? | redsuntrading | SageTV Software | 3 | 10-11-2007 11:42 AM |
XP Patch: A Crash Occurs In Ks.sys On PC's With Intel Hyper-Threading CPU | Mark Lamutt | Hardware Support | 1 | 08-11-2003 12:06 AM |