Welcome Guest ( Log In | Register )

4 Pages V < 1 2 3 4 >  
Reply to this topicStart new topic
> Raspberry Pi, Low power server

 
post Feb 5 2013, 13:53
Post #21
Pillowgirl



Grammatically Incorrect (☞゚∀゚)☞
*********
Group: Gold Star Club
Posts: 5,361
Joined: 2-December 12
Level 485 (Godslayer)


Because it's going to be used outside with a portable or closed power system.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 22 2013, 08:41
Post #22
ctxl



バカ
****
Group: Members
Posts: 424
Joined: 20-May 12
Level 455 (Godslayer)


Hijacking this thread with a similarly low-power device: the PogoPlug.

It's been on sale for as little as 15USD and comes in an enclosure for you to tear apart.

Inside the OXNAS 7820 700MHz dual-core revision (Pro/Video/V3) is a SATA port you can boot Arch Linux off of.

The OXNAS revision appears to be capable of running Oracle Java, when using the ARMv5 version (soft float), but not the ARMv6 (hard float).

CODE
[root@alarm ~]# java -version
java version "1.6.0_38"
Java SE Embedded Runtime Environment (build 1.6.0_38-b05, headless)
Java HotSpot(TM) Embedded Client VM (build 20.13-b02, mixed mode)

Native SATA is nice for an I/O-heavy program like H@H. Unfortunately, the OXNAS revision only has 128MB of RAM, so this may pose an issue.

I'm behind triple-NAT, so H@H testing is a no-go.

The older Marvell Kirkwood 1.2GHz single-core revision (V2) does not have SATA, but should run faster, since it has 256MB of RAM. You're also more likely to encounter this revision during sales.

Anyways, here's a picture of the B01 (OXNAS) I tore apart.

Attached Image

And hdparm results off of a Kingston SE9 16GB USB flash drive on OXNAS:

CODE
[root@alarm ~]# hdparm -t /dev/sda1

/dev/sda1:
Timing buffered disk reads:  34 MB in  3.01 seconds =  11.30 MB/sec


And notes to get JRE6 running on the OXNAS version. I haven't tried out Java on the Marvell version yet (and don't intend to).

CODE
Download ejre-1_6_0_38-fcs-b05-linux-arm-sflt-eabi-headless-13_nov_2012.tar.gz
Extract contents and move them to /usr/lib/java/
In /etc/environment add: JAVA_HOME=/usr/lib/java and PATH="$PATH:/usr/lib/java/bin"
Run: source /etc/environment
Test: java -version
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 23 2013, 01:15
Post #23
mikofake



The dog that's kicked.
*******
Group: Gold Star Club
Posts: 1,106
Joined: 6-April 07
Level 323 (Godslayer)


QUOTE(ctxl @ Feb 21 2013, 23:41) *

I'm behind triple-NAT, so H@H testing is a no-go.


Triple NAT? Srsly WTF?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 1 2013, 04:10
Post #24
ctxl



バカ
****
Group: Members
Posts: 424
Joined: 20-May 12
Level 455 (Godslayer)


QUOTE(mikofake @ Feb 22 2013, 15:15) *
Triple NAT? Srsly WTF?

Comes with the territory when you're a poor college student.
Also because I move quite a bit, and don't want to commit to a 2-year service contract.

Anyways, success with the SATA port.

I was testing out Windows 8 on an SSD in my laptop.
Windows 8 nuked itself along with the filesystem, and I don't have any spare traditional HDDs, so...

Yeah, I just copied everything over from the USB stick to the SSD.

(Spoilers: it's fast--boots up in 5 seconds, whereas USB took 1 minute)


Required:
1) SATA -> eSATA adapter (4USD for two + bracket)
2) eSATA + USB -> SATA + 5V power (6USD)
3) Cutting a bit of plastic so the SATA cable fits (knife + pliers)

Attached Image
Attached Image
Attached Image

CODE
[root@alarm ~]# hdparm -t /dev/sda1

/dev/sda1:
Timing buffered disk reads: 190 MB in  3.03 seconds =  62.66 MB/sec

User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 6 2013, 17:09
Post #25
Temperature Critical



Casual Poster
***
Group: Catgirl Camarilla
Posts: 223
Joined: 14-February 10
Level 386 (Destined)


