Announcement

Collapse
No announcement yet.

PCP 8.2.0 on Pi4: very slow access to LMS tab

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MAAC
    replied
    NAs Wakeup is somewhat fast. Say 30s or so.
    The output doesn't lag but takes some time to read the entire NAS.
    The NAS is also old QNAP TS412 with non-upgradeable 256Mb memory, Marvell 1.5 Mhz Processor and 4x2TB disks.

    Leave a comment:


  • paul-
    replied
    If the drive is not asleep, there should not be large delay. How long does it take for LMS to do an audio scan of the drive?

    Did you run the find command that Greg posted? The command will print everything to the screen. Where does the output lag?
    Last edited by paul-; 2022-11-20, 13:08.

    Leave a comment:


  • Paul Webster
    replied
    Originally posted by MAAC View Post
    Why is it scanning the NAS?
    There is a button on the LMS page that allows the user to remove the LMS cache plus there is functionality to ask if cache should be preserved when LMS is being removed.
    Those items change behaviour depending on whether or not LMS cache is found.

    Perhaps the pCP team can come up with a way to make it more efficient (e.g. store result in a file and recreate the file if user choose to move cache via pCP menu).

    While you wait, you could edit LMS.cgi and make it always set DISABLECACHE to "".

    Leave a comment:


  • MAAC
    replied
    The NAS is alive since I wake it to play music. Browsing and music searching works fine.
    The cache is on SD card on the RPI and not on the NAS.

    Why the hell is it scanning the NAS??
    Last edited by MAAC; 2022-11-20, 00:34.

    Leave a comment:


  • paul-
    replied
    The normal reason for being a bit slow is waiting for the NAS to wake up, if it is asleep. It’s not searching the whole drive. Max depth limits the search. And the path in LMS prefs is not the actual path, as there are symlinks that make the connection.

    If the search is really taking that long, then you have bigger issues with the NAS, I would remove the cache from that drive. Keep it on a fast local sdcard or usb stick.
    Last edited by paul-; 2022-11-19, 00:46.

    Leave a comment:


  • MAAC
    replied
    Did run the command in Putty and it took 5 or 6 minutes.

    Why is the script searching for the cache through the entire library if the cache is defined in the LMS configuration?
    You only have to follow the configured path and check if the file is there or not.

    Leave a comment:


  • Paul Webster
    replied
    Originally posted by MAAC View Post
    How do I run the command ?
    Via command line ?
    Details provided in earlier reply from pCP team member

    Leave a comment:


  • MAAC
    replied
    How do I run the command ?
    Via command line ?

    Leave a comment:


  • mherger
    replied
    PCP 8.2.0 on Pi4: very slow access to LMStab

    > No m3u.txt jpg or other files except a few albums with Pdfs with Kids
    > Albums lyrics.
    > No playlists either.
    > So, no more than 3 directories depth


    Please try to run the command provided. The three levels are down from
    the pCP's point of view.

    Leave a comment:


  • MAAC
    replied
    My music is organized like this:

    Root\Tagged files (Shared Folder)\Index Letter A,B,C ...Z
    Root\Untagged Files (Shared Folder)\Few Index letters

    Inside Index Letter

    Artist - Album\01 - Title (single artists)
    Album\Artist - Title (compilations)

    No m3u.txt jpg or other files except a few albums with Pdfs with Kids Albums lyrics.
    No playlists either.
    So, no more than 3 directories depth

    Leave a comment:


  • Greg Erskine
    replied
    Originally posted by mherger View Post
    Skimming lms.cgi (takes 5s+ here) I'm seeing this candidate:

    Code:
    # logic to activate/inactivate buttons depending upon whether LMS cache is present or not
    TMP=$(find /mnt -type d -maxdepth 3 | grep slimserver/Cache)
    If you've mounted a (slow) external drive, or a share over a slow connection (wifi) this might take a while. Even more so if you have many folders at the top level of that mount. In my case find is listing all artist folders from /mnt/music. And it takes a few seconds on a "cold" system (quicker when repeated).

    I have two systems with identical collection (541 folders in the top level), both connecting to a NAS using NFS:
    • Pi3B+, pCP, mounting a Synology DS218j: 2-3s.
    • Pi4/2GB, Raspbian, mounting a DS1517+: <1s.
    What he said. If you have a big, flat, slow directory structure it might take some time.

    Can you try just:

    Code:
    find /mnt -type d -maxdepth 3
    In the piCorePlayer Documentation there are instructions to "Access piCorePlayer via ssh".

    Leave a comment:


  • MAAC
    replied
    Would like to try but my problem is I'm a Windows user, and don't know nothing about Linux scripts.
    When I try to change files I get those permission messages errors.

    Leave a comment:


  • Paul Webster
    replied
    Why not try a a change to that file and see if it speeds things up for you?

    Leave a comment:


  • MAAC
    replied
    ... but the cache location is configured on the LMS configuration page...
    Script has only to read the config file not scanning all folders. That's my point of view.

    Leave a comment:


  • Paul Webster
    replied
    Originally posted by MAAC View Post
    I just want to load the config page. Why the hell is LMS scanning all folders?
    Michael provided a line of code from the pCP web page provider that is called when you visit that page in pCP.
    I presume that pCP is trying to determine where the cache file is so that you can move it later if needed.
    LMS is not involved in that in any way.

    Leave a comment:

Working...
X