winnielinnie
MVP
- Joined
- Oct 22, 2019
- Messages
- 3,641
Disclaimer: This is not a troubleshooting question. I have Jellyfin working perfectly in a jail on TrueNAS Core. 
The reason for my question is just out of curiosity, and I love to learn more about concepts that are alien to me.
I have several jails running in my TrueNAS Core 13 server. (qBittorrent, Plex, aMule, a Swiss army knife, and Jellyfin.)
However, only the Jellyfin jail needs the "mlock" feature enabled. No other jail requires this. (I'm simply assuming that the instructions for running Jellyfin under a FreeBSD jail are accurate, and they bluntly emphasize that mlock must be enabled.)
Apparently, this is true for any dotNET application running inside of a jail.
My question is: Why?
I vaguely understand that this allows an application to safely lock pages in physical RAM, without allowing it to be swapped to disk. (Correct me if I'm wrong.)
However, what I could not figure out, no matter where I looked online, is why dotNET specifically requires this?
What is special about dotNET applications that warrants mlock when running it under a jail, yet it's not necessary for most other applications?
If a jail's mlock feature is not enabled, and a dotNET application's virtual memory is swapped to disk/swapfile, will this crash the server or something?
The reason for my question is just out of curiosity, and I love to learn more about concepts that are alien to me.
I have several jails running in my TrueNAS Core 13 server. (qBittorrent, Plex, aMule, a Swiss army knife, and Jellyfin.)
However, only the Jellyfin jail needs the "mlock" feature enabled. No other jail requires this. (I'm simply assuming that the instructions for running Jellyfin under a FreeBSD jail are accurate, and they bluntly emphasize that mlock must be enabled.)
Apparently, this is true for any dotNET application running inside of a jail.
My question is: Why?
I vaguely understand that this allows an application to safely lock pages in physical RAM, without allowing it to be swapped to disk. (Correct me if I'm wrong.)
However, what I could not figure out, no matter where I looked online, is why dotNET specifically requires this?
What is special about dotNET applications that warrants mlock when running it under a jail, yet it's not necessary for most other applications?
If a jail's mlock feature is not enabled, and a dotNET application's virtual memory is swapped to disk/swapfile, will this crash the server or something?
Last edited: