mherger wrote:
> > I've been running LMS with 'updated modules / libraries '
> >
> (http://forums.slimdevices.com/showthread.php?107040-Howto-update-perl-modules-bundled-with-LMS)
> > (DBD::SQLite 1.54 (sqlite 3.13.0)) since 03/2017 on a RPi3 without
> any
> > issues.
>
> Great! Any improvements you've experienced?
>
Unfortunately, this was a new setup on new hardware, so I don't have
anything to compare it to.
>
> That's an odd one. In my previous tests this was constant. Every test I
>
> did was a massive slow down in FTS. But I always did delete the
> library.db to start from scratch for every test. Now I repeated the test
>
> for the same collection, without deleting that file, and performance was
>
> as before (plus speed up in other aspects). As if re-using a file was
> much faster than growing it from zero.
>
> I'm now running my own system at home on an oldish Intel Atom CPU with
> the latest DBD::SQLite. In this "real life" scenario with about 20k
> tracks, several plugins which use the database in some aspect
> extensively (Music And Artist!), it's about 20% faster over all, with
> FTS being pretty much the same as before.
>
I've just updated my LMS to use the latest DBD::sqlite (1.58) and could
run some benchmarks, then downgrade to 1.34 and re-run them.
The question is how to benchmark (re-scanning the library is simple, but
not really representative of normal use) - how did you measure the 20%
performance gain?
Currently, I'm using this script to simulate regular use:
Code:
--------------------
#!/bin/bash
# adjust genre_id, playlist_id, search term and URL
BCMDS='{"id":1,"method":"slim.request","params":["-", ["playlists", 0, 999]]}
{"id":1,"method":"slim.request","params":["-", ["titles", 0,
99,"tags:acCdefgGiJklnpPDqrROstTuwy"]]}
{"id":1,"method":"slim.request","params":["-", ["albums", 0,
999,"genre_id:771"]]}
{"id":1,"method":"slim.request","params":["-", ["artists", 0,
999,"genre_id:771"]]}
{"id":1,"method":"slim.request","params":["-", ["search", 0,
999,"term:Front"]]}
{"id":1,"method":"slim.request","params":["-", ["playlists", "tracks",
0, 999,"playlist_id:475485", "tags:acCdefgGiJklnpPDqrROstTuwy"]]}'
LCNT=1
TS=$(date +%s.%N)
VERBOSE=1 # 0 to get CSV values
while IFS= read -r line ; do
[ $VERBOSE -ne 0 ] && echo "running query $LCNT"
RES=$(curl -Ss -H "Content-Type: application/json" -X POST -d "${line}"
-o - "http://raspi3-64:9000/jsonrpc.js")
[ $? -ne 0 ] && echo "curl error:$? " && break
echo "$RES"|grep -q '"result":{"count":0}' && echo "No results for
$line"
LCNT=$((LCNT+1))
done <<< "$BCMDS"
TE=$(date +%s.%N)
RT=$(bc <<< "$TE-$TS")
if [ $VERBOSE -ne 0 ]; then
echo "runtime: $RT"
else
echo "$(date +'%H:%M:%S');$RT"
fi
--------------------
Running this in a loop
Code:
--------------------
while true; do ./bench-lms.sh; done
--------------------
puts 100% load on the server and should be fully DB-bound.
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=109325
_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/discuss