Browse Source

rewrite hardware

pull/2/head
rra 5 years ago
parent
commit
d20ebd2a7a
  1. 45
      content/fundamentals/hardware.md

45
content/fundamentals/hardware.md

@ -49,49 +49,64 @@ The price for electricity where I am is €0,24 per KWh so on a yearly basis tha
#### Considering power consumption at extreme ends.
A PC tower made for gaming that needs a 300 Watt supply can use up to 2,628 KWh of electricity a year which would cost up to €630. That is only a little less than the average inhabitant of this planet uses *in total during a year*[^1]. At the same time a Single Board Computer ([like this one](https://solar.lowtechmagazine.com/2018/09/how-to-build-a-lowtech-website.html) uses a maximum of 1.3 Watt (without peripherals). That comes down to 11.3 KWh or €3,20 on a yearly basis. Now these are both rough measures and power usage will likely be lower. However, this calculation does indicate that the choice of hardware and resulting power consumption do matter.
A PC tower made for gaming that needs a 300 Watt supply can use up to 2,628 KWh of electricity a year, which would cost up to €630. That is only a little less than the average inhabitant of this planet uses *in total during a year*[^1]. At the same time a Single Board Computer ([like this one](https://solar.lowtechmagazine.com/2018/09/how-to-build-a-lowtech-website.html) uses a maximum of 1.3 Watt (without peripherals). That comes down to 11.3 KWh or €3,20 on a yearly basis. Now these are both rough measures and power usage will likely be lower. However, this calculation does indicate that the choice of hardware and resulting power consumption do matter.
#### Energy consumption vs embodied energy.
While older equipment will use more power for the same (or less) performance as newer equipment this should not be your only consideration, especially when running on renewable power sources. In fact, the overwhelmingly largest part of energy usage of digital technology comes from [manufacture and not usage](https://solar.lowtechmagazine.com/2009/06/embodied-energy-of-digital-technology.html). Environmentally it makes more sense to reuse and older less energy efficient device rather than investing in a newer energy efficient device.
While older equipment will use more power for the same (or less) performance as newer equipment this should not be your only consideration, especially when running on renewable power sources. In fact, the overwhelmingly largest part of energy usage of digital technology comes from [manufacture and not usage](https://solar.lowtechmagazine.com/2009/06/embodied-energy-of-digital-technology.html). Environmentally, it can make more sense to reuse an older, less energy efficient, device rather than investing in a newer energy efficient device.
## Benefits and disadvantages of laptops as servers
Laptops make good homebrew servers since they are widely available, relatively powerful and energy efficient. Aside from that they have the benefit of having a screen and keyboard. If you are just starting out with running a server and are not yet so comfortable with the [command line and ssh]({filename}ssh.md) it can be a real benefit as you can work on the machine directly. Aside from that the laptop battery can mitigate sudden power outages, so that the laptop can shut itself down gracefully if power runs out.
Laptops make good homebrew servers since they are widely available, relatively powerful and energy efficient. Aside from that they have the benefit of having a screen, keyboard and battery.
Laptops will also have the ability to hold one or more harddisks and plenty of USB ports for connecting multiple peripherals. It is not unlikely that you have one lying around or will be able to find one in a thriftstore.
If you are just starting out with running a server and are not yet so comfortable with the [command line and ssh]({filename}ssh.md) it can be a real benefit as you can work on the machine directly. Aside from that the laptop battery can mitigate sudden power outages, so that the laptop can shut itself down gracefully if power runs out.
Laptops will also have the ability to hold one or more harddisks and plenty of USB ports for connecting multiple peripherals.
It is not unlikely that you have one lying around or will be able to find one in a thriftstore or on the second hand market.
Disadvantages can be size, sound, heat generation and power consumption (in particular if you don't tune the power management to turn off the screen).
## Single Board Computers
Arguably the ideal homebrew server hardware is the Single Board Computer (SBC). These are often very small computers on a single chip. They are aimed at hobbyists and meant for prototyping. Popular brands are RaspberryPi, BeagleBone, Hardkernel and Olimex. They typically use the same ARM processors as used in smart phones meaning they are extremely energy efficient, using only a few Watts of energy under full load. Most models don't use active cooling so they make no sound, which is a boon in domestic environments. They can also be very cheap, ranging from €10 to €50.
Arguably the ideal homebrew server hardware is the Single Board Computer (SBC). These are often very small computers on a single chip. They are aimed at hobbyists and meant for prototyping. Popular brands are RaspberryPi, BeagleBone, Hardkernel and Olimex.
![]({attach}images/homebrewserver.svg)
They typically use the same ARM processors as used in smart phones meaning they are extremely energy efficient, using only a few Watts of energy under full load. Most models don't use active cooling so they make no sound, which is a boon in domestic environments. They can also be very cheap, ranging from €10 to €50.
The disadvantages are that, compared to a laptop, they are relatively 'incomplete'. You will need at the very least get an SD card and 5V charger to use them. They don't have a battery meaning that a power outage will shut it off without warning, possibly corrupting the SD-card. In terms of performance they usually have less RAM available than a laptop. Their bus bandwith to read/write disks they can also be lacking.
Having said that there are some boards which are really well optimized for homebrew server usage, such as the Olimex boards. These have SATA ports (for connecting HDDs), are able to use Li-Po batteries, Gigabit Ethernet ports and decent amounts of RAM. You will also find many SBCs on the second hand market.
In general when using these boards have at GNU/Linux distributions optimized for single board computers such as [Armbian](https://armbian.com).
In general there are quite some Free Software distributions optimized for single board computers such as [Armbian](https://armbian.com).
## Costs
## Virtual Private Server
One of the things that might hold one back are the costs involved in the whole undertaking.
Sometimes it is not possible to take the 'home' in homebrewserver.club literally because of your Internet Service Provider.
As an example one can take my personal setup which I have been running since 2014. At the time I paid around €75 for a Olimex Micro (2ghz, 2 cores, 1GB ram) including peripherals such as a high performance SD card and power supply. Later I spent another €80 for a 2TB HDD. In terms of energy usage the upper bound is at 10Wh meaning €21 yearly.
A possible alternative is then to consider a Virtual Private Server (VPS). These are servers, that for all practical purposes (including root access) are usable in the same way as a physical server. These VPSes are usually located in datacenters and offered by hosting companies. They are software only, hence virtual, and usually multiple VPSs share a single physical machine.
So in total `€75 + €80 + €105 (€21x 5 years) = €260`. Per year this means €52 or about €4,30 a month. So while the upfront cost can be substantial, the cost over time is really manageable.
They can be found for as little as €3 a month.
If you can reuse old equipment the costs are essentially negligable since you've already been paying for your ISP connection and reuse hardware.
![]({attach}images/thomasserver.svg){: class="img-right"}
### Compared to a VPS
The great advantage of a VPS is that you won't have port restrictions, traffic shaping and generally a fast uplink. Aside from that, a VPS means no hardware maintenance and it's not your personal IP-address.
So how does this compare to a Virtual Private Server, since you can get one for like €3, right?
The downsides are that you are essentially renting, storage space tends to be relatively expensive, you might not always have full control over the kernel and OS. For the paranoid it might mean that since your entire system is running in a physical machine's RAM, it is possible to retrieve your sensitive data without you knowing.
If one compares the processing power of lower-tier VPS providers one can get 1 core 2Ghz and 2GB RAM for about €3. This is equivalent to low-end SBCs but if one starts including storage though the price quickly ramps up.
The great advantage of a VPS is that you won't have port restrictions, traffic shaping and generally a fast uplink. Aside from that, a VPS means no hardware maintenance and it's not your personal IP-address.
## Costs of the homebrew server
One of the things that might hold one back are the costs involved in the whole undertaking.
As an example one can take my personal setup which I have been running since 2014. At the time I paid around €75 for a new Olimex Micro (2ghz, 2 cores, 1GB ram) including peripherals, such as a high performance SD card and power supply. Later I spent another €80 for a 2TB HDD. In terms of energy usage the upper bound is at 10Wh meaning €21 yearly.
So in total `€75 + €80 + €105 (€21x 5 years) = €260`. Per year this means €52 or about €4,30 a month maximum. So while the upfront cost can be substantial, the cost over time is really manageable. Especially if you share it with a bunch of friends!
If you can reuse old equipment the costs would be only for electricity, since you've already been paying for your ISP connection and reuse hardware.
As for a VPS, if one compares the processing power of lower-tier VPS providers one can get 1 core 2Ghz and 2GB RAM for about €3. This is equivalent to low-end SBCs but if one starts to add storage to the VPS, the price quickly ramps up.

Loading…
Cancel
Save