MediaPortal Wiki > MediaPortal 1 > Customization > TV-Server > Ramdisk for Timeshifting

Ramdisk for Timeshifting

3 of 3 found this page helpful
Redirected from TV-Server/UserGuides/Ramdisk

    Theory

    At the beginning there is always boring theory.

    Ramdisk

    A ramdisk treats a segment of RAM as a virtual harddisk. Due to the lack of moving parts the ramdisk has much faster read and write speeds than a common harddisk. However the big disadvantage of a ramdisk is that it is voltatile memory, the complete content is deleted at poweroff. Thus it's perfect for temporary files like the timeshiftbuffer files which are accessed frequently but are not needed after shutdown.

    Timeshiftbuffer of the TV-Server

    LiveTv is always turned on at the TV-Server because of streaming to the TV-Plugin. When switching TV on, a minimal count of files is written to disk which will be expanded to a maximum configurable count of files. The minimal count of files in combination with the size decide how long you can turn back to normal watching. The difference between minimal and maximal files decides how long you can pause LiveTv. The time for timeshifting can be easily calculated but depends on the datarate of the TV-Stream. Approximately it's 2 GB for 60 minutes.
    Note:
    On a Singleseat-Setup only one buffer is created because you can watch only one stream at the same time, start recording would open a second stream but recordings are written directly to disk. For Multiseat-Setups there can be a buffer for each card in use. Consider this at the min./max. and filesize configuration of the buffer !
    Source

    Example for a 1GB Ramdisk

    Because of the different conversion of KB to MB to GB using 1000 or 1024 units, we are not going to use the mathematical maximal values. Another reason is the overhead that Windows produces for systemfolders. A solution for this could be setting the filesize to 16 MB or 32 MB and the minmal and maximal values higher.

    Min. count of files: 2
    Max. count of files: 8
    Filesize: 120 MB

    Normal time to jump back:
    Min. files * size = MB / 2Gb * 60 minutes = time to jumback
    2* 120 = 240 / 2000 * 60 = 7,2 minutes

    Max time for break LiveTV:
    (Max. files – min. files) * size = MB / 2GB * 60 minutes = Max break time
    8 – 2 = 6 * 120 = 720 / 2000 * 60 = 21,6 minutes
    Note:
    When the last buffer file is written the TV-Server starts to override the first one and the buffer gets mixed up. You will loose some fragments of the paused program.

    Choice of the Ramdisk

    The choice of a Ramdisk is mostly unimportant, just make sure that the Ramdisk lets you configure at least 1GB of Ram, less is not recommended. For this reason the Windows Ramdisk is unusable.

    Conclusion

    • Pros

      • Less annoying hard disk seek noise
      • Because of this, less strain and longer lifetime for the hard disk

      Cons

      • Costs per GB (RAM costs considerably more)
      • Maximum 4GB RAM for 32-bit OS, resulting in 2GB respectively 3GB of maximal Ramdisk size
      • Less Timeshiftbuffer

    You'll should note that RAM disk won't provide any faster channel change times. Current bottleneck is not the hard disk speed.

    Practice

    Let's get started.

    Installation

    The installation should be more or less the same for all ramdisks.
    For this example we use RRamdisk.

    1. Download and unzip ramdisk.zip to e.g. c:\RRamdisk
    2. Execute the ramdisk.exe and click Install Ramdisk
    3. Select the size of the ramdisk under Disk Size and set Media Type to Fixed Media. The Drive Letter doesn't matter.
    4. After another click on OK a success dialog appears and we're done.

    ramdsik.PNG

    Configuration in the TvServer setup:

    1. Start the TV-Server configuration and select Recording -> Recording folders. Now set the path for the timeshiftbuffer files to your ramdisk drive letter.

    ramdisk_setup.jpg

    2. Under General Settings -> Timeshifting you can set the max./min. number and overall size of the timeshiftbuffer files according to your Ramdisk size. Note that the file settings are per tuner so your available Ramdisk must be at least max files * size * num tuners (assuming all cards use the same Ramdisk for their timeshift buffer per #1 above). If not, live TV will freeze when the Ramdisk fills.

    ramdisk_setup2.jpg

    3. Try to start timeshifting under Manual Control.
    4. That's it, close the configuration, start MediaPortal and enjoy.




    Tag page (Edit tags)
    Go to top
    Powered by MindTouch
    Running the latest version?
    V1.2.3 - released April 2012
    Releasenews | Download
    Changelog
     | Requirements
    opensource-logoTeam-MediaPortal 
    About
    Contact |  Press
    Partners