NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
TeknoJnky
Jan 23, 2018Hero
how to optimize a temp folder for maximum write/read performance ?
I have a fairly large plex media server/library running on my 528x, upgraded to 16gig ram.
I am interested in utilzing an existing, or if necessary creating a specialized temporary folder dedicated to plex transcoding, to maximize the read/write performance.
I am asking for recommendations and/or instructions on how to best achieve this goal with minimal modifications to the nas system and its configuration files.
I have read about tmpfs and ramfs, and these might be ok in many circumstances, but I am concerned about edge cases with plex.
Typical ram utilization on the system ranges from 3 to 5gigs (per htop) out of 16gig installed ram.
Ideally what I want is a dedicated transcode folder that either uses ram (via tmpfs or ramfs), or that is otherwise optimized for read/write performance, ignoring/disabling features such as journalling/checksumming/etc and maximizing the write cache to minimize actual disk writing (these are temporary files anyway, so commiting them to physical disk is not necessary unless we run out of cache and/or ram).
While avoiding issues like running out of ram (too many or too large of temp files) that runs in to swap or could cause system lockup/shut down.
What I have done so far is create a hidden share that has checksums disabled, but I would like to determine if there are any other efficient/effective ways of accomplishing my goal without affecting the overall system.
In summary, I want a dedicated transcoding folder (or even file system or subvolume if that is necessary), that is tuned to maximize IO by utilizing any available ram, that is flexible and smart enough to write to disk *only* when it has to, otherwise it should hold as much file data as it can fit in available ram.
addendum:
My understanding of plex transcoding is of generally 2 scenarios-
- transcoding of media to meet streaming client and/or bandwidth limitation, ie transcode bluray to lower resolution or bitrate, and/or transcoding audio formats like truehd to aac, etc.
- transcoding of live tv shows (via network tuner) with the plex dvr function.
the first example transcodes many small chunks of media, constantly
the second example saves the incoming media stream (typically ota mpegts) to be transcoded/post-processed, for however long the show is (which could be 30 minutes or 3+ hours).
9 Replies
Replies have been turned off for this discussion
- SandsharkSensei - Experienced User
Do you have room for another drive? It would seem to me that a separate SSD drive as a separate volume would be the way to go.
Unfortunately no I have 8x 8tb raid6/x-raid.
Already having such a large and full volume, tends puts a limit on fast smaller file IO, rapid creation/removal scenarios.
I thought about putting an ssd via usb3, but really even SSD have IO and write cycle limits that would be avoided entirely by giving a specific folder or volume ~10 gig of ram write cache.
maximizing (or minimizing, depending on how you look at it) latency performance is the goal, not sure if usb3 would be an improvement over the baseline raid-6 volume.
If you may remember back in the day, with hardware raid controller boards, some could have several gigs of standard ram dimms for write-back-cache to improve IOPS and latency. Most of these had some kind of battery backup to help ensure that cached data got written in case of a power interuption.
write-back cache to a specific folder/volume I believe is what I am looking for, though not sure if that is something that is feasible.
I thought about using /run or /dev/shm (same thing?), which appear to use up to max of 8 out of 16g as tmpfs+swap.
While this might work perfect for normal streaming transcodes, I fear it would be insufficient to cover long or multiple dvr shows/movies which could cause out of memory problems.
reading more on plex forums and google, it looks likes actually at some point the streaming transcode now *requires* sizeof media_file+100meg free space in order to start a transcode.
So this means for plex transcoding bluray or 4k rips, this could potentially be 50+ gig per user that is streaming simultaniously.
I knew I should have gone with 64 gigs of ram, LOL.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!