Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    28

    (Relatively) High LMS CPU Utilisation during MP3 Playback

    Hi

    I've noticed some strange behaviour running LMS on Ubuntu 16.04 LTS on a 64bit Intel Atom based server. When transcoding 320kbps AAC streams the LMS process consumes uses less than 1% of a virtual CPU, and faad and flac consume the same between them.

    If I switch to a 320kbit/s MP3 stream, LMS consumes up to 50% of a virtual core. Obviously there's no transcoding involved, so what is using the CPU cycles?


    I forgot to add:

    Logitech Media Server Version: 7.9.0 - 1488878280 @ Wed Mar 8 14:09:34 UTC 2017

    Server HTTP Port Number: 9000
    Operating system: Debian - EN - utf8
    Platform Architecture: x86_64-linux
    Perl Version: 5.22.1 - x86_64-linux-gnu-thread-multi
    Audio::Scan: 0.95
    Database Version: DBD::SQLite 1.34_01 (sqlite 3.7.7.1)
    Total Players Recognized: 5

    Bedroom
    Player Model: Squeezebox Touch
    Player Type: fab4
    Firmware: 7.8.0-r16754
    Player IP Address: 192.168.254.67
    Player MAC Address: 00:04:20:23:65:dd
    Wireless Signal Strength: 53%

    BedroomPi
    Player Model: SqueezeLite
    Player Type: squeezelite
    Firmware: v1.8.6-957
    Player IP Address: 192.168.254.102
    Player MAC Address: b8:27:eb:c0:5a:1c

    Kitchen
    Player Model: Squeezebox Boom
    Player Type: boom
    Firmware: 57
    Player IP Address: 192.168.254.70
    Player MAC Address: 00:04:20:1e:d5:d2
    Wireless Signal Strength: 83%

    Lounge
    Player Model: Squeezebox Receiver
    Player Type: receiver
    Firmware: 77
    Player IP Address: 192.168.254.69
    Player MAC Address: 00:04:20:17:5d:45

    Office
    Player Model: Squeezebox Classic
    Player Type: squeezebox2
    Firmware: 137
    Player IP Address: 192.168.254.66
    Player MAC Address: 00:04:20:12:4b:11
    Last edited by dagadog; 2017-04-20 at 10:14. Reason: More info

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

    (Relatively) High LMS CPUUtilisation during MP3 Playback

    > If I switch to a 320kbit/s MP3 stream, LMS consumes up to 50% of a
    > virtual core. Obviously there's no transcoding involved, so what is
    > using the CPU cycles?


    Is this an online stream or local media? What task is using the CPU?
    What kind of player is involved? Syncing?


    --

    Michael

  3. #3
    Senior Member Mnyb's Avatar
    Join Date
    Feb 2006
    Location
    Vństerňs Sweden
    Posts
    16,171
    Your raspi sure it got native MP3 support ?
    --------------------------------------------------------------------
    Main hifi: Touch + CIA PS +MeridianG68J MeridianHD621 MeridianG98DH 2 x MeridianDSP5200 MeridianDSP5200HC 2 xMeridianDSP3100 +Rel Stadium 3 sub.
    Bedroom/Office: Boom
    Kitchen: Touch + powered Fostex PM0.4
    Misc use: Radio (with battery)
    iPad1 with iPengHD & SqueezePad
    (spares Touch, SB3, reciever ,controller )
    server HP proliant micro server N36L with ClearOS Linux

    http://people.xiph.org/~xiphmont/demo/neil-young.html

  4. #4
    Junior Member
    Join Date
    Oct 2009
    Posts
    28
    Quote Originally Posted by mherger View Post
    > If I switch to a 320kbit/s MP3 stream, LMS consumes up to 50% of a
    > virtual core. Obviously there's no transcoding involved, so what is
    > using the CPU cycles?


    Is this an online stream or local media? What task is using the CPU?
    What kind of player is involved? Syncing?
    Both online streams, although browsing through Shoutcast I've noticed that only certain streams exhibit the same behaviour. It doesn't happen when streaming a local MP3 file from the LMS box.






    According to htop the process using most CPU resources is:
    Code:
    /usr/bin/perl /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --charset=utf8 --norestart
    Same behaviour is observed using any of the 5 players listed in the above post, whether it is in a sync group or not, and whether other members of the sync group are on or not, and whether or not the Pi is active. (It's a Pi3 running piCorePlayer)

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

    (Relatively) High LMS CPUUtilisation during MP3 Playback

    > Both online streams, although browsing through Shoutcast I've noticed
    > that only certain streams exhibit the same behaviour. It doesn't happen
    > when streaming a local MP3 file from the LMS box.


    Are you using "proxied streaming" (see Settings/Player/Audio)?

    --

    Michael

  6. #6
    Junior Member
    Join Date
    Oct 2009
    Posts
    28
    Quote Originally Posted by mherger View Post
    > Both online streams, although browsing through Shoutcast I've noticed
    > that only certain streams exhibit the same behaviour. It doesn't happen
    > when streaming a local MP3 file from the LMS box.


    Are you using "proxied streaming" (see Settings/Player/Audio)?
    Aha that was it! Yes I was. When I switched to direct streaming CPU utilisation dropped to ~0%, and when I then sent the stream to a synchronised pair (forcing it to proxied streaming) it went back up to ~45% on a single virtual CPU.

    It still seems odd that proxying an MP3 stream to 2 devices takes more CPU than transcoding it from AAC+ to FLAC and streaming FLAC to 2 devices, but at least I know why it does that.

    PLUS
    Has something changed in the stream proxying code recently? I think this is new behavior.
    Last edited by dagadog; 2017-04-21 at 07:54.

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

    (Relatively) High LMS CPUUtilisation during MP3 Playback

    > It still seems odd that proxying an MP3 stream to 2 devices takes more
    > CPU than transcoding it from AAC+ to FLAC and streaming FLAC to 2
    > devices, but at least I know why it does that.


    Agreed. I'll look into this.


    --

    Michael

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

    (Relatively) High LMS CPUUtilisation during MP3 Playback

    > - MP3 is Audiophile Rock at http://8.38.78.173:8240/stream (High CPU,
    > no transcoding)
    > - MP3 America's Best Ballads Radio at
    > url]http://185.33.22.15:11174/[/url] (Low CPU, no transcoding)


    There must be something odd about that Audiophile Rock station: I do
    indeed see high CPU load (40-50%) on _one_ of my servers (Atom based
    Linux box), but not my dev machine (Mac Mini). But the second stream
    wouldn't load it any more than 5%, mostly around 2-3% CPU load.

    --

    Michael

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

    (Relatively) High LMS CPUUtilisation during MP3 Playback

    I played a dozen or so 320kbps stations from http://radiobit.50webs.com.
    But only the Audiophile * stations exposed this behaviour. I wonder
    whether it's some oddity in their server configuration.
    --

    Michael

  10. #10
    Junior Member
    Join Date
    Oct 2009
    Posts
    28
    Quote Originally Posted by mherger View Post
    I played a dozen or so 320kbps stations from http://radiobit.50webs.com.
    But only the Audiophile * stations exposed this behaviour. I wonder
    whether it's some oddity in their server configuration.
    Very odd.... and specific to Atom CPUs too. I'll stop worrying bout it now. Thanks for confirming.

Posting Permissions

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