Explanation to high memory usage!

this may sound strange but it fixed my problem so far

i had a fresh install ubuntu server 14.04 64 ->

Samba, plex, ssh thats about it, got everything set up logged into web interface and did a media scan and my system clogged up.

service plexmediaserver x returned a strange error, actuall service x x gave the same strange error so i tried this ->

sudo kill of the plex plugin (local.media for me)

hit update library (movies) and now it seems to be running properly, have kept an eye on it for an hour (initial scan) and it hasnt gotten out of hand and i have an older system

athlon x2 4gb ram

Hi Guys

Posting this to say i am seeing the same issues

scan movies fine Memory usage gets to 70% but doesn't not lock PC

scan TV folder and memory goes to 250 % where it locks the Server and can't do a thing with and have to hard reboot (not please)

yes I agree that Linux is good at using memory but to a point and when hit with memory spikes from software that want to go Ballistics  and chew up all memory and swap space to the determent of the system 

stop fogging it of as Smoke and Mirrors on Linux (MAC users have a big problem) I have looked through the forums to find a answer to this problem to no avail ( I send many hour trying to fix this problem ) 

love what  features the program has and that is why i payed for life

yes  sudo service plex media server stop sudo service plex media server start does fix it in the short term (but like you and most other people TIME is short) I don't want anger users (ie: the wife ) screaming at me because it locked half way through her show

(i think there will be muder in my house if this not fixed ) 

I've got the same issue, Ubuntu 12.04 with 8g ram, plex  0.9.9.12.504-3e7f93c

The process taking all the memory is:

 
  plex      5801  9.9 91.9 10017976 7415900 ?    S<l  11:43   2:43 Plex Plug-in [com.plexapp.agents.localmedia] /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 0.9.9.12.504-3e7f93c /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/LocalMedia.bundle
 
Tailing the 3 plex logs, it looks like the 'Plex Media Scanner' log is the most active, seems to be updating meta for all the media.

No memory issues on Intel Nuc i3 4GB RAM, 120GB Crucial SSD, Xubuntu 14.04 Desktop, running PHT, Plex Server 0.9.9.14.531, 2TB of storage on external USB 2.0 WD Green disk (movies, mp3, photos, etc).

I am also running samba, ssh, nfs, nzbget. Have been running it for a week watching channels, movies, listening to music. Everything is very stable.

The typical memory utilization is 1.5GB out of 4GB and nothing in the 15GB swap. I have not restarted it for awhile. No wireless, the Nuc is plugged in the router.

This little Nuc can transcode 1080p material for an Android client while I am watching 1080p movie and the dual-core (4 threads) CPUs showing 85-90% utilization.

No artifacts, very good quality. Using an external USB soundcard (C-Media based Diamond Multimedia) to get optical audio to my receiver, which does not have HDMI in.

The whole setup is extremely quiet, I am glad I did not go for the more expensive i5 Nuc and more RAM. Simply unnecessary.

Has no one thought about limiting swap and only using it as a last resort to save the machine if it ever ran fully out of RAM?

By default, Linux uses a default swappiness of 60. To check your current swappiness level, run the following command:

# cat /proc/sys/vm/swappiness

Swap is a carved out disk space configured to be used as virtually memory which holds pages that are currently inactive. Naturally, disk reads are going to be slower than RAM so if you're using a swappiness level of 60, you're highly likely to start paging into Swap a lot sooner than if you have that swappiness value tuned lower.

Of course, tuning many settings in Linux is variable depending on the applications which you run and it would be in your best interest to play with things.

If I wanted to configure my server with a Swappiness value of 1, I would do the following to set it now and make it persistent upon reboots:

# sudo sysctl vm.swappiness=1
# echo "vm.swappiness = 1" >> /etc/sysctl.conf

I've done some tweaking on the kernel level system variables and such but my server can play just about anything I throw at it and have been able to have three local machines playing video while two other cell phone apps were viewing remotely. I have a very old, low end PC running Ubuntu Server:

OS: Ubuntu 12.04 (32 bit)
Kernel: 3.13.0-32-generic
RAM: 2GB
CPU: AMD Athlon(tm) 64 Processor 3500+ (2.2 GHz)
MOBO: Asus A8N-SLI DELUXE (BIOS Revision 1011 - June 2005)
Connection Type: Ethernet
Internet Speed: 22Mb/s down
Plex Version: 0.9.9.14.531-7eef8c6

Here's the output of my memory right now while streaming 6 different videos

1 smartphone running PlexApp

1 laptop running Plex Home Theatre

1 desktop running both Plex Home Theatre and the Plex via the Browser

1 XBOX streaming DLNA

Here's my current memory usage:

# free -m
             total       used       free     shared    buffers     cached
Mem:          2015       1880        134          0        161       1359
-/+ buffers/cache:        359       1656
Swap:         6143          0       6143

I have other configuration settings detailed on another Forum post:

https://forums.plex.tv/topic/112703-streaming-stuttering/

Using centos 7 and plex on different virtual machine with 1 and 2 Gb of Memory and 2vCPU, and no memory issue at all..

Same issue… RAM usage usually sits around under 5% when idle.
I recently added a large sum of movies approx. 200. and came back after to find the RAM at 80% or approx. 7GB
I restarted PMS and it went back to normal and then after about 3-5mins running its jumped back up to 7GB RAM again.

PMS version: https://hub.docker.com/r/linuxserver/plex/ v149
Machine Specs (Processor,RAM,Wired or Wireless): Underlining machine is Synology DS1817+
Approx Media Size: All media is 1080p
Media local/remote/channels?: Plex run on the NAS so local.

Please keep all Docker-related issues separate and in the Docker forum (server-docker tag not server-linux)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.