mr rive
Posts: 4
Joined: Sat Dec 31, 2011 3:28 pm

Re: Looking for a low power LAMP server solution, is this it?

Sat Dec 31, 2011 3:39 pm

hello!

I am not very technical; altho I do make use of debian stable to run a LAMP server at home from an old Cyrix based board. It basically sits in the cupboard and munches 30w of electricity 24/7. And the cheap old ATA HDD keep dying of natural causes etc.

The server currently hosts a SMF forum with a low level of traffic, all of which fits within 50mb of disk space and 128mb of ram (comfortably).

My main interest from the Pi as a device stems from its low power usage and obviously considerably reduced physical footprint. It seems ideal to me as a far more elegant solution than my clunky old 30kg steel box guzzling my kwh's ..

My only question really, is storage. I'm going to have to use an SDCARD and I suspect trying to run MYSQL on one of those will end in tears sooner rather than later yes?

I read on the forums here about people proposing hooking up external HDD and the like via USB caddies (?) yes? Will the device have enough power from its power source to spin up a 2.5" HDD over USB in this fashion?

Is there a way to use solid state storage and MYSQL together without nuking cards in short order and having to replace them and face up to data loss?

Please excuse my noobisms, but I am seeing this great low power, tiny device which I think would make an excellent home server and save me literally hundreds of pounds a year in running costs. I'm just not sure how I can get round the need for a mechanical HDD?

- Chris

harmlessdrudge
Posts: 6
Joined: Sat Dec 31, 2011 6:05 pm
Contact: Website

Re: Looking for a low power LAMP server solution, is this it?

Sat Dec 31, 2011 6:16 pm

Google Tonido.

I'm running an Asus RT-N16 which may be up to the job (see http://wombatdiet.net/2011/10/.....16-router/ for some leads) but MySQL might gobble all the RAM. For now I am using a mini-ITX box built with a Jetway motherboard; bits purchased from LinITX. I recently bought an Asus E45m1-1 Pro motherboard (fanless!) to build a silent "desktop" that will live under my desk (where it will be not seen and not heard). It's great apart from the video not yet being supported by Ubuntu -- it works but not as it could with proper support. Draws about 25W max with a laptop harddrive.

lyzby
Posts: 24
Joined: Sun Nov 20, 2011 3:34 am

Re: Looking for a low power LAMP server solution, is this it?

Sat Dec 31, 2011 6:17 pm

With 50mb of storage needed and surely a lot less than 128mb ram needed on the R-Pi, could you not just run the whole thing in the 256mb ram of the B model, perhaps with a ram drive?

Then you would have the issue of syncing to SD storage from time to time, but depending on how interactively data changed, that might not be much of an issue.  How critical is it that no updates are lost?

