[solved] LiveTV Records Causing 100% Drive Activity (2 Viewers)

1gkar

MP Donator
  • Premium Supporter
  • July 1, 2007
    274
    77
    Home Country
    New Zealand New Zealand
    This is a continuation of this thread. As I have discovered the actual (most likely) cause, I have posted to the relevant forum, for future users, to locate easier, if required.

    The crux of the issue: I have been experiencing major buffering, of LiveTV viewing, & often freezes/hanging of MP {ver. 1.24 & 1.25 -at least}. sometimes requiring a hard-reboot of the HTPC.

    During the discussion, on the other thread, I noticed, one night, that the partition, housing the MP Recordings' folder, was running at 100%. I discovered this when alt+tab(bing) between the two applications, when I was experiencing the buffering.
    I then went & changed the recordings folder, to another drive -external HDD- & the drive activity became normal, with no viewing issues. Once I returned the folder to the original location, the 100% activity returned -see attached image

    Playback Issues_on RecordedTV Partition.jpg
    .

    According to Windows tools, there were no errors found, on the partition, housing the original recordings folder. So, not sure what to look for.

    I will attach logs for records with the LiveTV recordings folder to both locations, to see if anyone can notice an obvious (for those with the ability) reason, when the issue does represent itself. Sometimes it is intermittent.

    The records show no issues when playing back, from either the videos section, inside MP, or using another application, like MPC-HC.

    Any assistance to get to the bottom of this would be greatly appreciated, as I really need to reset the recordings folder back to it's original location, but only if I can get it sorted. Thanks.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,495
    10,371
    Kyiv
    Home Country
    Ukraine Ukraine
    It seems to me that this is normal, it can be seen that in addition to the MediaPortal, other applications also access the disk, and the disk does not have time to write a TV stream, give data to other programs and still work with the MediaPortal. All the same, this disk is intended more for single-threaded linear video recording. It is a bit slow (5400), and the test speed drops to ~ 78MB/s towards the end of the disk, and this is with one thread.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    According to Windows tools, there were no errors found, on the partition, housing the original recordings folder.
    My thought is that this disk is on its way to a catastrophic failure. :eek:

    Disk reads and writes have hardware error checking built-in. When the error check on the read or write fails, the disk microcode re-reads or rewrites the block that had the error. But it does not do this just once -- it retries many many times (a 100 times or more) If the read or write eventually succeeds, no error is reported to the application (MP). So you can get into the situation where MP does not detect an error, but the disk performance slows down dramatically. :cry:

    If you performed a "chkdsk" on the drive, that checks only the integrity of the file system, and won't report errors that the disk microcode detected. I think that it would be worthwhile obtaining the disk manufacturer's disk-checking tool, and see if that detects any problems with the disk. Alternatively, there are various freeware tools that will report the disk's SMART information (which may provide a clue).

    -- from CyberSimian in the UK
     

    1gkar

    MP Donator
  • Premium Supporter
  • July 1, 2007
    274
    77
    Home Country
    New Zealand New Zealand
    Thanks to all.
    As it's bedtime, don't have time for a proper response. In the interim, what would you recommend as a drive replacement: internal, or external?
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    what would you recommend as a drive replacement: internal, or external?
    The live-TV buffer is not persistent, and (sadly) cannot be made persistent in MP. This means that when you are watching live TV, you can start recording only from the point at which you press the RECORD button -- you cannot capture the existing contents of the live-TV buffer. :(

    So, having said that, if you have enough RAM, you could use a RAM disk. E.g. if you have 16 GB of RAM, you could devote 8 GB to the RAM disk. I think that there is a page in the Wiki describing how to set this up (I have not tried this myself).

    If you have 8 GB RAM or less, a disk would be preferred. Using an internal disk has the advantage that you can use the full bandwidth of the PCI bus, and so would be limited only by the speed of the disk. This might be significant if you record multiple concurrent programmes. Example: on occasion I record 8-9 programmes concurrently :eek:. (Broadcasters always seem to schedule their best programmes for the same time of day, typically 19:00-22:00hrs.)

    An external disk would likely be USB, but the USB bus is not as fast as the PCI bus. A SATA3 disk has an interface speed of 6 Gbit/sec (= 750 MByte/sec), whereas the USB2 bus is 480 MBit/sec (= 60 MByte/sec). You might get around 100 MByte/sec on sustained writes using a fast mechanical disk, and faster speeds from an SSD.

    USB3 would be faster, especially if you can disentangle the confusing nomenclature used for the newer versions of USB (3.0, 3.1, 3.2, ...).

    I personally would not use a network-connected disk for the live-TV buffer or for the recorded-TV folder (it introduces more places where things can go wrong), but a network-connected disk is fine for playback. I use a NAS to hold the bulk of my recordings library, and once per week move files from the recordings folder to the NAS.

    -- from CyberSimian in the UK
     

    1gkar

    MP Donator
  • Premium Supporter
  • July 1, 2007
    274
    77
    Home Country
    New Zealand New Zealand
    Thanks, for the input. The reason I ask is I have had 1 HDD fail relatively recently. And that Seagate drive wasn't that old; within 3-4 years.
    Haven't done any Seagate tools testing, yet. Life gets in the way, sometimes;)
    I do have only 8GB of RAM, so the internal would likely be the resolution, going forward. In saying that, the drive has been behaving recently, & recording to an external drive appears to be OK, when I changed the recording location. I have taken a True Image snapshot, in case it does fail. So, will most likely stay with this, as it stands, at present, as I don't have the room inside the case, for an additional HDD.

    One other query, that is in keeping with the thread title: does anyone know why the following would occur. Again, it has been the case for years, & again, just haven't done anything about it.

    I have manual records of our nation's two main news channel's sports segments, as I don't watch the news: just sports. For years, the Saturday records have never woken up my HTPC, to begin recording. Every other day of the week, they work as they should. They are set by both weekdays, & weekend records. I am often not home in time to manually start the HTPC, as I'm at golf. I just switch it on, & record the + 1hour delayed channels, to record/watch the day's sports, when I get home. Have been through the configs, reset the manual records, etc. Nothing seems to work.

    This has occurred over at least 7-9 itinerations of Mediaportal., & at least 5-7 years.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    For years, the Saturday records have never woken up my HTPC, to begin recording. Every other day of the week, they work as they should. They are set by both weekdays, & weekend records.
    Strange :confused:. I cannot think of any setting or combination of circumstances that might cause this :(. So that leaves database corruption as the possible culprit.

    If you normally perform an update install of MP, your existing databases are retained, so if there is some corrupted data in the database, the corrupted data is retained too. However, to fix this I think that you would need to delete the TV Server databases and set up TV Server again. This means that you would lose all of your existing series recording definitions, so you need to consider carefully whether you really want to do this. I currently have 134 series record definitions (many are for series that are not currently broadcasting), and it would be a lot of work to re-create all of the definitions from scratch :(. You could try exporting the schedule, deleting the database(s), and then importing the schedule. That might eliminate the error whilst preserving your recording schedule.

    Another possibility is corruption in the Task Scheduler task definition. WMC used to suffer from this occasionally, and the remedy was to delete the relevant task definition and allow WMC to recreate it the next time that WMC ran. I don't know whether MP suffers from this error.

    -- from CyberSimian in the UK
     

    1gkar

    MP Donator
  • Premium Supporter
  • July 1, 2007
    274
    77
    Home Country
    New Zealand New Zealand
    The fact I haven't done anything about it, means it's not really a biggie; I usually just record the +1 hour repeats, as stated. Just curious if it was just me, or an ongoing bug with MP, that nobody had picked up on.
    Question regarding the deletion of schedules, from within MPTVServer Config, does deleting them from within the config fully delete them from the database? As I have done that -on more than one occasion- , & reset the manual recordings: same issue.

    Regarding the HDD, for my TV records; it passed all Segate's Tools for Windows basic tests. Not doing any advanced tests, as I don't want to lose the data, at this point. So...back to square 1, I guess.
    When I get time, will probably take the drive back to it's raw state (try the advanced tests then, if I remember), then reset the partitions, & reinstall the data, from an image snapshot, see if that resolves the issue.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    Just curious if it was just me, or an ongoing bug with MP, that nobody had picked up on.
    Well, it might be :D. I think that manual bookings are not used very often, so you may have found a circumstance that does not work correctly. If you have time, could you export your recording schedule, edit the file to delete all of the entries except for the two(?) manual recording definitions concerned here, and then attach the file in the form of a zip file. I am curious to see if there is anything that looks odd about the definitions.

    does deleting them from within the config fully delete them from the database?
    I don't know. The only way to be absolutely sure that you are not inheriting a corrupt database is to delete the TV Server databases, but that is the "nuclear" option, so I suggest not doing that just yet.

    it passed all Segate's Tools for Windows basic tests.
    Puzzling :confused:. Two things that you could try:

    (1) The next time that the disk shows 100% activity, open "Task Manager", go to the "Performance" tab, and open the "Resource Monitor". In "Resource Monitor", select the "Disk" tab and expand the "Disk Activity" drop-down. Click the "Total" column to sort the list by total bytes read/written, and then hover the mouse over the entry in the "File" column (or maximise the window). You will be able to see the filespec of the file that is being accessed most. The screen shot below was taken when I was using my HTPC to watch live TV using MP. The file at the top of the list is the MP live-TV buffer, and it is being written at 160 KBytes/sec:

    watching_live_tv.jpg

    (2) The "nuclear" option for disk-checking in Windows is to use "chkdsk" with the /R option. With a large disk it will take days to run, as it reads and writes every block on the disk. It preserves data by moving it somewhere else on the disk, but I would suggest that you create a drive image before using /R, just in case it all goes horribly wrong (e.g. a power cut whilst chkdsk is running).

    -- from CyberSimian in the UK
     

    Users who are viewing this thread

    Top Bottom