To the RPi users:

What distro & java combination are you using?
I have set up my Pi with Debian-Wheezy with hardfloat and openjdk-7-jre-headless.
Hath runs without a problem, But I can only manage uploads of 36 to 38 kB/s during the speed test (the 3rd test fails/hangs with a closed connection error). The upload speed of my connection is ~430 kB/s.

Also note that CPU is at 85% during startup / speed-test.

RPi B (512 mb)
CPU running at 800 Mhz (modest overclock).
Memory spilt is 0/512 (since it is running headless)

Power is 5V / 2A
HatH is on a USB stick, 22 MB/s write, 22 MB/s read.

CODE

java -version
java version "1.7.0_07"
OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-1+rpi1)
OpenJDK Zero VM (build 22.0-b10, mixed mode)


any ideas?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 7 2013, 15:19
Post #26
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12
Level 500 (Godslayer)


Very similar config to mine Knabber96.

I assume that you left H@H running for at least a week so it managed to build the cache, whilst it builds the cache the CPU burst is high. After the cache is fully built it is the memory that gets hogged by H@H (like all java programs).

I use an external HDD for my H@H install and cache, the main reson for it is because the HDD is powered externally (it's one of those old and heavy HDDs that need an extra cable connected to a socket, just to supply the needed power). An USB stick can use a lot of energy and the network card will need a decent amount of energy as well. It is just a guess, but, as the raspberry is very power limited, maybe it cannot stand the power needed by both network and USB stick.
User is online!Profile CardPM
Go to the top of the page
+Quote Post

 
post Mar 7 2013, 16:10
Post #27
Temperature Critical



Casual Poster
***
Group: Catgirl Camarilla
Posts: 223
Joined: 14-February 10
Level 386 (Destined)


I'm not sure that the cache has any influence, as I have noted the speed test was slow (36 kb/s).
I replaced the openjdk with [jdk8.java.net] JDK 8 (with JavaFX) for ARM Early Access and that seems to have solved my problem (speed test running with 120 kb/s).
With the oracle JVM it manages to get past the connection test and it's performance for serving files is decent.

Will test some more when I find some time to mess around.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 7 2013, 16:50
Post #28
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12
Level 500 (Godslayer)


Sorry, I disregarded the speed test part, I never did run it from my raspberry so I forgot about it's existence.

It is known that java 7 have problems with H@H, but it's the oracle version one. You are using openjdk and that shall not have these issues. One good idea could be test runing under openjdk6 when you have time (I use openjdk7 and never faced your speed issue, but too many people complain that java 7 is crap: there might be something in it).
User is online!Profile CardPM
Go to the top of the page
+Quote Post

 
post Aug 8 2013, 14:06
Post #29
Froot



Newcomer
*
Group: Recruits
Posts: 11
Joined: 14-April 09
Level 85 (Hero)


Sup everyone, sorry for dragging this old thread up.

Just want to post my experiences with trying to run H@H on my pi here quickly. The main issue is that I can't get my pi to work correctly/stably with H@H.

I run a setup where the cache is on a USB stick with reading speed up to 18MB/s.

First I tried running it with Oracle's Java 7 JRE which works well, the DB is loaded which takes up about 80% of RAM on a 224:32 split and people are getting served with normal speed. However, after a few hours the pi just freezes with no errors in the logs whatsoever (I'm running it headless). I tried running it twice with this configuration and the memory usage was stable, i.e. it was always at around 80%. There were also no connection errors because trust was always at 1000.

So I thought maybe it's something to do with the JVM because it has been posted again and again that H@H and Java 7 don't like each other much. I installed openjdk 6 because it was the easiest alternative for squeeze. That worked as well, it loads, starts serving but after a few hours it freezes again. The RAM usage was on par with Java 7 but it was (as expected I guess) slower than on Oracle's JVM.

I then suspected that the pi doesn't like high memory usage (for whatever reason) and I threw the IKVM compiler and mono's Ahead-of-Time compiler at it. That brought down memory usage from 80% to 30%. Using mono, H@H loads and performs all the checks successfully but for some reason (almost) no people are being served or at least there are (almost) no info messages with requests. However, apparently people are being redirected to my server because the connection failures ate up my trust over night from 1000 to below 0. At least it didn't freeze this time, I guess.

