1.15.0 - TVService High cpu usage

Discussion in 'Archive' started by doskabouter, April 10, 2017.

  1. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,742
    Likes Received:
    702
    Location:
    Nuenen
    Ratings:
    +1,048 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Hi,

    I know I'm on an old version, but since the current tvservice is still the same as way back (the version I use), I hope my post is acceptable here.
    And as an extra: I'm using the tswriter.ax from DVB-C radio not working (because I was having some issues (not related to this one) which that version resolved)

    Lately I'm getting issues with the tvservice not doing what it's supposed to do.
    Not sure what triggered it, I've been using this setup since the end of 2014 without any issues, but since a month or so, mediaportal sometimes completely freezes when watching tv.
    Didn't do much with windows updates, the only change I can think of, is that I'm recording a fair amount more than that I used to do, so could that be the problem?



    couple of logs attached, not all because I was in kind of a hurry to fix the WAF again

    Edit: forgot to mention this: When the tvservice was in it's bad mood, it was using one core to the max instead of 1-2% normally.
     
    Last edited: April 10, 2017
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,510
    Likes Received:
    4,716
    Ratings:
    +8,181 / 17
    Home Country:
    New Zealand New Zealand
    Hello

    From the perspective of DVB-C support it's very similar, yes.

    It seems unlikely to me.

    Nothing stands out.

    Please:
    1. Provide the full set of log files. Use the Watchdog tool with option 3 ("export...").
    2. Specify when (most recent date/time) the TV service started hogging the CPU core. (I assume that the high CPU usage only starts after a period of time, not immediately when the TV service starts.)
    3. Specify whether the TV service can be stopped normally (ie. not terminated/killed with task manager) after it starts hogging the CPU core.
     
  4. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,742
    Likes Received:
    702
    Location:
    Nuenen
    Ratings:
    +1,048 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Couple of thins I can already answer:
    High cpu doesn't occur right after (or in this case within a day after) restart. Currently running (after yesterday's restart) at 0-1%
    In case of high cpu, Tv service can be stopped and started normally through the setuptv/manual tab.
    And one I find hard to answer: Don't know when exactly the cpu is maxing out, I usually only see that after the tvservice is stopping/hanging/whatever the tvstream and mediaportal hangs..

    But if the tvservice is going to act up again, I'll collect the full logs. Could take a couple of days though before that's going to happen.
     
  5. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,510
    Likes Received:
    4,716
    Ratings:
    +8,181 / 17
    Home Country:
    New Zealand New Zealand
    Okay thanks.
    These answers suggest that the trigger may be an external process (eg. security software) affecting the TV service (eg. by periodic security scan) or a TV Server background process (eg. thumbnail generation) that doesn't affect the overall operation of the TV service.

    To be clear, I'm not looking for a general answer about when TV service starts to max out the CPU.
    Rather, I'm looking for a specific answer about when (date and time) you noticed the CPU maxed out for the most recent occurrence of the problem. Surely you have some idea about that. Precise is best, but even if you can only say "yesterday morning" as an answer it would be a start.

    Do you mean that the problem has only happened once?
    The way you wrote earlier gave me the impression that the problem was occurring semi-regularly.

    Unless the most recent occurrence was several days ago, the information that I'm looking for should be available in the existing log files, and those log files could be collected now if you wanted to.
    In other words: there's no need to wait unless you have some reason for wanting to do so.
     
  6. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,742
    Likes Received:
    702
    Location:
    Nuenen
    Ratings:
    +1,048 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    As security software I have Windows defender (without excluded folders), but I thought that if that one is the problem, that process maxes out the cpu, and not the tvsercvice.
    Tvserver background processes sounds plausible, especially in combination with normal service shutdown.
    But it does (at least that's my assumption) affect overall operation, as I've seen this behavior only when the MP client hangs itself while watching tv.

    I'm going to check cpu usage regularly (f.e. now at 1%) to see if this can be correlated with MP hanging itself
    Didn't check it before monday (last occurence) so no clue whatsoever on how long it was in that state.

    It happened three times now. Bad (optimistic?) wording on my side. Meant "when" instead of "if"

    It should indeed be present, but memory is a bit hazy about the exact times and what happened exactly (restarts of mp client etc)
    For what can be recalled is that around 15:04 we started watching tv, and around 15;30-ish problems arose and some restarts were done.

    I've now left instructions for when that happens (write down time, and leave everything as is until I get home :) )
    So when it happens again, I have a more coherent story, and logs from MP client too.
    Wouldn't want to waste your time checking logs without clear times and description.

    not even this?
    Error "The process cannot access the file 'D:\Recorded TV\TimeShift\live5-0.ts.tsbuffer3.ts' because it is being used by another process." on delete in CleanTimeshiftFiles
     
  7. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,510
    Likes Received:
    4,716
    Ratings:
    +8,181 / 17
    Home Country:
    New Zealand New Zealand
    Nope.
    That can be normal if a client is paused/time-shifting.
     
  8. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,742
    Likes Received:
    702
    Location:
    Nuenen
    Ratings:
    +1,048 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    FYI:
    No more tv server issues occurred until now.
    Just updated tv server and client to MP 1.16
    Is that old twriter.ax still necessary, or is that fix included in MP 1.16?
     
  9. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,510
    Likes Received:
    4,716
    Ratings:
    +8,181 / 17
    Home Country:
    New Zealand New Zealand
    No that patch is not in MP 1.16.
    I suggest that you check whether the patch is still needed, because the TsWriter from MP 1.16 is generally significantly better than that old version now. In other words: you should avoid using that patch unless you absolutely have to.
     
  10. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,742
    Likes Received:
    702
    Location:
    Nuenen
    Ratings:
    +1,048 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Glad to say that I still didn't see that issue popping up again.
    However, a restart of the tvservice was needed because of locked files:
    [2017-05-11 18:15:16,971] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'D:\Recorded TV\NPO 1\NOS Journaal\NOS Journaal - 2017-05-05.ts' because it is being used by another process.

    It turned out that the tvservice itself had this file open.
    Unfortunately, it has been going on unnoticed long enough to only have logfiles stating this error, and not any previous things when all was normal.

    Could this have been the reason for me to use the old tswriter.ax?
     
  11. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,510
    Likes Received:
    4,716
    Ratings:
    +8,181 / 17
    Home Country:
    New Zealand New Zealand
    If you have a multi-seat setup with 1.16 PR or final installed on the server, please follow this thread:
    MP1.16 RecordingFileHandler: Error while deleting a recording from disk.

    In short, there's a bug in the 1.16 streaming server changes which prevents recording file deletion.
    You can test the patch provided by Owlsroost.

    No chance.
    The only reason to use that TsWriter would be if you want/need to receive channels that are unreceivable with the standard TsWriter for technical reasons. The explanation of those "technical reasons" is quite complex so I won't explain in full here. However, in short, in my opinion it's quite unlikely that you should need it.
     
    • Thank You! Thank You! x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 2)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!