charts icon indicating copy to clipboard operation
charts copied to clipboard

NAS-117484 / 22.12 / Allowing memory backed volumes in Plex

Open Qubad786 opened this issue 2 years ago • 6 comments

Context

It was requested to allow memory backed volumes similar to what /dev/shm does.

Qubad786 avatar Aug 03 '22 17:08 Qubad786

Jira URL: https://ixsystems.atlassian.net/browse/NAS-117484

bugclerk avatar Aug 03 '22 17:08 bugclerk

What is the intent of this?

william-gr avatar Aug 09 '22 16:08 william-gr

@william-gr we had a request for this in https://github.com/truenas/charts/issues/505

sonicaj avatar Aug 09 '22 16:08 sonicaj

We usually don't do things only because users requested them... Allowing memory to be arbitrarily used may not fly very well and cause all sorts of weirdness, without important constraints.

We are getting to a point we should at least discuss a feature with a supervisor/manager before implementing it, as much as it may seem trivial.

I will defer to @yocalebo on this one

william-gr avatar Aug 09 '22 16:08 william-gr

@Qubad786 after discussing with @yocalebo we have decided to hold off on this feature and make it bluefin only. What we would like to do is the following:

  1. Allow setting memory limit size on the volumes while defaulting to something small
  2. Have a maximum limit on the size which can be set for these volumes and we can discuss the maximum with the team as to what it should be ( it would probably require middleware changes )

sonicaj avatar Aug 09 '22 17:08 sonicaj

@Qubad786 after discussing with @yocalebo we have decided to hold off on this feature and make it bluefin only. What we would like to do is the following:

  1. Allow setting memory limit size on the volumes while defaulting to something small
  2. Have a maximum limit on the size which can be set for these volumes and we can discuss the maximum with the team as to what it should be ( it would probably require middleware changes )

Please note that, while some validation is great, it's also important to not-break the behavior users expect from Kubernetes and docker.

We've two options:

  1. The DIY option (aka: pick your own path) How we somewhat solved the issue @william-gr hinted at (TLDR: Users fucking things up): is that we have the feature basically hidden away by having it as a subtype of the "emptyDir" type. Simply put, users first have to make something an emptyDir and then also have to manually put it on a ramdisk. In our experience this leads to most users doing this either A. Had to be very intenting to do precisely what they where doing. B. Knew what they where doing before hand.

Making it "too easy" like this PR, for an App that would be insanely ram hungry, like plex... is super tricky...

  1. /dev/shm Most linux-savy Users expect this to be a ramdisk, so we made it a ramdisk by default.

PrivatePuffin avatar Oct 08 '22 16:10 PrivatePuffin