At the beginning there is always boring theory.
A RAM drive treats a segment of RAM as a virtual harddisk. Due to the lack of moving parts the RAM drive has much faster read and write speeds than a common harddisk. Even faster than SSD drives due to greater bandwidth. However the big disadvantage of a RAM drive 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
Tip 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.
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 minimum and maximum files decides how long you can pause live TV. 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.
Example for a 1GB RAM drive
Tip When the last buffer file is written the TV-Server starts to override the first one and the buffer gets mixed up. You will lose some fragments of the paused program.
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 minimal 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 / 2 GB * 60 minutes = time to jump back
2 * 120 = 240 / 2000 * 60 = 7.2 minutes
Max time for break live TV:
(Max. files – min. files) * size = MB / 2GB * 60 minutes = Max break time
8 – 2 = 6 * 120 = 720 / 2000 * 60 = 21.6 minutes
Suggested Examples for 1 GB - 8 GB RAM drives
RAM drive software
The choice of RAM drive software is mostly unimportant. Just make sure that the RAM drive lets you configure at least 1 GB of RAM. Less is not recommended. For this reason the Windows Ramdisk is unusable.
- RRamdisk free, tested
- Dataram RAMDisk free (non commercial license), Windows 7 (x86 and x64) supported, tested
- SuperSpeed Ramdisk commercial, tested
- Cenatek RamDiskXP commercial, tested
- QSoft RAMDisk commercial (free version restricted to 64MB), not tested
- ArSoft Ramdisk free (development has stoped), might not work with every pc
- *IMdisk *free, open source, tested under Windows 7 x64, allows RAM drive > 4GB
- SoftPerfect RAM Disk free
- Less annoying hard disk seek noise
- Because of this, less strain and longer lifetime for the hard disk
- Costs per GB (RAM costs considerably more)
- Maximum 4GB RAM for 32-bit OS, resulting in 2GB respectively 3GB of maximal RAM drive 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.
Let's get started.
The installation should be more or less the same for all RAM drives. For this example we use RRamdisk.
- Download and unzip to e.g.
- Execute the and click Install Ramdisk
- Select the size of the RAM drive under Disk Size and set Media Type to Fixed Media. The Drive Letter doesn't matter.
- After another click on OK a success dialog appears and we're done.
Configuring TV-Server to use the RAM drive
- Start the TV-Server configuration and select Timeshifting / Folders tab. Now set the path for the timeshiftbuffer files to your RAM drive drive letter.
- Under Timeshifting / General tab you can set the minimum and maximum number and overall size of the timeshiftbuffer files according to your RAM drive size. Note that the file settings are per tuner so your available RAM drive must be at least max files * size * num tuners (assuming all cards use the same RAM drive for their timeshift buffer per step 1 above). If not, live TV will freeze when the RAM drive fills.
- Try to start timeshifting under Manual Control.
- That's it, close the configuration, start MediaPortal and enjoy.
Automatically create a RAM drive at startup using IMdisk
You can let Windows run a batch file on every startup which uses IMdisk to create a RAM drive.
- Create an empty text file and name it, for example . Paste the following commands into the file:
If you want to setup the automatic startup in a batch file (e.g. as part of an unattended installation) instead of interactively, it is easier to use a scheduled task instead of a group policy. Here is a command line to set up a scheduled task based on the batch file above:
The command line must be executed with administrative privileges. If you cut and paste from above, remove any line breaks from the result.
See The easy - and free - way to create and use a RAMdisk for a step-by-step description of how to generate a RAM drive at boot using IMdisk.
NotePutting your internet, and other application's, cache files on the RAM drive is generally a good idea, however, assigning the Windows TEMP and TMP variables to a RAM drive can cause problems, despite the "answer" in this thread. Here are some discussions of the pitfalls:
and navigate to Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)\Startup. Add the batch file to the Script Name field and type a drive size in the Script Parameters field, for example
to create a 8 GB RAM drive.
[GUIDE] Using ImDisk to set up RAM disk(s) in Windows with no limit on disk size2012-09-22T11:14:48Z
This page has no comments.