I wouldn't run VMs on it, but I do run docker on it, and that works just fine.
I wouldn't run VMs on it, but I do run docker on it, and that works just fine.
1) I think the pi is not particularly power efficient.
I got this impression from this (old) article:
https://www.bitwizard.nl/wiki/Reducing_power_consumption_of_...
2) I think the pi would benefit from a more robust filesytem layout such as an overlay filesystem to allow continuous writes to /var to go to ramdisk.
Openwrt has a layout like this and it prevents flash from being burned out and prevents most problems if power is abruptly lost.
While there might be efficiency gains available, RPIs use a very small amount of power compared to a laptop. Idling a RPI4 uses 2.8 watts[0], which not only rates favorably compared to most laptops, but is far below what my charging cell phone uses. Maxed out my RPI can only hit 15W, since that's the maximum power that my official USB C adapter can output.
Now that being said, it does depend on what kind of load you're expecting to handle. If you're constantly maxing out a RPI, it is probably more energy efficient to purchase a larger server than to just keep adding RPIs. But if you're staying well below the theoretical max of a RPI, it'll consume far less than a used laptop.
> I think the pi would benefit from a more robust filesytem layout such as an overlay filesystem to allow continuous writes to /var to go to ramdisk.
This is one of the biggest drawbacks of the RPI; microSD cards cannot handle a ton of writes without frying. I've settled on using log2ram to ensure that logs are only periodically flushed from RAM to the SD card, to extend the lifespan of my cards.
Watts per low traffic website it's very efficient. CPU is generally not pegged at 100%.
For watts per CPU cycle not as much, I agree. Say it takes 10W at full power (I've not measured). That makes it 1/10th of a normal CPU. But it's like 30-40 times slower.
I've also imaged a version of that SD card, so it would be easy to just swap out and probably get things running again without much hassle.
I'm sure there are more fancy solutions with overlayfs, making the SD card read-only except for upgrades. Though I couldn't find a nice resource on it at the time.
It has only been down when the power has been out, and so far no issues with the card. It is however an A1 or A2 class card (I forget which), so supposedly design with applications in mind.
It should also be noted that a lot of issues with the Pi is due to poor USB cables / power supplies. I had another Pi that kept crashing every few days, until I measured the USB "charger" cable I was using for it. Turns out it had a resistance of almost exactly 1 Ohm. So if the Pi drew say 1A, that would be 1V loss in the cable... After I swapped cables it has been rock solid. A key point here is that a lot of SD cards do not like losing power while being written to. Avoid that and a quality SD card should have a long life.
Any suggestions? Though I'm a software engineer, I've worked mostly in app dev rather than infrastructure setup. This project is a way for me to learn more about the latter. The rpi is the easiest and cheapest option, but I have wondered if it wouldn't make more sense to use AWS or something like that. I wouldn't mind paying a few bucks a month, but more than that and I'd rather wait until I've learned a bit and know what my specific needs are. I've also considered an actual computer, but figure it's a waste of power when my initial work will probably just be figuring out the server config, HTML pages, etc.
You could host everything on your home network but there are a couple of things you should probably know before you start: 1) Some ISP do not give you static IP, meaning its extra work
2) Security - Ideally your home network has some kind of segregation, you keep your trusted devices on one, IoT or not patchable on another for example, with firewall blocking connections from dirty network to clean one. Having externally facing website potentially having direct access to personal devices and services might be an issue from security point of view.
You can sign up on AWS/Azure or any other cloud provider for free and get free credits, which might be enough for you to learn. Feel free to ask further questions if you need to
I have a running rpi for more than half a year. No issues whatsoever. But again - I have a very stable electricity and I dont remember last time it was cut not due to planned maintenance.
Also, RDP. I still hope for something so smooth in Linux, using console meanwhile.
I did some tests on a RPI3 a year or 2 ago and showing some scrolling test in a UWP app was making the whole machine lag and be unresponsive.