I switched back to my main machine, everything works normally.

Now, I'm kind of at my wits end here. Is my hardware just faulty or what else could be at play here?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 9 2013, 07:43
Post #30
Pillowgirl



Grammatically Incorrect (☞゚∀゚)☞
*********
Group: Gold Star Club
Posts: 5,361
Joined: 2-December 12
Level 485 (Godslayer)


Try another usb stick or sd card?

Install another OS?

Loads of things you can do with it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 12 2013, 21:03
Post #31
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12
Level 500 (Godslayer)


hmm... I use openjdk 6 on my raspberry and never had problems, i'd say that you shall give it a try instead of oracle java
User is online!Profile CardPM
Go to the top of the page
+Quote Post

 
post Aug 22 2013, 23:00
Post #32
ctxl



バカ
****
Group: Members
Posts: 424
Joined: 20-May 12
Level 455 (Godslayer)


QUOTE(Froot @ Aug 8 2013, 05:06) *
However, after a few hours the pi just freezes with no errors in the logs whatsoever (I'm running it headless).
I encountered a similar issue with my [archlinuxarm.org] PogoPlug v3 and did [archlinuxarm.org] some research on the matter.

For the Raspberry Pi, [stevenhickson.blogspot.com] try adding:
1) "vm.min_free_kbytes = 16384" to /etc/sysctl.conf
2) "smsc95xx.turbo_mode=N" to /boot/cmdline.txt

If that doesn't work, or if you have a mind-boggling problem like I do, characterized by:
1) Having all network activity spontaneously die (connections reset, only responds to pings thereon)
2) Zero entries in the log indicating what could possibly be wrong
3) Being left with a neutered, but otherwise functioning system

Downgrading kernels doesn't help.
Tweaking the TCP buffer size doesn't help.
Switching between Sun/Oracle Java and OpenJDK doesn't help.
Using a Debian rootfs doesn't help. (And it results in horrible performance, btw)
I'm guessing a USB Ethernet adapter might solve the issue, but I can't be arsed to try any further.

The TCP stack would just die at some point between six hours and three days.

I don't have a serial cable to do further investigation, so my workaround was to schedule a reboot every 12 hours.
Incidentally, these reboots help keep Hamachi tunnels from going stale, if you have that running as well.

---

Anyways, my setup process for H@H on Arch Linux ARM + PogoPlug v3 is as follows.
(I run everything as root. You probably shouldn't.)

In summary this will:
- Set up Java
- Set up H@H to run in a detached screen on startup
- Set up scheduled reboots twice a day, at noon and midnight.

Setting up Java:
1) Extract ejre-1_6_0_38-fcs-b05-linux-arm-sflt-eabi-headless-13_nov_2012.tar.gz
2) Move contents to /usr/lib/java/
3) ln -s /usr/lib/java/bin/java /usr/bin/java

Extract a copy of H@H to /root/HentaiAtHome/, but note that Java won't run on 128MB of RAM alone.

We'll need to set up a swap file:

CODE
#create swapfile 2gb
dd if=/dev/zero of=/root/swapfile.img bs=1M count=2048
mkswap /root/swapfile.img
#turn on swap
swapon /root/swapfile.img
#check if it's enabled
free
#enable on reboot
echo "/root/swapfile.img none swap sw 0 0" >> /etc/fstab

Setting up H@H to run on startup.
I wanted it to run in screen, rather than as a daemon. To do this, I used /etc/rc.local:

CODE
#!/bin/bash
#
# /etc/rc.local: Local multi-user start-up script.
#
screen -dmS hath
screen -S hath -X screen bash /root/HentaiAtHome/runme.sh

Contents of runme.sh:

CODE
#!/bin/bash
cd /root/HentaiAtHome/
java -jar HentaiAtHome.jar --disable_bwm --disable_logging --skip_free_space_check --use_more_memory

Setting up the scheduled reboots:
1) Run crontab -e
2) Insert:

CODE
01 00,12 * * * /sbin/shutdown -r +1
00 00,12 * * * screen -S hath -X quit

There are probably a hundred better ways to do this sort of thing, but hey, it works. Good enough for me.

