Bugzilla – Bug 3050
Random Mix uses too much resources
Last modified: 2008-09-15 14:39:24 UTC
When I use Random Mix it takes about 15-20 seconds to make a mix and the music to start playing. Quite long I think. Also, when going to the next song in the random mix, either by skip or just because the end of the previous song has reached, there is often a break for a couple seconds in the sound after the song has played for about 10 seconds or so. This seems to be because the buffer has run out (the time stays at 0:00, also buffer fullness stays a 0%). This seems to be due to the fact that Slimserver needs a lot of resources to find the next song in the random mix. My CPU usage nor memory usage tops out. This happens with both the Squeezebox and SoftSqueeze. When I select stop adding songs the songs run smooth again. I don't know a solution for the first one (other then making the queries to the database less complicated, for example, an option to select all genres, instead of handpicking them, which would make it easier to find a random song). For the second problem, maybe Slimserver should not try to find the next song for the mix right away, but wait a couple of seconds for the buffer of Squeezebox to fill up, and then start queriyng the database. Using: SlimServer Version: 6.2.2 - 6200 - Windows 2000 - EN - cp1252 with MySQL My PC is an AMD Athlon XP 1150MHz CPU with 512+256=768M of memory
max, my guess is that this is a repeat of what has been said in bug 2551...?
This certainly isn't a dupe of #2551, which deals with songs being played twice in the same mix. It does mention http://forums.slimdevices.com/showthread.php?t=20771 though, which seems relevant here.
Not sure what to think of the replies. This seems to be fixed in 6.5? Can I download the plugin separately, ie. use the 6.5 plugin with 6.2.2? Maybe I should have split it in two bugs: 1. Random Mix takes a long time to get going... 2. During Random Mix music stops playing after about 10 seconds Though I think they are due to the same problem: my PC is apparently too slow to select a random song from the database. Both slim.exe and mysqld-nt.exe seem to be cranking away during the process (although CPU use barely gets to 100%) A solution for number one would be to make an option to select 'All genres', so that the query to the database would be a lot simpler. A solution for number two would be if the Random Mix plugin doesn't look for a new song for the mix right away after the next song started, but would wait until the buffer has filled up.
Actually, when startin a new mix, not really slim.exe and the mysql daemon do the work, but the hard disk is being heavily accessed by the sound of it.
I actually might have solved this one. I started tweaking the settings of Mysql Server. I changed it from a 'Developer Machine' to a 'Server Machine', and probably changed some other settings to give MySQL more memory and give the process higher priority. This seems to have helped in getting rid of the breaks. Still though, to me it seems that my PC has to work too hard to just create a simple random mix.
I'm going to close this bug for now, since it seems you have a handle on it. 6.5 will ship with MySQL as the back end, and the split-scanner branch already has an version of Random Mix that is more optimized than trunk.