Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Jul 2010
    Location
    Paris, France
    Posts
    145

    LMS memory and CPU usage on RPI 3

    Hi all,
    I've got LMS (last version) installed on a raspberry pi 3, with trackstat (all Erland's plugins) and MusicIP (via qemu).
    I've got nothing else running on that RPi.
    My collection is on a USB drive plugged on the RPI and is about 17k tracks. I've got 2 squeezebox and 1 radio, and 1 squeezelite player, but they usually are not playing all at the same time.
    It works fine most of the time, except that it's a bit slow, particularly when I change a trackstat rating. Then, it takes more than 10 seconds and during that time it continues playing but I can't do anything, even changing volume level on a SB.
    Plus, I'm surprised that it seems to use a lot of memory : physical memory (1G) is usually nearly full (about 900 mb used) and it also uses some swap space (about 100 mb) stored on the OS SD card.
    Previously, I had LMS running on a fast powerful PC, so I didn't care about these details, but on a RPI, it's not the same.
    I'm not very experienced about the raspberry, although I know linux rather well.
    What could I do to speed up LMS ?
    Is it normal that LMS uses so much memory ? Should I remove the swap ? maybe it slows down LMS, while the physical memory is used by the OS as a buffer.

    My raspberry 3, after 13 months of usage, has recently died, so I'm asking myself if I'm going to buy a new one or going to something else.
    Thanks a lot
    Antonio
    LMS 7.9.0
    on Linux Mageia 5 and RPI 3
    1 SB3, 2 radio, 1 touch
    Plugins : Trackstat, Smartmix, MusicIP, ...

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,779

    LMS memory and CPU usage onRPI 3

    > Plus, I'm surprised that it seems to use a lot of memory : physical
    > memory (1G) is usually nearly full (about 900 mb used) and it also uses
    > some swap space (about 100 mb) stored on the OS SD card.


    Which process is using the most memory? You're running QEMU to run a
    Java application. I bet this is eating quite a bit of it.

    Try to strip down your installation to a minimum. No Erland plugins. No
    MusicIP. etc. Check results. Then add them back one by one. After every
    addition check memory usage again.

    --

    Michael

  3. #3
    Senior Member
    Join Date
    Jul 2010
    Location
    Paris, France
    Posts
    145
    Quote Originally Posted by mherger View Post
    > Plus, I'm surprised that it seems to use a lot of memory : physical
    > memory (1G) is usually nearly full (about 900 mb used) and it also uses
    > some swap space (about 100 mb) stored on the OS SD card.


    Which process is using the most memory? You're running QEMU to run a
    Java application. I bet this is eating quite a bit of it.

    Try to strip down your installation to a minimum. No Erland plugins. No
    MusicIP. etc. Check results. Then add them back one by one. After every
    addition check memory usage again.

    --

    Michael
    Hi Michael,
    Thanks for your advice, I'll try this and give feedback.
    Regards
    Antonio
    LMS 7.9.0
    on Linux Mageia 5 and RPI 3
    1 SB3, 2 radio, 1 touch
    Plugins : Trackstat, Smartmix, MusicIP, ...

  4. #4
    Senior Member sbp's Avatar
    Join Date
    Apr 2010
    Location
    Denmark
    Posts
    1,087
    Hi .

    Here you see my results of using LMS on a RPi3 running piCorePlayer as a LMS-server only.

    It has an uptime of 151 days - and still no problems:
    Name:  uptime.JPG
Views: 244
Size:  57.6 KB

    Here is the free memory :
    Code:
    tc@piCorePlayer:~$ free -m
                 total       used       free     shared    buffers     cached
    Mem:           925        732        193          9         22        524
    -/+ buffers/cache:        185        739
    Swap:          222         19        202

    Using this command you can break down the memory usage and see how much RAM is used for each program:

    Code:
    ps -e -o pid,vsz,comm= | sort -n -k 2
    Code:
    PID   VSZ
     4072  20m nmbd
     4065  29m smbd-notifyd
     4066  29m cleanupd
     4064  30m smbd
     4069  30m lpqd
    19003 107m slimserver.pl
     1086 1988 busybox-httpd
     2162 2104 udevd
     2165 2124 udevd
      137 2128 udevd
        1 3060 init
     1035 3060 udhcpc
    23022 3060 sh
    23057 3060 ps
    23058 3060 sort
      817 3188 crond
      857 3188 sh
    23027 3188 sh
    23023 4160 sftp-server
     1072 4812 sshd
    23020 4812 sshd
    23024 4812 sshd
    So you can see that LMS is only using around 107 mb of the RAM. Samba and file sharing are each using around 30 mb.
    All in all I don't think the memory consumption by LMS is too high.
    Last edited by sbp; 2017-06-15 at 12:38.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://sites.google.com/site/picoreplayer/home

    Please donate if you like the piCorePlayer

  5. #5
    Senior Member
    Join Date
    Jul 2010
    Location
    Paris, France
    Posts
    145
    Thank you,
    That will help me in my investigations !
    Regards
    Antonio
    LMS 7.9.0
    on Linux Mageia 5 and RPI 3
    1 SB3, 2 radio, 1 touch
    Plugins : Trackstat, Smartmix, MusicIP, ...

  6. #6
    Junior Member
    Join Date
    Jan 2012
    Posts
    27

    qemu and musicip memory leakage

    Quote Originally Posted by Antoniop View Post
    Thank you,
    That will help me in my investigations !
    Regards
    Antonio
    Hi Antonio,
    this thread reminds me that I forgot to post some long-term experience about quemu emulation for musicip.
    Basically it seems that there is some memory leakage and after some weaks you run out of memory.
    The solution is pretty simple: restart the MusicIp-Qemu emulation every night via a cronjob. This has been working for me now for more than 6 months without further side effects (assuming that there is a time at night when you do not use MusicIP).
    I will post instructions at my original post when I am back from my travels.
    Best,
    Frank

  7. #7
    Senior Member
    Join Date
    Jul 2010
    Location
    Paris, France
    Posts
    145
    Quote Originally Posted by frankd View Post
    Hi Antonio,
    this thread reminds me that I forgot to post some long-term experience about quemu emulation for musicip.
    Basically it seems that there is some memory leakage and after some weaks you run out of memory.
    The solution is pretty simple: restart the MusicIp-Qemu emulation every night via a cronjob. This has been working for me now for more than 6 months without further side effects (assuming that there is a time at night when you do not use MusicIP).
    I will post instructions at my original post when I am back from my travels.
    Best,
    Frank
    Hi Frank,
    Thanks a lot for the information. I'm not very surprised. As I told you, I sometimes have crashes during scanning. The solution I found is to stop the mmserver, scan the library, restart mmserver and run a scan again. The second scan is always faster than the first one and this way usually doesn't crashes.
    Restart musicip every day is not very elegant but seems a better solution
    My raspberry has just regained life, actually it was the usb drive enclosure that was dead, not the raspberry, so I'll try the various suggestions.
    Thanks a lot
    Antonio
    LMS 7.9.0
    on Linux Mageia 5 and RPI 3
    1 SB3, 2 radio, 1 touch
    Plugins : Trackstat, Smartmix, MusicIP, ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •