PDA

View Full Version : SlimServer on NSLU2 – some more questions / observations



gharris999
2005-08-02, 10:12
I’ll have to take back some of the things I said yesterday. After loading my MP3 collection to the SlimSlug (12,562 tracks) I’ve tried to give it a workout today. At least with my library, the web interface is impossibly slow in terms of building and modifying playlists, even when using the Handheld skin. The following timings all use the Handheld skin:

Using IE from a windows xp client while the slimslug streams MP3s:

Home to status page: 1 minute, 15 seconds.
Return to home from status page: 9 seconds.
Home to The current playlist (74 Songs) page: 1 minute, 9 seconds.
Delete last entry in current playlist: 1 minute, 20 seconds.

Using Firefox 1.06 from a windows xp client while the slimslug streams MP3s:

Home to The current playlist: (73 songs): 1 minute, 18 seconds.
Browse genre->artist->album->tracks: 2 minutes, 42 seconds.
Browse genre->artist and add whole album to current playlist: 2 minuets, 30 seconds

Some info about my setup:

At Mac’s suggestion, I “clocked” my NSLU2 according to the directions at http://www.nslu2-linux.org/wiki/HowTo/OverClockTheSlug with Mac’s helpful tips.

The attached HD is a Seagate 7200 rpm 120 gig barracuda in a USB2 enclosure.

My slimserversql.db looks like this:
-rw-r--r-- 1 root root 17813504 Aug 2 10:33 .slimserversql.db

A “ps” and “free” look like this:

