If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

CPU Maxing out

terag1eterag1e Posts: 44Members, Plex Pass Plex Pass
edited March 27 in Linux

I have a Xeon E3-1240 processor. Ever since I installed 1.12.1.4885 com.plexapp.agents.plexmusic consumes 100% of my CPU for 20-45 minutes according to top and ps -aux. It happens approximately every 6 hours. I did not have this issue before installation of this PMS version. Where should I be looking in what logs to zero in on what setting may be causing the problem. I do have a rather large music collection, that is in the PlexPass music library format.

No other activity is occurring on the server at the time, so the maxing of the CPU is definitively coming from the agent.

Help?

«1

Answers

  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    So I tracked down at least some combination of settings that was the culprit. Under Settings, Server, Library, there is a setting to update library automatically (when changes to folders are detected) which is checked; a setting to update library periodically (every 6 hours was selected) [likely the direct cause, however, I have not added options back in that I took off yet]; generate chapter thumbnails as a scheduled task; and analyze audio tracks for loudness as a scheduled task. I don't typically play around in the settings section often. I thought at one time I had left update library periodically unchecked, but it was definitely checked. As long as the library is updated when folder changes are sensed, I am good.

    I will tinker around with adding back in the items that I unchecked or changed to absolutely determine which setting is the culprit. My suspicion is either update library every 6 hours (which is the cycle I noticed CPU 100% consumption) OR the analyze tracks for loudness as a scheduled task (or the combination of both these options). I can definitely see the possibility of running a low priority task for loudness, and then when the library goes to get updated every 6 hours, significantly strains the CPU. But we shall see.

    I'll provide another update as my experimentation continues.

  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    Soooo.. I added back in the update my libraries every 6 hours (periodically). The CPU consumption immediately went to 100%. The top task was the agent plexmusic. So I would suggest that SOMETHING is happening in the updating task having to do with music agent, that is consuming 100% of the CPU. Although this is the setting that is the cause of the problem, it would seem that library updates in the past never did this. I contend that some update in the library update procedure is the root cause. Hopefully the developers can resolve this issue in a future update.

    Although not a solution to the problem, I conclude that this can be unchecked and I will manually update the libraries (or hope the monitor folder changes routine catches it). Again, I hope the developers can dig deeper here and find out the root cause. There should be no reason the CPU consumption goes to 100% on just updating the libraries (that I can think of).

  • a1anwilliamsona1anwilliamson Posts: 3Members, Plex Pass Plex Pass

    Funny you bring this up ... my plex server is continually scanning my music (approx 30,000 tracks) collection and has happened since the last update.

    I think there is a bug they have introduced. I want to disable my music scan

  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    my experience is that disabling the music scan (include music libraries in automatic updates) will not work in preventing the pegging of the CPU. I have that disabled. When I re-enabled automatic update (every 6 hours), the CPU went to 100%. The process on my Ubuntu server was agent.music or something like that. I disabled automatic update (every 6 hours) and I will see if the monitor for folder changes catches my updates. I will know more by the end of the evening as there will be several TV episodes downloaded tonight.

    I continue to agree. I think perhaps an "unintended consequence" was introduced this last update. Hopefully the devs can track it down and correct in a soon to be beta upgrade.

  • ChuckPAChuckPA Posts: 22,245Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    Just getting back from holiday.

    Has this been resolved? If not, may I see some log files?

    Of best help to me:

    1. DEBUG logging enabled only
    2. Recreate what you're seeing with the system otherwise as quiescent as possible (nobody else using it).

    From the brief mention of Plex Music, it sounds like Plex is analyzing your music for loudness. Yes, it will spin the CPU up.
    It should only consume 50 % of the processors (NumCores / 2) .

    if you can capture some top output as well, showing physical/logical with thread counts, perfect.

    The logs I need are accessible via Settings - Server - Help - Download Logs.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    Welcome back from your vacation! I just returned as well.

    I still believe the problem exists. I have attached log files and a top grab, as well as a ps grab.

    I clicked back on check libraries periodically every 6 hours. The option to analyze audio tracks for loudness is set to run as a scheduled task (although I have also tried this without it being checked - so set to never, and the problem is replicated).

    Thanks for any help you may be able to provide.

  • JamminRJamminR Posts: 3,485Members, Plex Pass Plex Pass
    edited April 2

    @chuckpa - this seems to be a big issue with PMS 1.12.1.4885 overall.
    @sa2000 and @OttoKerner were notified in Windows too
    Reference -
    https://forums.plex.tv/discussion/315053/plex-library-constantly-scanning
    https://forums.plex.tv/discussion/315530/metadata-matching-every-scan-now
    Though I've been lucky, seems many machines slow to crawl after scan starts.

    Server - HW: I7-4790K(Haswell), 16GB - SW: Win10 Pro + PMS v1.13.0.5003
    Misc. HW: HDHR Extend + 2TB RAID1(Intel Z87) + 4x4TB RAID5(QNAP TS-653Pro)
    Shares - From: 2  - To: 18(5) - Potential lifetime PlexPass data generating product customer!
    ISP: ~20mbps up/1TB monthly "cap" - (Monthly avg. xfer ~450gb)
    Search the Plex WIKI before asking silly questions.
    Plex stuff I favor - Tautulli - UASv3 - PlexEmail - FMoviesPlus
  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    Although what I have highlighted here as my issue is not the experience that Kyle Verry specifies as libraries constantly scanning preventing other library scans, but does have in common the high CPU load. As such I have downgraded to 1.12.0.4829. I re-initiated Check Library periodically every 6 hours, which instantly created the 100% CPU loading in version 1.12.1.4885. The CPU has not pegged up since doing the downgrade. I will check the CPU graph in the morning to see what the load does through a couple of 6 hour library refreshes.

    Feel free to use me as a guinea pig as long as it doesn't hose my existing libraries, or the user db of watched and position. I have two servers set up, currently one with each version. As I highlighted, I am able to at least get a functional Plex Server by unchecking the Check Library periodically (and then manually refresh the libraries periodically myself - an unwanted solution to be certain).

    I will keep my eye open for the next server update to see if that resolves the issue as well.

  • ChuckPAChuckPA Posts: 22,245Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    @JamminR

    Guess it's good I took holiday when I did? :D

    @terag1e

    Thanks for the info. I see "Plex Script Host" (an agent) running crazy.

    While SA2000 goes through his methodology, Let me ask: Do you have any plug-ins installed? Anything less than 100% stock config with your PMS?

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    yes. I have ABC, CBS, NBC, FOX, and WebTools. I am less than impressed with most of these, so I can certainly uninstall (delete the .bundle). And yes, that agent is the same one every time that seems to be going wild.

    No other plugins (that I know of) than those listed. Those appear on the Plugins page.

  • ChuckPAChuckPA Posts: 22,245Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    Care to give a shot at ?

    1. Remove the ABC, CBS, NBC, and Fox plug-ins (uninstall)
    2. Manually dive down into the Plug-ins directory and rename WebTools.bundle to WebTools.bundle.NotYet :)
    3. Restart PMS
    4. Kick the tires really hard

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    I will do that, but likely in a couple of hours. I will post back what my results are. It's pretty easy to do since I know checking the Library periodically every six hours, in my case, has always set the issue off (CPU maxxing).

    On a related note, my downgrading to 1.12.0.4829 showed a spike at 2AM in CPU, but not every 6 hours leading up to or since. My experience prior to the last upgrade is I would always see a short spike at 2AM every day, presumably the maintenance task and associated additional tasks to run with the maintenance cycle. Also that spike only lasted a few minutes, not the 30-45 minutes every 6 hours noted with the last upgrade.

  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    I had mentioned earlier that my problem did not appear to be similar in nature to Kyle Verry (constant updating/scanning music library). Indeed I do not get the rotating circle by the library, but I do get lots of notifications at the bottom of the plex screen (downloading metadata for xxx, scan complete for xxx, etc), so maybe it is more similar than I first gave it credit.

    I clicked on update library periodically every six hours, and the cpu maxxed again. Once the process completed, I removed the plugins, renamed WebTools as instructed. Restarted the server. Unchecked the update my library periodically every 6 hours, saved settings, waited. Checked CPU usage, low. Rechecked the option, waited. Checked CPU usage, now pegged again. plexapps.agents.plexmusic is the all consuming task once again.

    My evaluation of this exercise - the plugins were not the problem.

  • ChuckPAChuckPA Posts: 22,245Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    CPU Spike at 2am = Nightly maintenance (Scheduled Tasks) == Doesn't count :)

    I don't use periodic scan and don't see the issue.

    This said, possible workaround? Use on-demand scanning "When changes detected" ?

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    That is how I have remedied once I discovered the issue. Unchecking the periodically update library solves the problem or at least prevents the CPU maxxing out. I still believe the problem is there even with removing that option. But if that is THE answer, why not just remove the periodically update libraries? It must be there for some reason!

    On a side note, the option to update libraries (partial scan) when folder changes are detected, doesn't seem to always be reliable for me. It may be because the drives go to sleep after one hour, but I would have thought that was enough time to detect a folder change. Do Library updates happen on the maintenance schedule if folder changes are not detected earlier throughout the day?

  • ChuckPAChuckPA Posts: 22,245Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    Partial scan works for locally mounted devices. The default table size is only 8192 directories and easily overflowed.. It's also easily increased.

    If you're getting partial reliability, it's usually because the iNotify table is filling. Increasing the table size fixes that.. No reboot required

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    it's not a local drive. it's a network drive (NAS) and mounted through fstab. perhaps my partial reliability may have actually been the periodically update libraries. if so, I certainly hope that process can live without the CPU maxxing issue. it works in 1.12.0.4829 like that. I am pretty certain I had success in the past with growl notifications to the plex server triggering an update of the library. But those are work-arounds. I'll hold out hope for a future fix!

  • ChuckPAChuckPA Posts: 22,245Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    I've been told they're working on it now.

    If you have a copy of 1.12.0, i suggest going back to that version.

    Another temporary workaround: Manually invoke the scanner , one section at a time. You can then avoid the problematic section(s)

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • terag1eterag1e Posts: 44Members, Plex Pass Plex Pass

    I can confirm that the most recent update 1.12.2.4929 still has this issue. I did manually start a scan on the music library, but it immediately went to max CPU. I will see if it auto starts at the next 6 hour periodic library update and maxes out the CPU then.

  • ChuckPAChuckPA Posts: 22,245Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    Ok. then unfortunately you'll need to back down to 1.12.0 (if you have it) until they get it fixed.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
«1
Sign In or Register to comment.