If You Run Plex on Linux...
-
Ok, so I've found a really handy command for my fellow Linux users. I run my Plex server on a Ubuntu Server 14.04 LTS server. It works great, but I've only allocated 2GB of RAM to the VM. That is fine but I've noticed that sometimes after watching a show or after it's been running a while and I've used it at all, the memory usage is unusually high, often around 1.5+GB being used out of the 2 total. Well, I figured it's just a caching issue. Turns out that was the case. So what I did was I found a command to clear out all the buffers and cache on the server.
echo 3 > /proc/sys/vm/drop_caches
That is meant to be run as root, else you would run...
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
I have set this up as a cron job in crontab by running this:
sudo crontab -e 0 */6 * * * echo 3 > /proc/sys/vm/drop_caches
This runs the command every 6 hours on my server at the turn of the hour, so midnight, 6AM, noon, and 6PM. I've become a huge fan of cron jobs!
Thought I'd pass this along to the rest of you. Hope it helps!
Thanks,
A.J. -
@thanksaj Nice!
I run Plex on Linux and have noticed that performance will decrease over time. Never really dug into it. I'll do this tonight I'm sure it will make my kids happy!
-
@Rob-Dunn Yup, I hope it helps!