You are here: Home » Topic » NSLU2 Performance Tips?

NSLU2 Performance Tips?

This topic contains 13 replies, has 6 voices, and was last updated by  rpedde 10 years, 9 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1099

    Anonymous

    I’ve got my MP3 library (16,000+ songs) on a TeraStation Pro share and I’m running my Turbo NSLU unslung 6.8 to a flash drive on drive 2 (where songs.db is), nothing is on drive 1. I’m using a SoundBridge as the music client. Everything is connected through a wired switch.

    Here’s the question: Can anyone suggest tips to speed up the response to a “Browse Artists” request from my SoundBridge? I’ve created an index on artists using SQLITE, but it still takes over 20 seconds. Once I have my artist list, selecting an artist results in an almost instantaneous response of albums by that artist. And when I’m playing, everthing works great. I “stress” tested it and was able to serve 5 clients (3 soundbridge and 2 iTunes) without pause . . . . I was even able to test it through a “rescan”, so I’ve got to believe there’s an opportunity to reduce the 20 seconds. If you have a SoundBridge, you know how difficult it is to avoid going through “Browse Artists” for nearly anything.

    #9157

    fizze
    Participant

    erm, isnt the terastation capable of running Firefly too?

    #9158

    Anonymous

    @fizze wrote:

    erm, isnt the terastation capable of running Firefly too?

    Yes, the TeraStation runs FireFly, though I’m currently running Twonky on the TeraStation for video (work in progress), pictures and MP3, but (according to Christian at TwonkyVision) the TeraStation doesn’t have the horsepower to transcode FLAC. on the fly I hoped to use the NSLU to be my FLAC music server using FireFly.

    #9159

    fizze
    Participant

    Hm alrighty.
    Well, the NSLU2 isnt very powerful either. Nm though.

    I am running a Wizd music server off the very same NSLU2 that runs my firefly πŸ˜‰

    Depending on your video client, you might get way better performance when you use a different video server. I myself am using a Showcenter 200 as a client.

    #9160

    rpedde
    Participant

    @fizze wrote:

    Well, the NSLU2 isnt very powerful either. Nm though.

    An un-de-underclocked NSLU2 runs at 133 bogomips. The original terastation is the same hardware as my linkstation-hg, which runs at 174 bogomips.

    Plus, the linkstation has hardware FPU. Upshot – the linkstation/terastation is *much* faster than the nslu2. Not sure why the terastation won’t decode flac in realtime — the slug will.

    As far as being on-topic, you might try moving your db to a faster device. Either a network mounted file system or a hard drive. That should help some.

    Oh, and /tmp, too. move that off to someplace fast, rather than the flash disk — it builds a temp table for select distinct queries, so a slow /tmp will cause problems.

    — Ron

    #9161

    CCRDude
    Participant

    My Kurobox is more or less the same as the Linkstation as well, hardware-wise and from performance; 173 Bogomips as well.

    I’ve just tried, am streaming both transcoded flac to my machine, and mp3 to my Soundbridge, transcoding takes about 10% cpu time, not more.

    So it should have horsepower enough for even multiple transcodings at the same time πŸ˜‰

    #9162

    Anonymous

    @rpedde wrote:

    Upshot – the linkstation/terastation is *much* faster than the nslu2. Not sure why the terastation won’t decode flac in realtime — the slug will.
    — Ron

    Hmmm, maybe the problem is Twonky . Having said that, whether Firefly or Twonky, the actual decoding would be done by the same external decoder, correct?

    I wonder if anyone else is running FireFly on a TeraStation Pro and decoding FLAC? I may give it a try. I’m just trying to get everything off the home XP box and load it onto “server-oriented” boxes that can stream my media 24/7 reliably.

    #9163

    CCRDude
    Participant

    As Ron said, TeraStation & LinkStation have the same hardware, as have LinkStation & Buffalo. No wonder since they’re all produced by Buffalo, why should they develop more than one embedded platform with nearly the same specs πŸ˜‰ So I’m running it on the Kurobox with above performance.

    Whether its on the same decoder depends. Firefly is imho using an external one, which means that you can now easily replace flac 1.1.3 with 1.1.4 and gain their speed improvements. flac is available in source as well though, if Twonky maybe did compile directly with flac 1.1.0 and never updated that to newer versions, instead of using an external library, that would qualify for some quite slower speed (I do not intend to say they do, just that this is the only circumstance I could image, other than some really creepy code around for streaming, which I can’t image much less… only Slimserver is that bad that it has a multiply-by-30 factor πŸ˜€ ).

    #9164

    S80_UK
    Participant

    @ccrdude wrote:

    Firefly is imho using an external one, which means that you can now easily replace flac 1.1.3 with 1.1.4 and gain their speed improvements.

    I see that flac 1.1.4 claims some significant speed benefits due to re-write of its internal buffer handling, although it’s not yet a formal release.

    #9165

    CCRDude
    Participant

    Yes, that’s right, the page announcing it is in CVS, but not on the main site.

    But actually, flac taking only 10% of Kuroboxes CPU was the flac included in Debian, which is 1.1.1, so its quite old and still fast enough for the Kurobox.

    Probably should update that soon… hmm… I don’t like moving away from official Debian packages, but newer flac versions brought nice things like album art in metatags, not sure if that would work with the old version installed (Firefly has its own parser imho, but not sure about Slimserver).

    #9166

    chaintong
    Participant

    Can someone explain

    “tmp, too. move that off to someplace fast, rather than the flash disk — it builds a temp table for select distinct queries, so a slow /tmp will cause problems. “

    I guess thats not a mt-daapd config file /tmp, but a unslung / linux thing..

    can some one tell me where the config for this os level tmp is defined (i’m very new to the whole linux thing) and still finding it hard to get my head round

    thanks

    #9167

    rpedde
    Participant

    @chaintong wrote:

    Can someone explain

    “tmp, too. move that off to someplace fast, rather than the flash disk — it builds a temp table for select distinct queries, so a slow /tmp will cause problems. “

    I guess thats not a mt-daapd config file /tmp, but a unslung / linux thing..

    can some one tell me where the config for this os level tmp is defined (i’m very new to the whole linux thing) and still finding it hard to get my head round

    thanks

    Correct… the /tmp folder on your slug is where temporary files are created. If you do a “mount” command, you’ll see where stuff is mounted. My guess is that your “/” is mounted to the flash drive. Which is fine, but that means that your /tmp directory is on the flash drive as well, which has terrible write speeds.

    Actually, just do a “mount” and post what it returns. We can probably symlink your tmp to somewhere on the hard drive and have it perform better.

    — Ron

    #9168

    chaintong
    Participant

    Ron,

    Here’s the mount, the music is on HDD_1_1_1, a drive which is not set to spin down, the other drive (which serves as my backup drive) spins down when not used.

    I think I am begining to understand the directory structure a bit – but Ill will need some help changing the tmp location.

    also – Weird that as a purely electical device (like a flash drive) is slower than a electro-mechanical device like a HDD

    Password:
    No directory, logging in with HOME=/

    Welcome to Unslung V2.3R63-uNSLUng-6.8-beta


    NOTE: THIS SYSTEM IS CURRENTLY UNSLUNG


    BusyBox v0.60.4 (2005.03.22-06:52+0000) Built-in shell (ash)
    Enter ‘help’ for a list of built-in commands.

    # mount
    /dev/sda1 on /initrd type jffs2 (rw)
    /dev/sda1 on / type ext3 (rw)
    /proc on /proc type proc (rw)
    usbdevfs on /proc/bus/usb type usbdevfs (rw)
    /dev/sda1 on /share/flash/data type ext3 (rw)
    /dev/sda2 on /share/flash/conf type ext3 (rw,sync)
    /dev/sdb1 on /share/hdd/data/HDD_1_1_1 type ufsd (rw)
    /dev/sdc1 on /share/hdd/data/HDD_1_2_1 type ufsd (rw)

    #9169

    rpedde
    Participant

    @chaintong wrote:

    Here’s the mount, the music is on HDD_1_1_1, a drive which is not set to spin down, the other drive (which serves as my backup drive) spins down when not used.

    I think I am begining to understand the directory structure a bit – but Ill will need some help changing the tmp location.

    also – Weird that as a purely electical device (like a flash drive) is slower than a electro-mechanical device like a HDD

    Yeah, you’d think, but seems like usb hard drives do writes at something like 20-30 MB/sec, while even the “high speed” flash drives clock around 12 or so. And average ones are probably around 8.

    They are speedy on reads, though.

    /dev/sda1 on / type ext3 (rw)
    /proc on /proc type proc (rw)
    usbdevfs on /proc/bus/usb type usbdevfs (rw)
    /dev/sda1 on /share/flash/data type ext3 (rw)
    /dev/sda2 on /share/flash/conf type ext3 (rw,sync)
    /dev/sdb1 on /share/hdd/data/HDD_1_1_1 type ufsd (rw)
    /dev/sdc1 on /share/hdd/data/HDD_1_2_1 type ufsd (rw)

    Okay, so the flash drive is mounted as root, as /dev/sda1.

    You can do something like:


    # mkdir /share/hdd/data/HDD_1_1_1/tmp
    # chmod 777 /share/hdd/data/HDD_1_1_1/tmp
    # mv /tmp /tmp.old
    # ln -s /share/hdd/data/HDD_1_1_1/tmp /tmp

    That should link the /tmp folder to a directory on the hard drive. Then, stop and start the server. See what that does.

    Not sure what will happen on reboot — it will probably make a new /tmp when it boots, so if this helps, we’ll have ot find a way to maek it permanent.

    — Ron

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.