[Bug] Tvservice cpu usage increase problem while .ts playback fullscreen (1 Viewer)

SciDoctor

Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    The jpg's below show the problem, logs also attached.

    This is repeatable and consistant, the dramatic cpu increase of tvservice isn't a peak that subsides but is constantly high.

    A cpu increase from 1-4% to 20-30% for tvservice shows something is wrong. this doesn't occur in 1.2alpha or 1.1.3.

    When playing back a .ts recording the tvservice cpu usage increases substantialy when in fullscreen compared to not fullscreen, the difference is upto 25-30%.

    Capture - Capture 3 show usage while timeshifting only and also recording playback only.

    Capture 4 is the greatest increase, recording and also playing back a different file tvservice cpu usage was hitting nearly 40%, the jpg shows a lower cpu usage as the snip tool caused the decrease as 100cpu usage was now on the system.

    In all the above cases the epg grab was allowed to finish so as not to skew the results.

    A quick look through the logs and I couldn't see anything that could be causing this.
     

    Attachments

    • Capture.JPG
      Capture.JPG
      76.7 KB
    • Capture1.JPG
      Capture1.JPG
      77.5 KB
    • Capture2.JPG
      Capture2.JPG
      80.4 KB
    • Capture3.JPG
      Capture3.JPG
      73.1 KB
    • Capture4.JPG
      Capture4.JPG
      74.2 KB

    tompa

    MP Donator
  • Premium Supporter
  • October 3, 2005
    665
    34
    Stockholm
    Home Country
    Sweden Sweden
    I can confirm this on my setup too.

    Talked to gibman about this a couple months ago and we could not figure out what the problem was, but we never really digged in to it ...

    /tompa
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    maybe the tvplugin's "TVfullscreen class" does a lot of polling the remoting layer of the tvservice.

    should be fairly easy to see if you could attach a cpu/performance profiler to tvservice.exe process.

    /gibman
     

    tompa

    MP Donator
  • Premium Supporter
  • October 3, 2005
    665
    34
    Stockholm
    Home Country
    Sweden Sweden
    I'm not at home right now, but maybe SciDoctor could do that?

    /tompa
     

    SciDoctor

    Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    That might be beyond my knowledge !

    More logs attached though if this helps. this time just bringing up any UI menu in fullscreen causes the cpu increase to drop to normal in tvservice. jpg's attached. I have tried every UI combination now to see if there are any other similar problems, there don't seem to be though just the ones listed

    This test was done while timesgifting and epg grab, you can see that the sytem performance suffers badly. sql update would take forever 25% of cpu usage is wasted in ? 'polling' ?
     

    Attachments

    • Capture6.JPG
      Capture6.JPG
      76.7 KB
    • Capture5.JPG
      Capture5.JPG
      83.2 KB

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    ok problem confirmed.
    happens on TV as well as for rec's.

    culprit is:
    Code:
     	TvPlugin.dll!TvPlugin.ChannelNavigator.UpdateCurrentChannel() Line 472	C#
     	TvPlugin.dll!TvPlugin.ChannelNavigator.CheckChannelChange() Line 394 + 0x9 bytes	C#
     	TvPlugin.dll!TvPlugin.TvFullScreen.CheckTimeOuts() Line 2625 + 0x19 bytes	C#
    	TvPlugin.dll!TvPlugin.TvFullScreen.Process() Line 2265 + 0xc bytes	C#

    UpdateCurrentChannel calls many times per sec. the following line:
    => if (TVHome.Card.IsTimeShifting || TVHome.Card.IsRecording)

    each of those calls does a remoting call to server. which is polling => high cpu usage on tvservice.exe

    /gibman
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    can u try the attached patch.
    It makes a difference here.
    now we only query the server if a channel change is pending. eg. when using numeric keys, mini guide.. etc.

    it limits the polling and decreases cpu usage.

    its based on current svn.. but u should be able to patch the version u r running as well.

    /gibman
     

    Attachments

    • tvfullscreen_highcpu_fix.patch
      1 KB

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    AW: Tvservice cpu usage increase problem while .ts playback fullscreen

    I like to see all the improvements concerning TvServer :p *Thumbs up*
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Re: AW: Tvservice cpu usage increase problem while .ts playback fullscreen

    I like to see all the improvements concerning TvServer :p *Thumbs up*

    Are you saying that you have tested this patch and it works fine?
     

    SciDoctor

    Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    Thanks i will test and get back to you by thursday. the next time I have internet access.:D
     

    Users who are viewing this thread

    Top Bottom