VERY SLOW on ARM architecture (SheevaPlug)

Need help? Post your questions here.

Moderator: moderators

VERY SLOW on ARM architecture (SheevaPlug)

Postby braddyo » Tue Apr 21, 2009 6:19 pm

I installed Java by the following command:

Code: Select all
apt-get install openjdk-6-jre-headless


And then I ran the subsonic script

sh subsonic.sh

It seems to work, but it is SO SLOW.

I have this installed on a SheevaPlug, 1.2GHz ARM processor w/ 512MB RAM. It SHOULD work, but it takes forever just to load the frames. Maybe it's a problem with Java? Should I install Sun java instead of opensdk?
User avatar
braddyo
 
Posts: 97
Joined: Mon Oct 29, 2007 10:27 pm
Location: UT

Postby sindre_mehus » Tue Apr 21, 2009 7:42 pm

I'm not familiar with SheevaPlug or ARM in general, but if possible please try with Sun Java. It wouldn't surprise me if it has a significant performance impact.

Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby yglodt » Sat Sep 04, 2010 5:41 pm

I have also tried running subsonic on my sheevaplug. Unfortunately it is not usable...

I run Ubuntu jaunty on the sheeva, with java version 6b14-1.4.1-0ubuntu6.

Transcoding uses so much cpu that a continuous stream can not be produced, and it pauses every few seconds.

The problem is actually not subsonic, but transcoding. The web-interface runs ok, surely not fast...

Also, a big share of my Music is encoded in ogg, thus requires 2-pass transcoding, which makes it even worse.

Maybe someone has suggestions how to get it faster on Sheevaplug/arm (although I can not imagine what could help)
yglodt
 
Posts: 1
Joined: Sat Sep 04, 2010 5:28 pm

Postby hanker » Sat Nov 13, 2010 8:36 pm

sindre_mehus wrote:I'm not familiar with SheevaPlug or ARM in general, but if possible please try with Sun Java. It wouldn't surprise me if it has a significant performance impact.

Sindre



I'm also trying to get Subsonic running on a Sheevaplug (which boots Debian squeeze from an SD card). I tried it with the openjdk-6-jre Java, but, even though the SS web page loads, it's so slow as to be unusable. I monitor the Sheevaplug with htop, and the processor goes to 100% for minutes at a time. The 1 minute load average got as high as 12. And this is with a small 4 GB test music library.

So I have started with a fresh Debian squeeze SD card and installed Sun Java instead of openjdk-6-jre:

$ java -version
java version "1.6.0_21"
Java(TM) 2 Runtime Environment, Standard Edition for Embedded (build 1.6.0_21-b09, headless)
Java HotSpot(TM) Client VM (build 19.0-b02, mixed mode)

But now when I try to load the web page I get

Unable to connect

Firefox can't establish a connection to the server at 192.168.1.171:4040.

Any idea why this might be happening? Help is appreciated :)

Edit: I'm getting this error in the log:

$ cat /var/subsonic/subsonic_sh.log
/usr/bin/subsonic: line 107: java: command not found

So apparently java isn't being found. I have added the java install location to /etc/profile and so PATH looks like

$ echo $PATH
/home/plugst3r/ejre1.6.0_21/bin:/usr/local/bin:/usr/bin:/bin:/usr/games

Ideas? :)
hanker
 
Posts: 33
Joined: Fri Nov 12, 2010 4:48 pm

Postby hanker » Sun Nov 14, 2010 5:34 pm

OK, I finally got subsonic to work by hard-coding the location of the Sun java binary in the /usr/bin/subsonic script. Ugly but it works ;)

The point of this exercise was to try Sun java instead of the open-source java on this low-power embedded ARM5 system. And I can report that Sun java is *much* faster than the open-source one. Subsonic seems to be usable/responsive with Sun java, but it was pretty much unusable/unresponsive with the open-source java.

Now if I just knew how to set up the PATH right so that I don't have to hard-code the java location in the /usr/bin/subsonic script.
hanker
 
Posts: 33
Joined: Fri Nov 12, 2010 4:48 pm

Postby Anima79 » Mon Nov 15, 2010 9:29 am

