I’m using an AppleTV with Plex.
, but am concerned about the fact that unless I switch from live TV, the system is continuously storing the video on my Synology disk.
What I’d like to do is to have this timeshift content stored on a ramdisk. I’ve set up the disk, but I can’t see any settings in Plex where I could move the timeshift buffer to the ramdisk. I’m using a Synology btw. Anyone know where I can change these settings?
Are you talking about where to keep the transcoder temporary directory?
On Synology, unless it’s an XPEnology with 64 GB of RAM, isn’t usually viable because most Syno systems are limited memory (J-series CPUs are 8GB maximum).
To use that memory, you tell PMS (Settings - Server - Transcoder - SHOW ADVANCED) to use /dev/shm. This will give you up to half of the installed memory ( 4GB in a system with 8GB ).
Trying to manually mount or use symbolic links is going to be extremely problematic and not supportable because of how DSM 7 works.
I’m not at all familiar with the Synology storage systems, however, I’m going to assume that they could mount an external drive? If that’s the case just change the transcoder directory, assuming that indeed does handle live TV recording as well, to the Mount point for some other external drive. I’m not sure if that’s going to change the spin down for your Synology devices itself though as if the operating system’s busy transcoding I’m sure the discs are already spinning so this might be a moot point.
The transcoder directory does have a setting in Plex, but I’m talking about the live buffer - where you can start a show from the beginning if the stream had been going through Plex. This isn’t the same thing it seems - as I’ve put the transcoder setting to the RAM disk, but it isn’t filling up when I chose a live tv channel.
I have 20GB in my Synology NAS (DSM 7) - and I really only need about 4-8GB, so it would be good to reduce disk wear to put the live cache on the RAM disk. I’ve set up a 10GB ramdisk which is initiated when the Synology boots - just need to find out where the timeshift is stored so I can move it there.
Having said that, I’ve now deleted the ramdisk on the advice above and moved the transcode directory to /dev/shm - as it is doing the same thing anyway - but what happens when that fills up? I guess I can test and see…
Can’t imagine Synology does something different than Linux but Plex creates a /Transcode/Sessions directory with two directories for the chunk and media files in the path specified by Transcoder temporary directory. If you leave that blank it will be in the Library path under Cache.
I / we use the HDD because there are a lot of models with only 4GB of RAM.
Knowing memory is unpredictable, I had to come up with a mechanism which worked for everyone.
There are some models with only 1GB of RAM (DS418j for example) and PMS must be able to run it it without customizing.
There are a few other points mentioned here which I’m going to address:
B. “Wear and tear on the HDD”
If you’re using a NAS-rated drive (shame on you if you aren’t) there is NO “wear and tear” on the HDD when it’s warmed up and running for extended periods.
In fact, just like light bulbs, HDDs fail at startup when it goes from COLD → Operating Temperature.
If you look at any drive’s specs, you’ll find that the drive does not have a limit to “Power on time”. It does, however, have a limit to Load_Cycle_Count.
Please observe. Here is the drive in my DS418j development system which is running 24/7/365
You can clearly see how many times I’ve reset / rebooted it as well as how many times I’ve powered it off. (As a developer, I do a lot of reconfiguring when working on the package)
C. Plex use of the HDD for transcoding / time shift / whatever.
A single NAS HDD is rated approx 200 MB/sec. An array of 4 drives, in SHR, means you’ll get 600 MB/sec throughput
Transcoding (if a true 50/50 read/write split), means you’d be reading 300 MB/sec and then writing 300 MB/sec. This translates to 2.4 Gbps of video. Unless you have 3x 1 Gbps adapters Reading, HW transcoding, and streaming at FULL wire speed, you’re not going to saturate the HDDs.
My advice?
Stop worrying about HDD “wear and tear”. Run them as they should be run - 24/7/365 and your investment will last at least 50,000 hours (2083 days – 5.7 years)
If you’re using “Desktop” drives – Replace them now with NAS drives before they fail and you really lose out.
Don’t use RAMDISK on Synology. You don’t have the memory to waste.
Personal note:
I have a 256 GB NAS/PMS server. The Ramdisk there is 192 GB and used for a lot of other things too. I still have 64 GB of RAM available to the OS/PMS - which is more than enough.
Actually my main reason for wanting to take the load off the hard drives is due to the fact that I use AppleTVs - and there is no option on Plex to stop streaming the live tv after a certain amount of time, (and I often forget to exit the Plex app when switching off the TV). This could mean that the server could stream for days - and I really didn’t want to do that.
As a feature request, a timeout on live tv would be great!
The player will continue to stream forever unless you stop it
… and this is undesirable ?
Also, if you used the ramdisk as buffer, it will eventually fail — But so will a bunch of other system processes, including Plex, which rely on the /tmp (tmpfs) space being shared with the ramdisk. In the end, a lot of your services will crash, without the space being released/cleaned up, until you restart DSM.
Yes, that is what I’m saying. If the stream continues forever, then the buffer will grow indefinitely at the moment.
What would be ideal is some setting to optionally limit to the amount of time a channel is active before stopping (or better; stopping after the current programme finishes, clearing the buffer and starting again for the new programme) - much like a TV has options to switch off after a number of hours - to save energy and the screen burn in. The setting could be set either in the player or at the server (or both).
I remember when the Sky DVR was developed, there was a concern that it was a disk killer - as it continuously recorded the timeshift buffer to the same sectors of the disk - and in a matter of months, the disk failed. They resolved this by changing the location for writing frequently - and by setting a maximum time for recording to the length of the programme - and flushing the buffer after the programme had finished - as I’ve suggested above for Plex.
Yes, though I’ve given a few suggestions for a setting on the server:
1 fixed time buffer
2 buffer stops at end of programme (or a few minutes after) - this means that the buffer is constantly cleaning at the end of each programme, so that on returning, catch-up for the current programme would be available.
3 no buffer at all
Thanks, it would be a neat option to have - specially as the default can be as it is right now as some people may prefer it that way.
For the issue(s); disk space isn’t the only major factor - though it is important. The issue also are about energy saving, disk write frequency (for wear and tear)