Re: [SlimDevices: SqueezeCenter] LSM 7.9.1 Nightly on RPi3--LMS server unresponsive to connections

2018-02-15 Thread pinkdot

gstalnaker wrote: 
> II didn't want to kill the library scan by restarting LMS.
Why not? At least you can tell if the high cpu usage is caused by the
scanning process. Make some changes in the LMS settings and continu the
scanning ?



-LMS on Raspian Stretch -> 2x Radio
-RPI 3 ('Mopidy' (https://www.mopidy.com/)),  Aune S6 - Exposure 3010S2
- PMC FB1i

pinkdot's Profile: http://forums.slimdevices.com/member.php?userid=34644
View this thread: http://forums.slimdevices.com/showthread.php?t=108720

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] LSM 7.9.1 Nightly on RPi3--LMS server unresponsive to connections

2018-02-15 Thread gstalnaker

I did not "know" about the full text search until I did some more
digging. I may do that. I also learned about cgroups as part of my
research. cpulimit is really for already running processes, which is why
I tried using that. I didn't want to kill the library scan by restarting
LMS.

Roland0 wrote: 
> Try disabling the full text search plugin.
> If you want to limit cpu, use 'cgroups'
> (http://www.fernandoalmeida.net/blog/how-to-limit-cpu-and-memory-usage-with-cgroups-on-debian-ubuntu/)



gstalnaker's Profile: http://forums.slimdevices.com/member.php?userid=63504
View this thread: http://forums.slimdevices.com/showthread.php?t=108720

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] LSM 7.9.1 Nightly on RPi3--LMS server unresponsive to connections

2018-02-15 Thread Roland0

Try disabling the full text search plugin.
If you want to limit cpu, use 'cgroups'
(http://www.fernandoalmeida.net/blog/how-to-limit-cpu-and-memory-usage-with-cgroups-on-debian-ubuntu/)



SW: 'Web UI for LMS'
(http://forums.slimdevices.com/showthread.php?98186-Announce-Alternative-Web-Interface-(beta))
| 'Playlist Editor / Generator'
(http://forums.slimdevices.com/showthread.php?108199-Announce-LMS-Playlist-Editor)
| 'Music Classification'
(http://forums.slimdevices.com/showthread.php?108278-Announce-Essentia-Integration-music-classification-(moods-genres-))
| 'Similar Music'
(http://forums.slimdevices.com/showthread.php?108495-Announce-LMSmusly-play-similar-music)
| 'LMSlib2go' (https://www.nexus0.net/pub/sw/lmslib2go/)
HowTos: 'build a self-contained LMS'
(http://forums.slimdevices.com/showthread.php?99648-Howto-build-a-self-contained-LMS)
| 'Ogg Opus'
(http://forums.slimdevices.com/showthread.php?107011-Howto-play-Ogg-Opus-files)
| 'Bluetooth/ALSA'
(http://forums.slimdevices.com/showthread.php?107230-Howto-Bluetooth-streaming-to-from-LMS-(ALSA-only-no-PulseAudio))

Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=108720

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] LSM 7.9.1 Nightly on RPi3--LMS server unresponsive to connections

2018-02-15 Thread DJanGo

gstalnaker wrote: 
> Putting the scanning process, which has been "building the index" for 95
> minutes now, on 50% CPU and renicing it back to 0, and putting the main
> LMS to 80% CPU has not made connecting to LMS possible :-)
Why didnt you use the builtin performance settings from lms instead of
hacking some temporary args?



DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=108720

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] LSM 7.9.1 Nightly on RPi3--LMS server unresponsive to connections

2018-02-14 Thread gstalnaker

Putting the scanning process, which has been "building the index" for 95
minutes now, on 50% CPU and renicing it back to 0, and putting the main
LMS to 80% CPU has not made connecting to LMS possible :-)



gstalnaker's Profile: http://forums.slimdevices.com/member.php?userid=63504
View this thread: http://forums.slimdevices.com/showthread.php?t=108720

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] LSM 7.9.1 Nightly on RPi3--LMS server unresponsive to connections

2018-02-14 Thread gstalnaker

https://www.tecmint.com/limit-cpu-usage-of-a-process-in-linux-with-cpulimit-tool/

Can be used to modify CPU usage of a *running* process. Can only be used
from a terminal session. Is not permanent. But if you encounter a
situation like mine where LMS is basically useless, you can affect how
LSM and the scanner process use CPU, memory (using ulimit) and priority
(using renice).

I may never using the LMS web ui Scan/Recan options again and just run
scanning from a terminal session so I can use these tools.



gstalnaker's Profile: http://forums.slimdevices.com/member.php?userid=63504
View this thread: http://forums.slimdevices.com/showthread.php?t=108720

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] LSM 7.9.1 Nightly on RPi3--LMS server unresponsive to connections

2018-02-14 Thread gstalnaker

While renice does modify the priority it does not modify CPU use. And
though I was able to connect to the LMS web UI after its CPU use fell,
the minute I clicked on anything in the UI to "show" content, its CPU
shot back up to 100% and now I cannot connect again.

So it's not just priority. On a RPi3 running the latest Raspbian and the
latest LMS nightly with Perl 5.24.x etc. The scanning "build index"
process effectively renders LSM unusable.

Back to my original question -- how can this be fixed? Or can it?



gstalnaker's Profile: http://forums.slimdevices.com/member.php?userid=63504
View this thread: http://forums.slimdevices.com/showthread.php?t=108720

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] LSM 7.9.1 Nightly on RPi3--LMS server unresponsive to connections

2018-02-14 Thread gstalnaker

One can use at the CLI:

#> ps -ef | grep squee

to see list of the processes that include "squee" which will show the
primary LMS processes and the Scanning process if running. Note the
Proccess ID (PID) of the scanning process. In my output from earlier:

squeeze+ *1480* 396 34 00:16 ? 00:29:53 /usr/bin/perl
/usr/sbin/squeezeboxserver-scanner
--logconfig=/var/lib/squeezeboxserver/prefs/log.conf
--logdir=/var/log/squeezeboxserver/ --priority=0 --novideo --noimage
--prefsdir=/var/lib/squeezeboxserver/prefs --wipe --debug
scan=ERROR,database.info=ERROR,scan.auto=DEBUG,art
work=ERROR,scan.import=ERROR,scan.scanner=ERROR

Renice uses this format:

#> renice  -p 

Default niceness value is 0, 1-19 is REMOVING priority. -1 to -20 is
INCREASING process priority. I did

#> renice 15 -p 1480

And using top I can clearly see that the new Nice value and, within 60
seconds I also saw that the primary LMS process stopped using 100% CPU
and I can now connect to it:

top - 02:33:32 up  3:12,  6 users,  load average: 1.04, 1.24, 1.61
Tasks: 143 total,   2 running, 141 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.6 us,  2.2 sy, 23.0 ni, 74.2 id,  0.0 wa,  0.0 hi,  0.0 si, 
0.0 st
KiB Mem :   949580 total,26196 free,   297584 used,   625800
buff/cache
KiB Swap:   102396 total,98372 free, 4024 used.   573788 avail
Mem 

PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+
COMMAND
*1480 squeeze+  35  15  131924 126508   9800 R 100.0 13.3  81:07.40
perl *  
396 squeeze+  20   0  142060 135456   9756 S   2.0 14.3  80:21.71
squeezeboxserve
1868 pi20   08536   3440   2868 R   1.0  0.4   0:04.42 top 

1434 root  20   0   12548  10768   4240 S   0.7  1.1   0:52.48
squeezelite-arm  

So, the better question is how I can get LMS to use such a niceness
value by default?



gstalnaker's Profile: http://forums.slimdevices.com/member.php?userid=63504
View this thread: http://forums.slimdevices.com/showthread.php?t=108720

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


[SlimDevices: SqueezeCenter] LSM 7.9.1 Nightly on RPi3--LMS server unresponsive to connections

2018-02-14 Thread gstalnaker

The system is functional. I have connectivity via ssh right now (where
some of the following comes from) and can see SqueezeBox* processes
running:

lms_raspberrypi% ps -ef |grep squee
squeeze+   385 1  0 Feb14 ?00:00:00 /bin/bash
/usr/sbin/squeezeboxserver_safe /usr/sbin/squeezeboxserver --prefsdir
/var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/
--cachedir /var/lib/squeezeboxserver/cache --charset=utf8
squeeze+   396   385 26 Feb14 ?00:37:11 /usr/bin/perl
/usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs
--logdir /var/log/squeezeboxserver/ --cachedir
/var/lib/squeezeboxserver/cache --charset=utf8
root  1434 1  0 00:14 ?00:00:31
/usr/bin/squeezelite-armv6hf -o hw:CARD=sndrpihifiberry,DEV=0 -n
SqueezeLite-RPi3 -m b8 27 eb 5d 40 b7 -s 127.0.0.1 -P
/var/run/squeezelite-armv6hf.pid -z
squeeze+  1480   396 34 00:16 ?00:29:53 /usr/bin/perl
/usr/sbin/squeezeboxserver-scanner
--logconfig=/var/lib/squeezeboxserver/prefs/log.conf
--logdir=/var/log/squeezeboxserver/ --priority=0 --novideo --noimage
--prefsdir=/var/lib/squeezeboxserver/prefs --wipe --debug
scan=ERROR,database.info=ERROR,scan.auto=DEBUG,artwork=ERROR,scan.import=ERROR,scan.scanner=ERROR
pi1794  1764  0 01:41 pts/600:00:00 grep squee

I can see LMS listening on port 9000:

squeezebo  396 squeezeboxserver7u  IPv4   8103  0t0  UDP *:3483

squeezebo  396 squeezeboxserver8u  IPv4   8104  0t0  TCP *:3483
(LISTEN)
squeezebo  396 squeezeboxserver   23u  IPv4  10767  0t0  TCP *:9090
(LISTEN)
squeezebo  396 squeezeboxserver   25u  IPv4  10768  0t0  UDP *:49265

squeezebo  396 squeezeboxserver   27u  IPv4  10773  0t0  TCP *:9000
(LISTEN)
squeezebo  396 squeezeboxserver   29u  IPv4  17679  0t0  TCP
localhost:3483->localhost:55512 (CLOSE_WAIT)
squeezebo  396 squeezeboxserver   30u  IPv4  10776  0t0  TCP
lms_raspberrypi:3483->SqueezeboxRadio:52826 (CLOSE_WAIT)
squeezebo  396 squeezeboxserver   31u  IPv4  10779  0t0  TCP
lms_raspberrypi:9000->SqueezeboxRadio:43486 (CLOSE_WAIT)
squeezebo  396 squeezeboxserver   32u  IPv4  18249  0t0  TCP
lms_raspberrypi:9000->SAMSUNG-SM-G920V:53471 (CLOSE_WAIT)
squeezebo  396 squeezeboxserver   33u  IPv4  18250  0t0  TCP
lms_raspberrypi:9000->SAMSUNG-SM-G920V:53473 (CLOSE_WAIT)
squeezebo  396 squeezeboxserver   34u  IPv4  18252  0t0  TCP
lms_raspberrypi:9000->SAMSUNG-SM-G920V:53475 (CLOSE_WAIT)
squeezebo  396 squeezeboxserver   41u  IPv4  18253  0t0  TCP
lms_raspberrypi:9000->SAMSUNG-SM-G920V:53476 (CLOSE_WAIT)
squeezebo  396 squeezeboxserver   42u  IPv4  18254  0t0  TCP
lms_raspberrypi:9000->SAMSUNG-SM-G920V:53477 (CLOSE_WAIT)
squeezebo  396 squeezeboxserver   44u  IPv4  18261  0t0  TCP
lms_raspberrypi:9000->SAMSUNG-SM-G920V:53479 (CLOSE_WAIT)
squeezebo  396 squeezeboxserver   45u  IPv4  18256  0t0  TCP
lms_raspberrypi:9000->SAMSUNG-SM-G920V:53478 (CLOSE_WAIT)

But I cannot connect to the web UI in a browser or connect to LMS with
AndroidOS apps like SqueezeController or SqueezeCommender, they time
out. Nor can I connect my SB Classic -- says it "cannot connect to
server."

I'm logged into a SSH session. Networking is good. As you can see above,
processes are running. But, I also see in top:

top - 01:54:06 up  2:32,  6 users,  load average: 2.00, 2.02, 2.09
Tasks: 142 total,   3 running, 139 sleeping,   0 stopped,   0 zombie
%Cpu(s): 44.3 us,  6.0 sy,  0.0 ni, 49.6 id,  0.0 wa,  0.0 hi,  0.0 si, 
0.0 st
KiB Mem :   949580 total,39776 free,   298236 used,   611568
buff/cache
KiB Swap:   102396 total,98712 free, 3684 used.   572944 avail
Mem 

PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+
COMMAND
396 squeeze+  20   0  134924 128312   7644 R 100.0 13.5  49:26.40
squeezeboxserve
1480 squeeze+  20   0  129052 123696   9608 R  99.7 13.0  41:48.32 perl

1434 root  20   0   12548  10768   4240 S   0.7  1.1   0:36.93
squeezelite-arm
1806 pi20   08536   3252   2680 R   0.7  0.3   0:00.12 top 


The two LMS processes squeezeboxserve and perl are consuming a lot of
resources. So much so that, I think, LMS will not respond to connection
requests.

This is a new install and I know LMS is scanning my NAS-located library.
The NAS is mounted using this entry in /etc/fstab:

//nas326/WD-My-Passport-0827-1012 /media/nas326_music cifs
username=,password=,sec=ntlm,iocharset=utf8 0 0

How can I fix this? It's not very useful if everytime time I add music
to my admittedly VERY large library (50,000 tracks) LMS cannot be used
until the library scan concludes.



gstalnaker's Profile: http://forums.slimdevices.com/member.php?userid=63504
View this thread: http://forums.slimdevices.com/showthread.php?t=108720

___