BusyBox v0.60.4 (2004.07.01-03:05+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# ps
PID TTY Uid Size State Command
1 root 1212 S /bin/init
2 root 0 S [keventd]
3 root 0 R [ksoftirqd_CPU0]
4 root 0 S [kswapd]
5 root 0 S [bdflush]
6 root 0 S [kupdated]
7 root 0 S [mtdblockd]
8 root 0 S [khubd]
9 root 0 S [jffs2_gcd_mtd4]
10 root 0 S [usb-storage-1]
11 root 0 S [scsi_eh_1]
29 root 0 S [kjournald]
53 root 0 D [ixp425_csr]
54 root 0 S [ixp425 ixp0]
57 ttyS0 root 1916 S /bin/sh
58 root 1936 S /sbin/syslogd -n
59 root 1924 S /sbin/klogd -n
151 root 0 S [kjournald]
279 root 2108 S /usr/sbin/thttpd -C /etc/thttpd.conf
303 root 3928 S /usr/sbin/smbd -D
305 root 3128 S /usr/sbin/nmbd -D
313 root 1276 S /bin/inetd
347 root 1864 S /usr/sbin/onetouch_detect
350 root 1864 S /usr/sbin/onetouch_detect
360 root 1296 S /usr/sbin/crond
368 root 41776 S slimserver
370 root 1908 S /usr/sbin/CheckResetButton
372 root 1196 S /usr/sbin/CheckPowerButton
374 root 1196 S /usr/sbin/do_umount
431 root 1256 S /usr/sbin/telnetd
432 ttyp0 root 1920 S -sh
433 ttyp0 root 1984 R ps
# free
total used free shared buffers
Mem: 30520 29728 792 0 476
Swap: 56220 28720 27500
Total: 86740 58448 28292
#

So, can anyone give me any pointers as to how to improve the performance of the web interface? As it stands, the NSLU2 is really unusable as a host for a SlimServer for my MP3 library. Does the fact that I have my library and playlists in shared folders at /public/recordings and /public/playlists impose a performance hit (i.e. is the slug having to do lots of access list checks)?

Anyone else running slimserver on a NSLU2 with a similar sized library? What sort of browsing performance are you seeing?

Might I see better browsing performance by running SlimServer 5.x streaming to a SB1 from the NSLU2?

Robin Bowes
2005-08-02, 11:42
gharris999 wrote:
> 368 root 41776 S slimserver
^^^
[snip]

> Mem: 30520 29728 792 0
^^^
>
> So, can anyone give me any pointers as to how to improve the
> performance of the web interface?

There's only 30M of RAM available and the slimserver process is nearly
42M in size; that means even if you had no other processes running
(which is impossible) the device would need to hit the swap file regularly.

My slimserver process is 71M in size with 66M resident.

I would suggest that the NSLU2 is not a great platform on which to run
slimserver unless you can throw more RAM at it - 128MB would seem to be
a sensible minimum.

R.

gharris999
2005-08-02, 12:10
Yeah, I agree. As far as throwing more RAM at it...just removing one nearly microscopic resistor last night to “clock” the slug was enough to freak me out. ("Gawd, my hands are shaking...is it the caffeine? Incipient Parkinson's?") I don’t think I’m up to removing and replacing surface mounted ram chips. The instructions at http://www.nslu2-linux.org/wiki/HowTo/FattenYourSlug seem a little sketchy at this point anyway.

I am kind of curious about this whole realm (SlimServer on a NAS) though. I took a risk and placed an order for a raid 5 SATA NAS device that is supposed to be able to run SlimServer: http://www.eaegis.com/Browse_Item_Details.asp/Item_ID/10/categ_id/114/parent_ids/64,114/Name/ReadyNAS_Diskless_System

This is actually a little less insane that it might seem at first glance, as I’ve got 1.5 terabytes worth of SATA disks kicking around here gathering dust. The price comparison vs. the NSLU2 is a little extreme ($600 vs. $80 or less) but, hey, it does come with 128mb of RAM, so there.

pfarrell
2005-08-02, 12:29
On Tue, 2005-08-02 at 12:10 -0700, gharris999 wrote:
> I am kind of curious about this whole realm (SlimServer on a NAS)
> though.

I also wonder about this. I don't see the attraction.
I've been running my SlimServer on a cheap PC with Linux for years.
It ran for at least a year without me touching the box. I used Samba
and would drag and drop newly compressed music.

I just bought a complete system from my local whitebox store
for $430 or so. It has a AMD64 processor, a gig of ram
and a smallish disk. For a few hundred more, I could have
gotten as much disks as I wanted, Raid, etc. (I didn't because
I had 400 GB of disks laying arround).

Installing Mandrake took about 20 minutes from the CDs, and
another hour to download all the updates. It has run perfectly
since.


What is the attraction? What am I missing?

--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

mac
2005-08-02, 13:38
Browse genre->artist->album->tracks: 2 minutes, 42 seconds.
Browse genre->artist and add whole album to current playlist: 2 minuets, 30 seconds.The time required for me to perform either of those tasks was just a few seconds.

My database is roughly 1/10 the size of yours, but I doubt that this would account for such a difference in speed.

$ ls -l /etc/slim-data/.slimserversql.db
-rw------- 1 root root 1525760 Aug 2 10:53 /etc/slim-data/.slimserversql.db
Is it possible that you have a routing issue on your network? Are you using static DHCP?

In my Server Settings I do have my Music Folder path set to '/public/music' rather than '/share/hdd/data/public/music'. If you're configured to use the shared mount path rather than the physical path, it might be worth changing it.

$ df -k
Filesystem 1k-blocks Used Available Use% Mounted on
rootfs 172888828 44513048 126619316 26% /
/dev/sda1 6528 5324 1204 82% /initrd
/dev/sda1 172888828 44513048 126619316 26% /
/dev/sda1 172888828 44513048 126619316 26% /share/hdd/data
/dev/sda2 116661 4160 111297 4% /share/hdd/conf
In any event, it seems that the point is moot since you have already ordered new hardware to run your Slimserver.

mac
2005-08-02, 13:47
What is the attraction? What am I missing?The attraction is noise free operation, size and cost. The drawbacks are expandability and performance (especially if missconfigured). YMMV.

gharris999
2005-08-02, 14:37
What is the attraction? What am I missing?

Well, in my case, hardware raid 5 is a real attraction. I figure that the nuts, bolts 'n disks cost will always be dwarfed by the ripping / tagging time cost. I'm currently running my "production" slimserver on a self-built PC with a hacked version of WinXP that provides software raid 5. I assume I could accomplish the same with Linux with a little effort and head-scratching. Hardware raid will allow me to sleep just a little more soundly.

But beyond that, I guess there isn't all that much attraction with the NAS route other than the pleasure of frittering away time working with whacky hardware. What has mostly kept me out of the Linux realm up until now has been my lack of any broadband internet. I just got WildBlue satellite service a week ago, so now I'm going hog-wild. 4 gig download for the Fedora install DVD? Sure! Sign me up!

My original plan has always been to do as you have done: migrate my XP box to linux, exile it heedlessly to the utility closet and just let it run. If this NAS doesn’t work out, I guess that that is what I’ll still do.

pfarrell
2005-08-02, 14:57
On Tue, 2005-08-02 at 14:37 -0700, gharris999 wrote:
> pfarrell Wrote:
> > What is the attraction? What am I missing?
>
> Well, in my case, hardware raid 5 is a real attraction.

I have a couple of servers with hardware raid. I don't see
any strong reason to perfer it. After all Turing proved that
hardware and software are isomorphic.

> I figure that the nuts, bolts 'n disks cost will always be dwarfed by the ripping /
> tagging time cost.

I agree completely, if you assign some value to your time.
I got to where I could do about 20 CDs per hour on one machine.
When we did it professionally, we set up 20 machines and had
someone go from machine to machine inserting disks.


> I assume I could accomplish the same with Linux with a little
> effort and head-scratching. Hardware raid will allow me to sleep just
> a little more soundly.

True. If you get one of the easier distros on CD, say Mandriva 2005LE,
it is pretty much insert disk, hit OK. Then do a little GUI
configuration stuff.

> other than the pleasure of frittering away time working with
> whacky hardware.

So you a closet audiophile?

> gig download for the Fedora install DVD? Sure! Sign me up!

Try Mandriva, not that Fedora is bad. I just like the Mandriva
GUI for RPM/urpmi a lot. I am pretty sure the distro doesn't
really matter much.


> My original plan has always been to do as you have done: migrate my XP
> box to linux, exile it heedlessly to the utility closet and just let it
> run. If this NAS doesn˘t work out, I guess that that is what I˘ll still
> do.

And sell the NAS on eBay?

I assume that easy setup is one of the strong points of
the NAS approach. My SlimServer box does not run apache
or any client stuff like email. It has a copy of FireFox so
I can download stuff. I also run some redundant things,
like a backup DHCP server. I am by no means a serios
Linux/Unix sys admin, I can do enough to get by,
configure the firewall, etc.


--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

gharris999
2005-08-02, 15:03
The time required for me to perform either of those tasks was just a few seconds.

My database is roughly 1/10 the size of yours, but I doubt that this would account for such a difference in speed.
...snip...
Is it possible that you have a routing issue on your network? Are you using static DHCP?
The NSLU, the SB2 and the browsing client are all connected to the same 10/100 switch, so I don't think it's that. And yes, I'm using static DHCP.


In my Server Settings I do have my Music Folder path set to '/public/music' rather than '/share/hdd/data/public/music'.
I've got mine set to '/public/recordings'

Here's df -k:

Filesystem 1k-blocks Used Available Use% Mounted on
rootfs 115205036 79575688 34458936 70% /
/dev/sda1 6528 5328 1200 82% /initrd
/dev/sda1 115205036 79575688 34458936 70% /
/dev/sda1 115205036 79575688 34458936 70% /share/hdd/data
/dev/sda2 116661 4173 111284 4% /share/hdd/conf
#
See anything to be concerned about there?


In any event, it seems that the point is moot since you have already ordered new hardware to run your Slimserver.
Ah! There, I've got you! I would LOVE to be able to pass one of my old SB1's on to a friend, with the NSLU2 acting as their SlimServer, so, please, don't write me off! But at this point, I don't think it would work. Even skipping the web interface, just browsing genre->artist->album with the remote takes several minutes.

pfarrell
2005-08-02, 15:08
On Tue, 2005-08-02 at 13:47 -0700, mac wrote:
> pfarrell Wrote:
> > What is the attraction? What am I missing?

> The attraction is noise free operation, size and cost. The drawbacks
> are expandability and performance (especially if missconfigured).
> YMMV.

I can see the noise free being a big deal in some setups.
I have my slimserver in the basement so I don't really care.
Plus I have other servers down there.

Size is clearly important as well if the box is in your living space.
My "decorating commitee" would not tolerate my ugly
server in the Living Room.

Cost is clearly a YMMV issue, I ran my Slimserver on an ancient
box that I got for free. Even the replacement was a system
that my daughter rejected as being too old and too slow.

I do think it is cool that hardware and software hacks exist to
run the SlimServer on appliances. I would also guess
that the applicances are a little easier on power consumption
and A/C load.

--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

gharris999
2005-08-03, 22:00
Well, no joy with using a "retro" version of SlimServer. I managed to get version 5.4.1 to run on the NSLU2 and scan my library. I thought that a SlimServer version without SQLite might fare better in the limited memory environment. No such luck. Just trying to browse Genre->Artist->Album->Tracks causes the slimserver to bog down to such an extent that the SB1 looses connection with the server. And again, it takes minutes to get from page to page. SlimServer on a NSLU2 with a large library seems like mission impossible. Oh well.

eulb
2005-08-13, 05:43
How is the response time for the squeezebox (no web) when no files have been added to the libary? Can one listen to the internet radio stations without interruption?

gharris999
2005-08-14, 08:00
I didn't give this a thorough test, but for the few streams that I tried, the answer was yes.

nano2nd
2005-08-25, 06:15
I have been going through some similar performance issues with an NSLU2 running Slimserver. I have found the following made some improvements to usability:

1. Reduce the number of plugins loaded at startup by Slimserver to the bare minimum - these must use some resource somewhere right?

2. Cut the web interface down to bare HTML with no fancy skins - I think the scheme is called "basic". This definitely makes the web interface snappier.

3. Eliminate unneccessary services from the NSLU2. If you don't need samba or http, don't run them.

4. "clock" the NSLU2 as described earlier in the thread.

My girlfriend now considers the SB2 response times to be "ok". There are no breaks/pauses in playback. Menu navigation on the SB2 is acceptable but could be quicker. Scrolling through artists or albums is fine but sometimes there are pauses of up to 20 seconds when pressing "back". I imagine this is when the SB2 has to talk to Slimserver to rebuild the previous menu (big list if you were browsing artists).

My next plans are:

1. Add a USB2 flash drive (256MB) to put /var in so that the HDD spins down (Unslung 5.5 log activity stops this from happening!). I wonder if I could also use this for swap space as the NSLU2 is definitely memory bound. I wonder if moving some I/O to another device will also improve things slightly.

2. Continue to tinker with indexing in the SQLite database. I have added some indeces to various tables to see if there is any improvement on browsing etc. So far, nothing major plus there is a danger of causing re-scans to take longer due to additional index maintenance.

After this, I'm not sure what else I can try. I really liked the snappy performance I got when running Slimserver on OSX but I don't want to leave my eMac on all day every day. Plan B is an oldish Toshiba laptop I've got running GNU/Linux. It's low power and low noise but it's not as cool and minimalist as the NSLU2!