---

And a picture of the final product, for the hell of it.

Attached Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 25 2013, 13:15
Post #33
Froot



Newcomer
*
Group: Recruits
Posts: 11
Joined: 14-April 09
Level 85 (Hero)


Thanks for your extensive reply, ctxl. What I ended up doing some time ago though:

I installed the newest Raspbian and Java 8 preview. It has been running for over a week now, stable. I'm getting some "400" errors several seconds after a request has been successfully served. I don't really know why that happens, might be an issue with the eth interface.

Trust is stably at 1000, quality is okay-ish, dipping down to ~6500 from time to time (is at 9700+ right now).

So yeah, all in all, I'm happy.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 25 2013, 23:41
Post #34
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12
Level 500 (Godslayer)


QUOTE(Froot @ Aug 25 2013, 12:15) *
I'm getting some "400" errors several seconds after a request has been successfully served.
That's mostly because someone closes their tab (i.e. connection) before the image fully loads, nothing to worry about.
User is online!Profile CardPM
Go to the top of the page
+Quote Post

 
post Aug 13 2014, 08:43
Post #35
N04h



N04h_the_sheep
*********
Group: Gold Star Club
Posts: 5,018
Joined: 23-March 07
Level 183 (Lord)


Sorry about the hike, didn't want to make a new thread, but I got the new one (model B+) of these to mess around with.

Attached Image

This post has been edited by N04h: Aug 13 2014, 08:47
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 13 2014, 08:45
Post #36
N04h



N04h_the_sheep
*********
Group: Gold Star Club
Posts: 5,018
Joined: 23-March 07
Level 183 (Lord)


sorry dp

This post has been edited by N04h: Aug 13 2014, 08:47
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 13 2014, 13:55
Post #37
Pillowgirl



Grammatically Incorrect (☞゚∀゚)☞
*********
Group: Gold Star Club
Posts: 5,361
Joined: 2-December 12
Level 485 (Godslayer)


QUOTE(N04h @ Aug 13 2014, 16:45) *

sorry dp

MOD IT

SOLDER SOME PINS

DO IT NOW
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 10 2016, 00:41
Post #38
AbsoluteZero36



Lurker
Group: Lurkers
Posts: 3
Joined: 1-March 13
Level 32 (Journeyman)


Hi I'm trying to run H@H on my raspberry pi but I get the critical error the storage device does not have enough space. Is it possible to plug in a USB flash drive to add storage space?

This post has been edited by AbsoluteZero36: Apr 10 2016, 00:42
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 10 2016, 01:31
Post #39
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12
Level 500 (Godslayer)


QUOTE(AbsoluteZero36 @ Apr 9 2016, 23:41) *
the storage device does not have enough space. Is it possible to plug in a USB flash drive to add storage space?


QUOTE(blue penguin @ Mar 7 2013, 14:19) *
I use an external HDD for my H@H install and cache, the main reason for it is because the HDD is powered externally (it's one of those old and heavy HDDs that need an extra cable connected to a socket, just to supply the needed power). An USB stick can use a lot of energy and the network card will need a decent amount of energy as well. It is just a guess, but, as the raspberry is very power limited, maybe it cannot stand the power needed by both network and USB stick.


(that might not be actual with the newest RPi models, but better be safe than sorry)
User is online!Profile CardPM
Go to the top of the page
+Quote Post

 
post Apr 21 2016, 04:03
Post #40
Snelk



Lurker
Group: Recruits
Posts: 5
Joined: 8-September 12
Level 127 (Ascended)


QUOTE(AbsoluteZero36 @ Apr 9 2016, 16:41) *

Hi I'm trying to run H@H on my raspberry pi but I get the critical error the storage device does not have enough space. Is it possible to plug in a USB flash drive to add storage space?


It depends, so long as your power supply is a good quality one that meets the specs for your particular Raspberry Pi, ie. 5V/2A for the Pi 2 or 5V/2.5A for the Pi 3, and so long as you don't have too much other stuff plugged in it should work just fine. For example, I have a keyboard, optical mouse, and USB thumb drive plugged into my Pi 2B (stock clock) and I have never had any issues.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


4 Pages V < 1 2 3 4 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 27th November 2024 - 22:30