# Request for PMS: Use my RAM !

**URL:** <https://forums.plex.tv/t/request-for-pms-use-my-ram/64470>\
**Category:** Feature Suggestions\
**Created:** [April 23, 2014, 9:16pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470 "2014-04-23T21:16:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Montago](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/montago/32/83507_2.png) [@Montago](https://forums.plex.tv/u/Montago)\
**Post date:** [April 23, 2014, 9:16pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/1 "2014-04-23T21:16:30Z")

</div>

Transcoding uses the disk to store small segments of video and audio files. Usually only a buffered portion is stored of about 100-300 MB

&nbsp;

Since i have 16 GB of RAM in my server, it would ideally be better to buffer into RAM instead of wasting my harddrive / SSD !!!!

&nbsp;

5 clients would therefore only need a maximum of 1 GB RAM which i would gladly let PMS use.

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![ninja6o4](https://avatars.discourse-cdn.com/v4/letter/n/85e7bf/32.png) [@ninja6o4](https://forums.plex.tv/u/ninja6o4)\
**Post date:** [April 24, 2014, 2:48am UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/2 "2014-04-24T02:48:04Z")

</div>

I like this idea - it would remove the drive speed limitation, and it could easily be configured to set a maxmum memory usage limit so it doesn't inadvertently overload the server's RAM.

---

<div class="post-metadata">

**Author:** ![jkiel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jkiel/32/4301_2.png) [@jkiel](https://forums.plex.tv/u/jkiel)\
**Post date:** [April 24, 2014, 2:21pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/3 "2014-04-24T14:21:06Z")

</div>

On Windows systems, I think it would be interesting to use&nbsp;[FILE\_ATTRIBUTE\_TEMPORARY](http://msdn.microsoft.com/en-us/library/aa363858%28VS.85%29.aspx#caching_behavior) to create temporary files that will only be written to disk if there is memory pressure, else they'll stay in ram. &nbsp;This would require a change to Plex's transcoder (FFMPEG) to create its files with this set.

On \*nix systems, pointing Plex to a [tmpfs](http://en.wikipedia.org/wiki/Tmpfs)&nbsp;mount could help -- just make sure you make it large enough and have enough swap space. &nbsp;You could do this on your own without any changes to PMS software. &nbsp;For some of you, /tmp may already be tmpfs, but may not be large enough.

On OSX you could create a ram disk, but you can't overcommit (make the volume larger than you have available physical ram) like you can with tmpfs -- this could cause problems for sync transcodes.

---

<div class="post-metadata">

**Author:** ![Montago](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/montago/32/83507_2.png) [@Montago](https://forums.plex.tv/u/Montago)\
**Post date:** [April 29, 2014, 11:56am UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/4 "2014-04-29T11:56:24Z")

</div>

jkiel:

I know that i could install RAMDisk and setup a 2 GB drive and use that as temp dir - but for everyone else who either don't want to or 'cant' it would be nicer if PMS could do it automatically.&nbsp;

also - there need to be a bit of throttling so that the disk doesn't run out of space... I've noticed that PMS sometimes leave segments, which take up a bit of space.

I guess the big challenge is to grab the output of FFMPEG and throw it into RAM, and then address it somehow to the webserver. its not impossible, just challenging :)&nbsp;

---

<div class="post-metadata">

**Author:** ![jkiel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jkiel/32/4301_2.png) [@jkiel](https://forums.plex.tv/u/jkiel)\
**Post date:** [April 29, 2014, 6:21pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/5 "2014-04-29T18:21:50Z")

</div>

> I know that i could install RAMDisk and setup a 2 GB drive and use that as temp dir - but for everyone else who either don't want to or 'cant' it would be nicer if PMS could do it automatically.&nbsp;

The easiest way for PMS to implement it, without heavy modification of FFMPEG, is probably what I pointed out above (FILE\_ATTRIBUTE\_TEMPORARY for Windows, tmpfs for \*nix). &nbsp;Windows' FILE\_ATTRIBUTE\_TEMPORARY is pretty slick, but I don't think anything like it exists on linux/OSX. &nbsp;I'm also not sure how difficult it would be to implement FILE\_ATTRIBUTE\_TEMPORARY&nbsp;in FFMPEG, but my guess is that it would be relatively easy. tmpfs would just require a simple setup script and configuration options.

Unfortunately it doesn't help OSX users. &nbsp;Someone else would need to chime in there.

---

<div class="post-metadata">

**Author:** ![chking4](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@chking4](https://forums.plex.tv/u/chking4)\
**Post date:** [April 29, 2014, 7:24pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/6 "2014-04-29T19:24:50Z")

</div>

Yea my 16gb of ram is largely underutilized and 3tb hard drive is super slow so +1&nbsp;

---

<div class="post-metadata">

**Author:** ![Technically](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@Technically](https://forums.plex.tv/u/Technically)\
**Post date:** [May 1, 2014, 9:11am UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/7 "2014-05-01T09:11:40Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![don.chulio](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/don.chulio/32/8418_2.png) [@don.chulio](https://forums.plex.tv/u/don.chulio)\
**Post date:** [May 1, 2014, 9:51am UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/8 "2014-05-01T09:51:37Z")

</div>

+1  
  
Yes use my RAM! There is enough available. 😉

---

<div class="post-metadata">

**Author:** ![bmaaske](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bmaaske](https://forums.plex.tv/u/bmaaske)\
**Post date:** [May 1, 2014, 10:29pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/9 "2014-05-01T22:29:12Z")

</div>

If I were to set up a RAM disk, how do I make Plex use it ONLY FOR TRANSCODING?

Edit: Answered my own question. You can set the temp directory used by the transcoder in:

Settings-\>Server-\>Transcoder-\>Advanced-\>Transcoder temporary directory

---

<div class="post-metadata">

**Author:** ![jarplex](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@jarplex](https://forums.plex.tv/u/jarplex)\
**Post date:** [May 2, 2014, 4:16pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/10 "2014-05-02T16:16:39Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![hansrotech](https://avatars.discourse-cdn.com/v4/letter/h/e9a140/32.png) [@hansrotech](https://forums.plex.tv/u/hansrotech)\
**Post date:** [May 4, 2014, 7:49am UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/11 "2014-05-04T07:49:29Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![VikingSven](https://avatars.discourse-cdn.com/v4/letter/v/f4b2a3/32.png) [@VikingSven](https://forums.plex.tv/u/VikingSven)\
**Post date:** [May 4, 2014, 3:30pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/12 "2014-05-04T15:30:41Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![zeagus](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/zeagus/32/99581_2.png) [@zeagus](https://forums.plex.tv/u/zeagus)\
**Post date:** [May 4, 2014, 6:29pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/13 "2014-05-04T18:29:26Z")

</div>

Super slow compared to RAM, but plenty fast enough to contain the I/O required for a few streams of transcoded streaming at once.&nbsp; Regardless, I wouldn't complain of the option.

> Yea my 16gb of ram is largely underutilized and 3tb hard drive is super slow so +1&nbsp;

---

<div class="post-metadata">

**Author:** ![redxon](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/redxon/32/8607_2.png) [@redxon](https://forums.plex.tv/u/redxon)\
**Post date:** [May 4, 2014, 6:51pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/14 "2014-05-04T18:51:55Z")

</div>

I would also say, in the real time transcoding it doesn't make any difference, because the disk is still faster than the playback speed of the video and therefor doesn't really limit this. I don't know who the thing is with 10 clients the same time, but then again, I don't know anybody who has 10 clients streaming (with transcode) the same time. And for those you could still use a ramdisk with the temp directory on it.

But what I think could be the greater problem is if you use an SSD. I mean, it depends on how much of the videos you have do actually have to transcode but if it is many then you would have much writing on the SSD and we all know, that an SSD doesn't have unlimited writing cycles (but still, I don't think that you can transcode that much to wreck an SSD with that before it dies a natural death so...)

---

<div class="post-metadata">

**Author:** ![zeagus](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/zeagus/32/99581_2.png) [@zeagus](https://forums.plex.tv/u/zeagus)\
**Post date:** [May 4, 2014, 7:13pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/15 "2014-05-04T19:13:01Z")

</div>

You'd have to be beating up on it pretty good 24x7 for years and years to run through through the write cycles expectancy of an SSD.&nbsp; With a regular average client workload they should last 10+ years IIRC.&nbsp; I did a test one time and had 2 web clients, 2 tablets, two phones, and two instances of PHT running at once and I was fine.&nbsp; I need to do more scientific testing as I don't recall how many were DIrectPlay, how many were trancode, etc., but I know that while I have the upgrade itch that it doesn't really make sense for me to bother right now.&nbsp; The new transcoder is even faster and more efficient than it used to be so... I guess I get to sit on my current build for a while longer.&nbsp; I may repackage it into an HTPC case, though, as it currently lives in a SIlverStone FT02 on the floor next to the a/v stack which is kind of, erm, imposing :).

> I would also say, in the real time transcoding it doesn't make any difference, because the disk is still faster than the playback speed of the video and therefor doesn't really limit this. I don't know who the thing is with 10 clients the same time, but then again, I don't know anybody who has 10 clients streaming (with transcode) the same time. And for those you could still use a ramdisk with the temp directory on it.
> 
> But what I think could be the greater problem is if you use an SSD. I mean, it depends on how much of the videos you have do actually have to transcode but if it is many then you would have much writing on the SSD and we all know, that an SSD doesn't have unlimited writing cycles (but still, I don't think that you can transcode that much to wreck an SSD with that before it dies a natural death so...)

---

<div class="post-metadata">

**Author:** ![jkiel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jkiel/32/4301_2.png) [@jkiel](https://forums.plex.tv/u/jkiel)\
**Post date:** [May 4, 2014, 8:51pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/16 "2014-05-04T20:51:44Z")

</div>

> You'd have to be beating up on it pretty good 24x7 for years and years to run through through the write cycles expectancy of an SSD. &nbsp;

I suppose it depends on how full the SSD is, and how much extra area that particular SSD has reserved for wear leveling.

While this seems like a simple request, it can actually get complicated quickly. &nbsp;A Ram disk is probably the best option for those that want to avoid wear on their SSD, else, for the monster server, a cheap, oversized, dedicated SSD for transcode cache would likely be more than enough.

---

<div class="post-metadata">

**Author:** ![zeagus](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/zeagus/32/99581_2.png) [@zeagus](https://forums.plex.tv/u/zeagus)\
**Post date:** [May 4, 2014, 10:42pm UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/17 "2014-05-04T22:42:41Z")

</div>

Yep both very true - depends on how well the controller handles trim, spare and wear leveling. Unless you have a super busy PMS though a decent HDD should be plenty fast.

---

<div class="post-metadata">

**Author:** ![WurtzelSepp\_1](https://avatars.discourse-cdn.com/v4/letter/w/e36b37/32.png) [@WurtzelSepp\_1](https://forums.plex.tv/u/WurtzelSepp_1)\
**Post date:** [May 6, 2014, 9:22am UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/18 "2014-05-06T09:22:56Z")

</div>

jea and keep the database in memory!!!

---

<div class="post-metadata">

**Author:** ![DKeppi](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@DKeppi](https://forums.plex.tv/u/DKeppi)\
**Post date:** [May 6, 2014, 9:25am UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/19 "2014-05-06T09:25:04Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![Technically](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@Technically](https://forums.plex.tv/u/Technically)\
**Post date:** [May 14, 2014, 9:22am UTC](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470/20 "2014-05-14T09:22:14Z")

</div>

+1

[Next page](https://forums.plex.tv/t/request-for-pms-use-my-ram/64470.md?page=2)