(Exactly how to do this, I don't know, but I would suspect that it has been done.)

lyzby
Posts: 24
Joined: Sun Nov 20, 2011 3:34 am

Re: Looking for a low power LAMP server solution, is this it?

Sat Dec 31, 2011 6:30 pm

On the other hand, 30 watts times 24 hours times 365 days is about 263kWhrs.  Don't know what your kWhr rate is, but it might well be less than 20 pounds a year which your present device costs, if I have figured right.

I know, it's the principle of the thing.  The R-Pi +wants+ to be in your cupboard.

lotus49
Posts: 9
Joined: Sat Dec 24, 2011 7:09 pm

Re: Looking for a low power LAMP server solution, is this it?

Sat Dec 31, 2011 7:11 pm

I have run a LAMP server on a device that was roughly the same spec as the model B and it coped absolutely fine.

As for the SD card issue, it really depends.  These devices are nowhere near as delicate as people seem to think.  Most modern cards incorporate wear levelling and if you use one of these you'll probably be fine.  Even if you don't, you are still unlikely to see any problems if the amount of data written is fairly low.  I would run an rsync backup to somewhere else on your network regularly and that way you can restore everything quickly in the event of a problem.

foo
Posts: 52
Joined: Thu Dec 29, 2011 12:49 am

Re: Looking for a low power LAMP server solution, is this it?

Sat Dec 31, 2011 7:19 pm

Yeah, I wouldn't worry about the longevity of SD cards either.  In my experience, they'll either fail very early on ("infant mortality") or last as long as you use them.  They've made a ton of advances in flash technology since they first came out.

pvgb
Posts: 51
Joined: Sat Oct 15, 2011 9:53 pm

Re: Looking for a low power LAMP server solution, is this it?

Sat Dec 31, 2011 7:37 pm

I have also run a LAMP machine ( admittedly with more RAM ) with similar specs, and It has run a low traffic Wordpress installation for over a year with no real problems. ( The 4G card is about half full ). I don't see a Simplemachines install being any different.

You may have to turn up your heating in the cold weather.

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Looking for a low power LAMP server solution, is this it?

Sat Dec 31, 2011 7:47 pm

The Raspberry Pi sure would make a nice low power server.

30 Watt is going to cost you around £40 pa today.

A Raspberry Pi may (depending on load) go as low as £2 pa.

Network performance should be around 5 MB/s which will be good enough for basic media streaming as well.

You can use a 2.5" HDD no problem. All you need is a 2.5" HDD disk enclosure and a 2.5" HDD! The costs of HDDs is rubbish at the moment because of the floods. EDIT: Simple technically, just need a USB cable, the enclosure & HDD. You will need a Model B for the USB & Ethernet port.

You are best getting a nice laptop 2.5" HDD because they use less power and will last a lot longer when used with an energy saving mode. This will add 6 Watts (£8) or so. 1 W or so if the disk can spin down.

Now if low power you want true low power then you need to consider a few more things.

For low power it would be best to stick with the SD flash card.

The problem here is that flash memory cards do not like being written too over and over. Internally Linux will be writting to logs and then you will have your server updates. You can mask the Linux logs by putting the log files on a ramdisk. The server writes only you know. Estimate the load and check against your SD card reliability figures.

As said SD cards are a lot better these days, they will die quicker than an HDD though.

As said it depends on how much is written. I will not use PHPMyAdmin for example as it writes every few seconds to a configuration file  (log file I would accept).

Have a good backup policy, use rsnapshot to backup to the 2.5" HDD every hour or so.

That way you should only waste an extra 1 Watt on the HDD idling whilst having a pretty good backup policy.

HB
Posts: 43
Joined: Sun Jan 01, 2012 9:49 am

Re: Looking for a low power LAMP server solution, is this it?

Sun Jan 01, 2012 10:17 am

Don't worry too much about the longevity of flash storage. You're unlikely to wear it out with this kind of usage for some time.

With that said though, there is some wisdom in having the database off the SD card, but it need not be a spinning magnet hard drive. A USB thumbdrive would do nicely, use barely any power and one that's easily large enough would cost about as little as the Raspberry Pi itself so even if you do wear it out replacing it is a simple and inexpensive matter. Just make sure you do regular backups of the database, but with your history of hard drives there you probably already do.

I've got a PandaBoard I'm currently using as a lightweight home server that I'm doing a similar thing with.

User avatar
Jongoleur
Posts: 1179
Joined: Thu Aug 11, 2011 12:47 pm
Location: O'erlooking the sea, and all those effin windfarms...

Re: Looking for a low power LAMP server solution, is this it?

Sun Jan 01, 2012 10:37 am

If you get a desktop external hard disk (ie one with its own PSU) then its perfectly feasible to hang it off an unpowered hub.  It also puts less strain on the host system as it doesn't have to support the power requirements of the hard disk.

I've a Sheevaplug (slightly similar to a Pi but more expensive) that I use to download and serve podcasts from various sources to my LAN.  Using an externally powered hard dsk, I've not had any problems (so far...) and its been run 24/7/365.

One of the uses I will have for the Pi is to replace the Sheevaplug.
I'm just a bouncer, splatterers do it with more force.....

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Looking for a low power LAMP server solution, is this it?

Sun Jan 01, 2012 10:53 am

If you go with flash then minimise your writes, use a disk that has wear leveling and has plenty of free space.

Flash is better than is was and a HDD will fail if it gets hot.

I missed that your data fits on 50MB. Even if your flash fails every year then you could buy a bag of 128MB flash cards for peanuts.

10 years of flash card failures may be cheaper than a small disk.

User avatar
cnxsoft
Posts: 191
Joined: Sat Oct 15, 2011 2:33 pm
Location: Chiang Mai, Thailand
Contact: Website

Re: Looking for a low power LAMP server solution, is this it?

Sun Jan 01, 2012 3:08 pm

If you worry about data loss, you could always do daily backups to a remote server.

ghans
Posts: 7874
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Looking for a low power LAMP server solution, is this it?

Sun Jan 01, 2012 3:12 pm

Some time ago I found this , which may be highly relevant if you want to save electricity:

http://www.earth.org.uk/note-o.....setup.html

The Sheeva is > 1 GHz and has additionally Tomcat running , but still it may be a starting point for you.
Somewhere the author also shows how he tries to decrease flash wear , have a look.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

foo
Posts: 52
Joined: Thu Dec 29, 2011 12:49 am

Re: Looking for a low power LAMP server solution, is this it?

Sun Jan 01, 2012 11:41 pm

Even if you have little data, get a nice roomy SD card.  The wear leveling will make the impact of your data very thin on the longevity of the card as a whole as it spreads out that small data across the card.  Just go for the best $/GB in your price range.

mr rive
Posts: 4
Joined: Sat Dec 31, 2011 3:28 pm

Re: Looking for a low power LAMP server solution, is this it?

Mon Jan 02, 2012 1:26 am

Thanks for all the great advice and wisdom!

A mechanical hdd is definitely out. Great idea about using a thumb drive and a larger SD card for longevity.

I was looking at SSD and price tags. You can get 8GB disks with 3 year warranty for £30 now. I didn't realize that. 2.25w power consumption. Just too expensive still and for my needs overkill. But food for thought ..

Overall the SD card makes sense as suggested. I have literally a dozen or more kicking around the place and they are so easy and cheap to bulk buy now. Periodic backups and a ramdisk for the database makes best sense I think. The Pi has plenty of ram for that.

I love the idea of using a thumb drive for any larger files I wanted to make available and for backups. I usually backup my sql dumps with a simple script that tarballs it, then gzips it and emails it to a gmail mailbox. Since they give you near unlimited storage, works great. Guess I'll continue with that.

Thanks again for the ideas!

jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Re: Looking for a low power LAMP server solution, is this it?

Mon Jan 02, 2012 1:44 am

cnxsoft said:


If you worry about data loss, you could always do daily backups to a remote server.


Buy two RPis and run them in master-master replication mode

User avatar
Jongoleur
Posts: 1179
Joined: Thu Aug 11, 2011 12:47 pm
Location: O'erlooking the sea, and all those effin windfarms...

Re: Looking for a low power LAMP server solution, is this it?

Mon Jan 02, 2012 9:35 am

mr rive said:


I was looking at SSD and price tags. You can get 8GB disks with 3 year warranty for £30 now. I didn't realize that. 2.25w power consumption. Just too expensive still and for my needs overkill. But food for thought ..


After seeing your comment on the relatively low prices for SSD, I had a look too.  For 12 quid more, you can get a 32GB SSD.  Its almost worth getting one and a six quid  SSD-USB enclosure to accompany it.

OTOH, a 32GB USB memory stick can be had for as little as 16 quid (7DayShop), although that is USB2. USB3 sticks are currently twice the price, though the performance of the USB2 stick should be adequate enough.

Or how about a 64GB USB stick for 63 quid?
I'm just a bouncer, splatterers do it with more force.....

HB
Posts: 43
Joined: Sun Jan 01, 2012 9:49 am

Re: Looking for a low power LAMP server solution, is this it?

Mon Jan 02, 2012 10:17 am

Jongoleur said:


OTOH, a 32GB USB memory stick can be had for as little as 16 quid (7DayShop), although that is USB2. USB3 sticks are currently twice the price, though the performance of the USB2 stick should be adequate enough.


Well, the Raspberry Pi only has USB2, so buying a USB3 thumbdrive to use exclusively with it would be a bit of a waste of money.

mr rive
Posts: 4
Joined: Sat Dec 31, 2011 3:28 pm

Re: Looking for a low power LAMP server solution, is this it?

Mon Jan 02, 2012 10:47 pm

Hehe yeah it seems a massive waste buying an SSD to run over a 32mb/s legacy USB port. But ..

Even tho you'd effectively be castrating the thing, it would be headache free storage solution for (probably) ever.

Does take the "total" cost up to nearly £80 tho. Meh.

Return to “General discussion”