I can confirm that Subsonic is running much faster with Sun Java than Open JDK on a Dockstar (ARM with only 128 MB RAM). I tried several ways to hand over the JAVA_HOME path to Subsonic, but in the end I had to hardcode it also.

Thanks for the advice!

Anima
Anima79
 
Posts: 10
Joined: Tue Nov 09, 2010 9:06 am

Postby alphawave7 » Mon Nov 15, 2010 4:27 pm

Anima79 wrote:I can confirm that Subsonic is running much faster with Sun Java than Open JDK on a Dockstar (ARM with only 128 MB RAM). I tried several ways to hand over the JAVA_HOME path to Subsonic, but in the end I had to hardcode it also.

Thanks for the advice!

Anima


Hey Anima..(short progress report) I got SS running on DS, but with several issues, and one of them slowness, even without most of my collection indexed. I, too, want to try out the sun java, but have decided to install a virtual machine on my lappie with debian for testing instead of clumsily testing with the DS, potentially bricking it. I got debian running last night, but having difficulty getting the sun java download..trying wget with various sun java links yield index.html files (fails). Is there a better way? :) TIA
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Postby Anima79 » Wed Nov 17, 2010 7:46 pm

Hi,

as Gorgone wrote somewhere on Jeff Doozans forum: Sun Java has to be downloaded over Suns Homepage due to licensing restrictions. Although you have to give them your contact details, I would really advise you to get Sun Java. Concerning Subsonic, it turned my Dockstar from a sluggish piece of hardware into a completely usable piece of joy (okay, sort of :wink: ).

Go to this site:

http://www.oracle.com/technetwork/java/embedded/downloads/index.html

and download "JAVA SE for Embedded 6", ARMv5 Linux - Headless
EABI, Soft Float, Little Endian.

Untar the package to a place where it can sit permanently, e.g.: /usr/local/java/ejre1.6.0_21 (ejre1.6.0_21 is the name of the package provided by Sun. I decided to leave it that way)

As I wrote in my previous post on this matter, I had to hardcode the link to the new Java-environment into the subsonic.sh directly. This is how I did it:

I edited /usr/bin/subsonic and inserted
Code: Select all
JAVA_HOME=/usr/local/java/ejre1.6.0_21/bin/java

at the top of the script.

following that, I edited the argument a few lines below so that it read:


Code: Select all
# Use JAVA_HOME if set, otherwise assume java is in the path.
JAVA=java
if [ -e "${JAVA_HOME}" ]
    then
    JAVA=${JAVA_HOME}
fi


You will understand what I mean when you read the code.

Afterwards a good old "service restart subsonic" should bring up a version of Subsonic on speed.

Good luck!
Anima79
 
Posts: 10
Joined: Tue Nov 09, 2010 9:06 am

Postby alphawave7 » Sat Nov 20, 2010 11:50 pm

Anime79-
Terrific! Can't wait to try this...there goes my weekend! LOL!
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Postby Mozz » Fri Dec 31, 2010 1:12 am

Tried to install standalone version to sheevaplug using aforementioned tips, but when I am trying to connect with my web browser it says: "The webpage at http://192.168.1.2:4040/ might be temporarily down or it may have moved permanently to a new web address". Here is my logfile:

