PDA

View Full Version : Slimserver performance tuning tips



Klaus
2006-07-02, 03:56
Hello

I have a collection of nearly 50'000 songs in flac. i have stored those on multiple maxtor onetouch 3 drives. the slimserver itself i have installed on a Via EPIA ME6000 with 1GB ram. OS is windows. everything works fine, streaming from the internet, listening to the flac files etc. but the main issue is the performance of searching and brwosing the music on the website. this is quite slow. I also tried to use the my-sql server instead of sqllite, but didn't find any performance boosts with this change. i had also installed installed fedora core, hopeing, this will boost the system, but about the same speed.

question, are there any settings which will make this besser? is maybe the 6.5alpha faster? or any ideas what to do?

thanks for your feedback

funkstar
2006-07-02, 05:00
i think most of it is down to the 600mhz EPIA you are using as a server to be honest, there is only so much a box like that can do.

Michaelwagner
2006-07-02, 07:52
The onetouches are USB drives, right?

Does the motherboard (I don't know this one in detail) support USB 1 or USB 2?

When you say, the performance problem is browsing the music, do you mean using the "Browse Music Folder" function of the web interface?

If so, that is actually going back to the hard disk and not using the cache.

There is an enhancement request on this topic you can vote for if that's what you're doing. Ask and I'll look it up for you.

JJZolx
2006-07-02, 10:42
i think most of it is down to the 600mhz EPIA you are using as a server to be honest, there is only so much a box like that can do.
I think that's pretty much the long and short of it. I expect scanning to be quicker in 6.5, but I doubt that searching and browsing will be significantly faster.

Using USB drives will only really affect the scanning speed. Scanning will generally be faster if the drives are attached via IDE or SATA, but it may be not be a significant bottleneck in the current setup given the CPU speed.

You need more horsepower in the server.

Michaelwagner
2006-07-02, 10:55
Sorry, Jim, I don't agree.

If he is using the Browse Music Folder option, USB drive performance does matter, because BMF bypasses the cache and goes back to the disk again.

JJZolx
2006-07-02, 11:07
Sorry, Jim, I don't agree.

If he is using the Browse Music Folder option, USB drive performance does matter, because BMF bypasses the cache and goes back to the disk again.
My bad. You're correct about BMF.

Browse Music Folder still uses the database for what it displays in the web and remote interfaces. But, yes, it does recheck the disk directories to look for new files.

SadGamerGeek
2006-07-02, 12:20
i think most of it is down to the 600mhz EPIA you are using as a server to be honest, there is only so much a box like that can do.

I have also posted a new thread about web performance. I'm getting considerable delays with my 60,000 tracks held on an internal IDE drive in a 1Ghz Epia based system with 500MB of RAM (Fedora Linux).

I'm afraid I really can't understand why 600Mhz with 1GB of RAM should be seen as such a limiting factor (especially if you consider Klaus has tried it with Fedora, so the OS shouldn't be taking too much power.

I have another media server. It is a Linksys NSLU2 running "Twonkyvision" (serving Music, Video & Photos). It runs a cut down Linux on a custom processor running at 266Mhz with a tiny 32MB of RAM. It also has a web interface that will search & list music by Genre/Album/Artist etc. I run this with exactly the same set of music files (on an external USB disk, so a slower connection). The thing that amazes me is that the web front end to this returns a list of tracks/albums/ etc almost instantaneously, running on a box with a fraction of the power of Klaus' or my servers. I realise that SlimServer does many things that Twonky doesn't, but when all I'm asking it to do is list some songs on a web page (nothing else running - not even any Squeezeboxes), what reason can there be for it taking so long (between 80 & 200 seconds to complete "All Songs")?

I bought my Epia server specificaly to run SlimServer. As it was such a massive step up in performance from that used for my previous media server, I felt sure that I'd get excellent response times......

I can't help feeling there must be room for some fairly major performance tweaks rather than just having to throw more processing power at the problem.

oreillymj
2006-07-02, 12:50
I'm assuming your Server->Performance settings have

Database Temporary File Tuning (SQLite) set to "Use RAM" and

Database Cache Size Tuning (SQLite) set to 10,000

Don't set this too high on a system with only 512mb of RAM as Windows will only end up using virtual memory more of the time if you have too much physical memory reserved as a Db cache.

I'm not too familiar with the Web-server within Slimserver, but I'd say that Apache probably has better page caching.
The results of Artists beginning A query for example will not change between rescans and could be cached once the query runs once.

The best web app server I've ever used was Coldfusion by Allaire. They were bought by Macromedia, now Adobe. You could do some sophisticated Db query caching which would speed up Db queries by >10X.

Klaus
2006-07-02, 22:53
first of all, thanks for all your replies. here some answers.

>Database Temporary File Tuning (SQLite) set to "Use RAM" and
>Database Cache Size Tuning (SQLite) set to 10,000

yes, I have USE RAM, and even if i SET to 200'000 Cache size, there is still just 280MB memory used. so there is plenty of free cache. I browse the library using the web interface, just clicking browse by album, or artist. already loading the first page takes something like 5 second, then loading the first of e.g artists can take up to 10 seconds... I see, that the CPU is running 100%, perl.exe is using all the power.

yes, the EPIA supports USB 2.0. but when browsing the library, it doesn't access the drives at all. they stay on standby untill i select a song from the drive. so I don't think there are any speed issues with this.

when I had installed the 6.1.x on the fedore, i started checking the queries that where done, and sometimes i think, there are some really bad queries inside, that consume a lot of cpu to get out the data. but I really can't remember that, but maybe I have to give a look to this, and post the queries here. maybe is there a simple debug way to print out all queries when using the webpage?

but anyway, as SadGamerGeek mentioned, i also think the issue is when you have big libraries, I also can try to load just maybe 1000 songs, and check then the performance.

JJZolx
2006-07-02, 23:31
when I had installed the 6.1.x on the fedore, i started checking the queries that where done, and sometimes i think, there are some really bad queries inside, that consume a lot of cpu to get out the data. but I really can't remember that, but maybe I have to give a look to this, and post the queries here. maybe is there a simple debug way to print out all queries when using the webpage?

but anyway, as SadGamerGeek mentioned, i also think the issue is when you have big libraries, I also can try to load just maybe 1000 songs, and check then the performance.
Optimizing the database code is something being done for the 6.5 release, so I wouldn't spend much time poking around, as they're trying to phase out 6.3.x as quickly as possible. Don't expect any significant database work to be done in the 6.3 branch.

With 50,000 tracks I'd seriously give MySQL another shot. Try installing something like MySQL 4.1 or maybe 5.0. You should have enough memory to run it and SlimServer without a problem on XP. There's a lot more tweaking you can do with MySQL configuration settings than you can with SQLite.

Pale Blue Ego
2006-07-03, 09:59
A few suggestions:

I wonder if some flaky playlists might be the problem. I had serious slowdowns, but when I pointed the playlist folder to an empty directory, everything sped up considerably. I have since rebuilt the playlists which contained invalid pointers.

Also, you might try dropping back to an earlier version of Slimserver. 5.4.1 was a stable release that worked very well for me. It could be that the 6.x code is not optimized yet, especially for a collection that large.

One more thing to try would be to point slimserver to a subsection of your collection. Give it a library of 1000 tracks and see what happens. It might be that your collection is so large, it is overwhelming either the hardware or the software. But if the response is still slow with a small library, then the size of the library probably isn't the issue.

If all else fails, you might just need a dedicated server with a fast CPU, plenty of RAM, and IDE or SATA drives. 50k FLACs is a large collection. It might be worth the investment to overspec the hardware just to be sure.

Michaelwagner
2006-07-03, 11:42
you might try dropping back to an earlier version of Slimserver. 5.4.1 was a stable release that worked very well for me.
But does not support SB2/3.

Klaus
2006-07-04, 01:45
A few suggestions:
I wonder if some flaky playlists might be the problem. I had serious slowdowns, but when I pointed the playlist folder to an empty directory, everything sped up considerably. I have since rebuilt the playlists which contained invalid pointers.


hm, I have no playlists at all, but have some thousend cue-files which point to wrong place. but i changed the code that while importing the files, all cue-files will be ignored (they point to the real wav-files). think this is a problem?

anyway, I will try to install these days mysql 5.0, and see what happens