Comskip on a quad core CPU

To discuss the tuning of comskip and for posting your ini files
abbott_m
Posts: 1
Joined: Sat Oct 18, 2008 3:49 pm

Comskip on a quad core CPU

Post by abbott_m »

I'm running the H.264 code on some .TS streams generated from an HD-PVR and it looks to be detecting nicely (first test though) so my only questions is, I bought up task manager and comskip seems to only be using 2 of the 4 cores available (cpu on 2 of them is around 60% and on the other 2 it's very low (around 10%). Is there some options I need to turn on for it to use the other 2 cores?

Mike
erik
Site Admin
Posts: 3365
Joined: Sun Aug 21, 2005 3:49 pm

Re: Comskip on a quad core CPU

Post by erik »

Due to some strange problem the multi processing decoding does not work, or better stated, sometimes it works.
This causes comskip to effectively utilize only one core at a time so the total load is at most 25% of the 4 cores
I have no clue how to solve this.
nickb937
Posts: 4
Joined: Thu Oct 20, 2011 1:22 pm

Re: Comskip on a quad core CPU

Post by nickb937 »

It's probably easier to just run several comskip jobs simultaneously i.e. run 4 or 5 of them if you've a quad core CPU. You will likely process a number of files in parallel faster than you would if comskip had better multithreading support.
marvin-miller
Posts: 114
Joined: Wed Nov 02, 2011 3:43 am

Re: Comskip on a quad core CPU

Post by marvin-miller »

I did a test scan using DVRMSToolbox (the GUI) and you can can choose the process priority of the scan. I set to to high and it used about 75% of the processor - which is something I'm more then OK with.

I'm finding it's pretty slow on HD shows (1920x1080 H.264) in a .wtv container

Is there any way to increase the process priority? Maybe through comskip.ini ?
erik
Site Admin
Posts: 3365
Joined: Sun Aug 21, 2005 3:49 pm

Re: Comskip on a quad core CPU

Post by erik »

Did you try the new setting

thread_count=2

telling comskip to use 2 threads, or when processing HD

thread_count=4

That should load 4 threads and run 2 times faster then

thread_count=1
marvin-miller
Posts: 114
Joined: Wed Nov 02, 2011 3:43 am

Re: Comskip on a quad core CPU

Post by marvin-miller »

I did - I set it to 4 right after installing the latest contributor build. What I found though is that CPU usage only hit 25%.

I have a dual-core CPU that's got HyperThreading so it task manager shows 4. Two Logical CPU's and two for the hyperthreading. If memory serves only one of the 4 showed real activity and one of showed some.

By increasing the process priority through DVRMS Toolbox I can get the CPU usage to about 75% or so. I don't know if it's possible for you to add a process priority parameter to the compskip.ini file but if so, I think it would be a handy way to tweak it.

In the meantime I've set DVRMS Toolbox to use three threads instead of one (as a workaround) so that it loads up the CPU more. Even so, with that set to process three shows at once, and with threadcount set to 4 in comskip.ini I still only get 50% CPU usage.

http://www.askvg.com/how-to-permanently ... k-manager/
seems to have some interesting info on processor priority. Come to think of it, I can also just adjust a setting in DVRMS Toolbox so that it always runs under a higher priority.

I don't know if it's 'normal' or not but what I'm seeing in processing time for x264 HD files is that it seems to take half of the show length to process the file. ie. 60 minute show = 30 minute scan. 4 hour show = 2 hour scan.
Last edited by marvin-miller on Mon Dec 05, 2011 10:24 pm, edited 1 time in total.
erik
Site Admin
Posts: 3365
Joined: Sun Aug 21, 2005 3:49 pm

Re: Comskip on a quad core CPU

Post by erik »

With an i5 (2 cores, each 2 threads) and
thread_count=2
I can load 50%
with
thread_count=4
I can load 100%

Please be aware that windows 7 does some tricks to dynamically lower priority of processes that fully load a CPU.
Comskip does not do any process priority setting.
marvin-miller
Posts: 114
Joined: Wed Nov 02, 2011 3:43 am

Re: Comskip on a quad core CPU

Post by marvin-miller »

Wow - is that processing one show or more then one?

With thread_count set at 4 I get 25% CPU load max. That's with an i3-540 on Windows 7 x64
I thought I would try it by dragging a file onto comskipGUI (taking everything else out of the equation) and I get the same thing, 25-29% processor usage.

This is not a big deal though, I just wanted to report my findings :-)
erik
Site Admin
Posts: 3365
Joined: Sun Aug 21, 2005 3:49 pm

Re: Comskip on a quad core CPU

Post by erik »

That is when processing one show.
Can you set
verbose=10
and check in the log file that the thread_count setting indeed hes been set to bigger then 1?
marvin-miller
Posts: 114
Joined: Wed Nov 02, 2011 3:43 am

Re: Comskip on a quad core CPU

Post by marvin-miller »

I'm afraid so;

[CPU Load Reduction]
thread_count=4
play_nice_start=-1
play_nice_end=-1
play_nice_sleep=10
erik
Site Admin
Posts: 3365
Joined: Sun Aug 21, 2005 3:49 pm

Re: Comskip on a quad core CPU

Post by erik »

Multi threaded decoding seems to be broken again on h.264
Still works very well on mpeg2 video
erik
Site Admin
Posts: 3365
Joined: Sun Aug 21, 2005 3:49 pm

Re: Comskip on a quad core CPU

Post by erik »

Just released build 0.81.020
Does seem to use multiple threads with h.264 on my i5.
Default setting is
thread_count=2
Can you test?
marvin-miller
Posts: 114
Joined: Wed Nov 02, 2011 3:43 am

Re: Comskip on a quad core CPU

Post by marvin-miller »

Sure can - I'll be back with info in a couple of hours!
marvin-miller
Posts: 114
Joined: Wed Nov 02, 2011 3:43 am

Re: Comskip on a quad core CPU

Post by marvin-miller »

BTW, can I keep my existing comskip.ini or does it have to be replaced too?

Edit: Checking the new comskip.ini I can't seem to find parameter;
logo_shrink_tail=0

Nevertheless, I added it to my existing comskip.ini - hopefully that's right
erik
Site Admin
Posts: 3365
Joined: Sun Aug 21, 2005 3:49 pm

Re: Comskip on a quad core CPU

Post by erik »

No need to add if you do not need.
Setting verbose=10 will list ALL settable parameters in the log file.
Maybe I quoted wrongly
Post Reply