Code: Select all
139 [main] INFO org.springframework.context.support.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1f934ad: display name [org.springframework.context.support.ClassPathXmlApplicationContext@1f934ad]; startup date [Fri Dec 31 00:48:08 UTC 2010]; root of context hierarchy
532 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [applicationContext-deployer.xml]
3154 [main] INFO org.springframework.context.support.ClassPathXmlApplicationContext - Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@1f934ad]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1e4f7c2
3231 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1e4f7c2: defining beans [service,org.springframework.remoting.rmi.RmiServiceExporter#0]; root of factory hierarchy
3404 [main] INFO org.mortbay.log - Logging to org.slf4j.impl.SimpleLogger(org.mortbay.log) via org.mortbay.log.Slf4jLog
Using WAR file: /mnt/buffalo/tatu/subsonic.war
Extracting webapp to /mnt/buffalo/tatu/subsonichome/jetty/1944
Using WAR file: /mnt/buffalo/tatu/subsonic.war
3652 [main] INFO org.mortbay.log - jetty-6.1.x
Mozz
 
Posts: 1
Joined: Fri Dec 31, 2010 12:49 am

almost there...

Postby diprovo » Sat Jan 01, 2011 11:34 am

Hi,

I have installed Sun's embedded java, made the hard-coding adjustments in /usr/bin/subsonic and the thingy is working, but only partially.

My browser - Firefox - just gives some kind of directory listing:

Directory: /
WEB-INF/ 4096 bytes Jan 1, 2011 11:45:32 AM
ad/ 4096 bytes Jan 1, 2011 11:45:32 AM
error.jsp 2122 bytes Jan 22, 2010 6:47:02 PM
flash/ 4096 bytes Jan 1, 2011 11:45:32 AM
icons/ 4096 bytes Jan 1, 2011 11:45:33 AM
script/ 4096 bytes Jan 1, 2011 11:45:32 AM
style/ 4096 bytes Jan 1, 2011 11:45:32 AM
xsd/ 4096 bytes Jan 1, 2011 11:45:32 AM

That's it. Someone any ideas? Seems i missed something.
diprovo
 
Posts: 2
Joined: Sat Jan 01, 2011 11:20 am

THANKS GUYS!!

Postby henkieheld » Tue Mar 01, 2011 3:41 pm

Thanks guys,

This software + your solutions to get is running on a Sheevaplug just made my day. Finally I can access ALL of my music away from home.

:D :D :D :D

And thanks to you it is running om my sheevaplug next to squeezebox server and freepbx. LOL

Thanks again!!!
henkieheld
 
Posts: 8
Joined: Tue Mar 01, 2011 3:35 pm

Re: VERY SLOW on ARM architecture (SheevaPlug)

Postby hermie66 » Wed Feb 15, 2012 12:48 pm

hi
i'm running my sheeva on debian, using mpd to listen to my music at home.
After reading this thread i like to install subsonic on my sheeva, so everybody in my family
can stream the music from the sheeva to ipod, android phone or notebook.

With sun java is it fast enough?
Can you post your configuration and especially how to get, install java.
Did you hard-coding adjustments in /usr/bin/subsonic?


thank you
rené
hermie66
 
Posts: 2
Joined: Wed Feb 15, 2012 12:36 pm

Re: VERY SLOW on ARM architecture (SheevaPlug)

Postby hanker » Wed Feb 15, 2012 1:52 pm

hermie66 wrote:hi
i'm running my sheeva on debian, using mpd to listen to my music at home.
After reading this thread i like to install subsonic on my sheeva, so everybody in my family
can stream the music from the sheeva to ipod, android phone or notebook.

With sun java is it fast enough?
Can you post your configuration and especially how to get, install java.
Did you hard-coding adjustments in /usr/bin/subsonic?


thank you
rené


It's not super-fast, but it is quite usable with sun java. See this post for other details:

viewtopic.php?f=6&t=8562#p36077

Enjoy.

BTW, I'm running it on a Sheevaplug that boots Debian.
hanker
 
Posts: 33
Joined: Fri Nov 12, 2010 4:48 pm

Re: VERY SLOW on ARM architecture (SheevaPlug)

Postby hermie66 » Thu Feb 23, 2012 2:36 pm

thank you

i tried it like this

when i try to run java i get this message, it seem the java does not fit to my os.

root@sheeva:~# /home/ber/ejre1.6.0_30/bin/java
Illegal instruction
root@sheeva:~# file /home/ber/ejre1.6.0_30/bin/java
/home/ber/ejre1.6.0_30/bin/java: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
root@sheeva:~# ldd /home/ber/ejre1.6.0_30/bin/java
libpthread.so.0 => /lib/libpthread.so.0 (0x40006000)
libjli.so => /home/ber/ejre1.6.0_30/bin/../lib/arm/jli/libjli.so (0x40027000)
libdl.so.2 => /lib/libdl.so.2 (0x40039000)
libc.so.6 => /lib/libc.so.6 (0x40044000)
/lib/ld-linux.so.3 (0x2a000000)


can you help me?

SOLVED:
i got the wrong java version, sorry
with the correct version no more illegal instruction!
hermie66
 
Posts: 2
Joined: Wed Feb 15, 2012 12:36 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 16 guests