whiteshepherd
Posts: 44
Joined: Thu Nov 03, 2011 7:59 pm

1 Watt server challange!

Tue Apr 23, 2019 6:57 pm

As you know the Pi 0 and Pi 0W can be cut down to well under 1 watt of power. I had someone mention that Raspberry Pi would NEVER be a viable server. I remember coding and running massive servers on a 266 Cyrix and the Pi is a beast compared to that. I decided it would be cool to prove a point but also push the limits of what a Pi can do with so little power. The challenge is simple. Create a raspberry Pi server (like Pi 0/W) that runs on 1 watt or less power. Bonus credits given for finding ways to use less power and for each installed community used server daemon on this server. Post pictures and links. I'll be posting my pics in about a week. But feel free to get the race started. I'd like to see how creative people get! :)

ankith26
Posts: 103
Joined: Mon Mar 25, 2019 11:08 am
Location: Earth
Contact: Website

Re: 1 Watt server challange!

Thu Apr 25, 2019 5:05 am

I have a pi web server on a 3b version...
Since it is the 3b it consumes around 2-3 watts which is pretty good for a 3b as that is known to consume the highest power among all other versions( except 3b+) ...
I do not have a pi zero yet- but i am quite sure the same setup would run on pi zero efficiently consuming less than a Watt(with no extra devices attached)
i use standard LAMP server( linux, apache, mysql, php) and also phpmyadmin...

Here is a link to my 3b server:- http://pratt.ml
I do not keep my pi running throughout the day so do not expect the link to work at all times..
I have used https://serveo.net instead of port forwarding...I would call it best alternative for port forwarding( to be used only for small personal projects and not running web server for companies)
Also bought a free domain for testing purposes from freenom.
I have way better results than expected...
But i must tell that it runs slowly sometimes and the reason is my slow internet connection that gets only 300 kbps on average :cry:
My website is at https://pratt.ml
Hope it runs (which it wont)

hippy
Posts: 5568
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: 1 Watt server challange!

Thu Apr 25, 2019 1:44 pm

whiteshepherd wrote:
Tue Apr 23, 2019 6:57 pm
Create a raspberry Pi server (like Pi 0/W) that runs on 1 watt or less power.
Do you mean "never draws more than 200mA if using a 5V supply" ?

I am not sure how most people could really tell that was always the case as most current meters would not accurately show brief spikes which went above that.

The obvious solution to reduce power would seem to be to run the Pi at the lowest voltage possible, to under-clock it and everything else as far as possible, limit Wi-Fi to whatever uses least power, but that would impact performance.

Is there some criteria you have which defines what a server actually is, has to be able to deliver or support ?

PiGraham
Posts: 3566
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: 1 Watt server challange!

Thu Apr 25, 2019 1:59 pm

What about storage? A 2.5" 1TB SSD could use .25 to 1W depending on what it's doing. Magnetic drives will use much more than that.

hippy
Posts: 5568
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: 1 Watt server challange!

Thu Apr 25, 2019 4:29 pm

PiGraham wrote:
Thu Apr 25, 2019 1:59 pm
What about storage? A 2.5" 1TB SSD could use .25 to 1W depending on what it's doing. Magnetic drives will use much more than that.
I was thinking of a Zero in gadget mode, booted from another Pi or PC so one did not need to use any SD Card which might shave a couple of mA off things. A USB connection would allow remote storage. But does it need any ?

We also haven't defined how the Pi would be networked as a server. The first assumption would be Wi-Fi or wired ethernet but it doesn't have to be. Turning Wi-Fi and/or the LAN chip off could save a considerable amount of power. Networking can also be via USB or even PPP/SLIP.

I did think there's the possibility of handling everything using code running only in the GPU, never starting the ARM core. I don't know if that would save power and it would obviously depend on what this server has to support.

stuartiannaylor

Re: 1 Watt server challange!

Thu Apr 25, 2019 5:52 pm

I guess its down to classification but a 'home hub' is essentially a home automation server.

Turn off hdmi add either zigbee, zwave or both and storage can stay very much via SD.
Still quite a bit with all that running add wifi / bluetooth for available bridges.

I have been meaning to check out what I can squeeze onto a piZW in terms of a home automation server as the format could make a truly tiny and functional 'server'

PiGraham
Posts: 3566
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: 1 Watt server challange!

Thu Apr 25, 2019 6:04 pm

stuartiannaylor wrote:
Thu Apr 25, 2019 5:52 pm
I guess its down to classification but a 'home hub' is essentially a home automation server.
I was thinking of media server, LAMP web server, SMB storage server, a "viable server" in a full sense, with at least hundreds of GBs. A "home automation server" would be a much easier task in a tight power budget.

hippy
Posts: 5568
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: 1 Watt server challange!

Thu Apr 25, 2019 7:36 pm

PiGraham wrote:
Thu Apr 25, 2019 6:04 pm
I was thinking of media server, LAMP web server, SMB storage server, a "viable server" in a full sense, with at least hundreds of GBs.
I can agree with all that except "hundreds of GBs". I believe "however much space is left on an SD Card" would be good enough.

How to get hundreds GBs of storage consuming only 1W could be an additional but separate challenge.

Otherwise it won't be a level playing field challenge, would depend on what disk solution is found. If we discount the disk consumption, it doesn't actually matter how much there is only that there is some. And a lot of people won't even have a disk with hundreds of GB they can connect to their Pi or the means to do so.

PiGraham
Posts: 3566
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: 1 Watt server challange!

Thu Apr 25, 2019 8:57 pm

hippy wrote:
Thu Apr 25, 2019 7:36 pm
PiGraham wrote:
Thu Apr 25, 2019 6:04 pm
I was thinking of media server, LAMP web server, SMB storage server, a "viable server" in a full sense, with at least hundreds of GBs.
I can agree with all that except "hundreds of GBs". I believe "however much space is left on an SD Card" would be good enough.

How to get hundreds GBs of storage consuming only 1W could be an additional but separate challenge.

Otherwise it won't be a level playing field challenge, would depend on what disk solution is found. If we discount the disk consumption, it doesn't actually matter how much there is only that there is some. And a lot of people won't even have a disk with hundreds of GB they can connect to their Pi or the means to do so.
It's not a large disk capacity, but granted there are "server" applications that could function with far less. It all depends what the OP meant by "viable server" given the reference to historical " massive servers". You don't get many HD movies on what's left of an 8GB SD card, but it's far, far more than you need for a MQTT server.

LTolledo
Posts: 1652
Joined: Sat Mar 17, 2018 7:29 am

Re: 1 Watt server challange!

Thu Apr 25, 2019 11:05 pm

as its fairly vague, we need the "absolute" specifications of the "viable server" for the challenge.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

ankith26
Posts: 103
Joined: Mon Mar 25, 2019 11:08 am
Location: Earth
Contact: Website

Re: 1 Watt server challange!

Fri Apr 26, 2019 4:52 am

I would define a 'viable server' as something that just works! :)
All servers need not be massive, Just a simple pi for a simple server.
We need not think about storage, server speed, etc etc..
That would be overkill if @whiteshepherd had a simple requirement..
I would go about it in a simple way...
My website is at https://pratt.ml
Hope it runs (which it wont)

User avatar
Gavinmc42
Posts: 3407
Joined: Wed Aug 28, 2013 3:31 am

Re: 1 Watt server challange!

Fri Apr 26, 2019 5:47 am

PiCore Linux with busybox httpd is the smallest Linux server I have done.
Ultibo webserver example is the smallest that I have made to work.
Both of these leave plenty of room on a SD card

Harder to go lower power as both WiFi or Ethernet do take a bit of power.
About 120ma at 3.3V, about 1/2W.
This is just the physics of WiFi and Ethernet.
Bluetooth webserver? BT Eddystone beacons?

My PiCore boxes log temperature data every minute, CPU usage jumps from 1% to 2% for a few seconds ;)
Going to need a sampling current sensor and an averaging power measurement.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

PiGraham
Posts: 3566
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: 1 Watt server challange!

Fri Apr 26, 2019 7:32 am

ankith26 wrote:
Fri Apr 26, 2019 4:52 am
I would define a 'viable server' as something that just works! :)
All servers need not be massive, Just a simple pi for a simple server.
We need not think about storage, server speed, etc etc..
That would be overkill if @whiteshepherd had a simple requirement..
I would go about it in a simple way...
That leaves it wide open. "Just works" and <1W could be something microcontroller based. ESP8266, Teensy, Onion, even a MicroBit.
Last edited by PiGraham on Fri Apr 26, 2019 3:18 pm, edited 1 time in total.

hippy
Posts: 5568
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: 1 Watt server challange!

Fri Apr 26, 2019 8:47 am

PiGraham wrote:
Fri Apr 26, 2019 7:32 am
That leavees it wide open. "Just works" and <1W could be something microcontroller based. ESP8266, Teensy, Onion, even a MicroBit.
That's true, but the challenge does specify a Pi, not any of those.

If one wants minimal consumption then a Pi is not the thing to use, but "how low can we get a Pi?" is a reasonable pursuit given a Pi will often be the preferred choice.

Using a small, simple, lightweight, TCP/IP stack, as would be used on a micro, is what led me to thinking about running purely in GPU. Ultibo or bare metal if one wanted a little more than that but didn't want a fuller Linux or other OS ticking along in the background.

But I'm not convinced that executing software is where most power usage will be, though the less run the less stress there will be. I believe the big savings come from reducing hardware consumption. Hence running on a lower voltage, under-clocking, and turning peripherals off.

So I see this more as a challenge to reduce hardware consumption as far as possible but leaving something which does run, which running some sort of server proves is the case. I see the server requirement mostly as a reasonable mid-range 'just for example', more than idling but not as demanding as video playback.

User avatar
DarkPlatinum
Posts: 839
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: 1 Watt server challange!

Fri Apr 26, 2019 9:20 am

I use a LAMP (wordpress) server on my Raspberry Pi. If you want your web server to be run on a Pi 0, code the website in HTML. Snappy.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

PiGraham
Posts: 3566
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: 1 Watt server challange!

Fri Apr 26, 2019 9:38 am

hippy wrote:
Fri Apr 26, 2019 8:47 am

But I'm not convinced that executing software is where most power usage will be, though the less run the less stress there will be. I believe the big savings come from reducing hardware consumption. Hence running on a lower voltage, under-clocking, and turning peripherals off.
With switchmode regulators you don't typically save power by reducing supply voltage. You may actually lose out as a lower voltage in will usually mean a higher average current draw and bit more loss in the wiring.
Under clocking could help, but some sources suggest not. If peripherals can be turned off that should help and an alternative is to remove them

Some tips and numbers are given in this blog:
https://www.jeffgeerling.com/blogs/jeff ... rve-energy

hippy
Posts: 5568
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: 1 Watt server challange!

Fri Apr 26, 2019 11:39 am

PiGraham wrote:
Fri Apr 26, 2019 9:38 am
With switchmode regulators you don't typically save power by reducing supply voltage.
Thanks for reminding me of that. I am more used to using 5V chips powered directly from 5V supplies, where dropping the supply does massively reduce the current those chips use. I had neglected to take into account that most of the Pi chips are 3V3, supplied through reasonably efficient regulators from 5V.

There would be little gain until the supply were below 3V3. I have seen evidence that a Pi A and Zero runs at 3V0, and vaguely recall someone suggesting 2V7 was okay. That should save something but not as much as I was hoping for.

Unfortunately full circuit diagrams and datasheets aren't available to determine what the absolute limit would be for any Pi. And, with undocumented changes made to components, what may work with one version of a board may not work for another, even if they are silk-screened with the save version number.

Added : Seems the BCM43438/CYW43438 Wi-Fi+BT chip on a Zero W requires 3V0 minimum, and 3V2 for "optimal RF performance", so that would set a minimum if that is being used on a Zero W.

Looking at the datasheet, and current consumptions, "250 mA nominal, 450 mA maximum, 800 mA peak maximum", if VBAT is to 3V3 ( which it likely is ), it is arguably not possible to have a Pi Zero W consuming less than 1W if the chip is being used if we stick with a never exceeds 200mA @ 5V definition.

ankith26
Posts: 103
Joined: Mon Mar 25, 2019 11:08 am
Location: Earth
Contact: Website

Re: 1 Watt server challange!

Fri Apr 26, 2019 2:53 pm

It is specified that the OP wants a raspberry pi(zero) though...
EDIT:-
I think the discussion has kind of deviated from the original post.
I can imagine @whiteshepherd 's reaction to this discussion that went off the original post
But now the discussion is back to the pi
My website is at https://pratt.ml
Hope it runs (which it wont)

hippy
Posts: 5568
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: 1 Watt server challange!

Fri Apr 26, 2019 6:31 pm

ankith26 wrote:
Fri Apr 26, 2019 2:53 pm
It is specified that the OP wants a raspberry pi(zero) though...
Technically "Create a raspberry Pi server (like Pi 0/W) that runs on 1 watt or less power", is only a "like", but using a Zero or Zero W would be the obvious candidate as those draw least power to start with.

A Zero uses less than the Zero W, but doesn't have Wi-Fi so has no obvious means to connect to a network and be used as a server without an external ethernet or Wi-Fi dongle.

A Zero W has Wi-Fi but uses more power.

I'm not convinced it's even possible with a Zero W the way the specification is for the challenge as it stands. As soon as the Wi-Fi is communicating the power consumption limit it's not got to exceed would likely be broken. And it's possibly the same when using a dongle with a Zero.

User avatar
Gavinmc42
Posts: 3407
Joined: Wed Aug 28, 2013 3:31 am

Re: 1 Watt server challange!

Sat Apr 27, 2019 3:01 am

A Zero with serial port SLIP based Ethernet?
A Ethernet module based on a 28J60 uses 160ma at 3.3V transmitting , 120ma active.
It could save a bit of power waking up the Zero with the interrupt output pin.
But a server is not a server unless serving data.
So Zero on and transmitter active.

I have yet to find a low power Ethernet chip.
The LAN9214 has currents of 180-288ma at 3v3.
The physics involved in switching Cat5 differential wiring at 10-100MHz freq requires a certain minimum amount of power.

The lowest power server would be Bluetooth Eddystone beacons that just serve a HTML address.
A Zero W could do this too, BT is about 20ma transmitting.
Is there such a thing as a BT server that serves pages of info?

Museum displays with barcodes for beacons codes that serve info on the displays?
HTTP over BT?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

hippy
Posts: 5568
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: 1 Watt server challange!

Sat Apr 27, 2019 11:38 am

Gavinmc42 wrote:
Sat Apr 27, 2019 3:01 am
A Zero with serial port SLIP based Ethernet?
Or gadget mode and use a USB connection, both of which I suggested. But do either fit the challenge specification ? We don't know because there isn't a full specification.

To be a usable server I would say 'no', argue it has to be standalone, in the sense that it can connect directly to a router, hub, switch or the network infrastructure without needing a PC or other device which must be used to enable it to connect to a network. Or the power consumption of that has to be included as part of the Pi server consumption.

So that appears to mandate wired ethernet or Wi-Fi.

We need to start with what consumption is required for that before looking at anything else.

I would also say, in terms of being a server, the very minimum it would have to be able to do is serve up a page of content to any arbitrary web browser.

User avatar
Gavinmc42
Posts: 3407
Joined: Wed Aug 28, 2013 3:31 am

Re: 1 Watt server challange!

Sun Apr 28, 2019 1:14 am

Duty cycle is a consideration.
A Zero W might be using 1.5W when transmitting but if only doing that for 25% of the time then an average would be around 1W?
A B+ with Ethernet would be around the same?

A SD card would use lower power than a SSD or USB stick?
No need for HDMI so that part of the SoC can be shutdown.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
HermannSW
Posts: 1307
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: 1 Watt server challange!

Sun Apr 28, 2019 12:57 pm

I have many Pi Zero/Pi ZeroW, and don't want to deviate from the discussion, but ask a Pi question at the end.
Yesterday I did look at ESP32-CAM module and was really surprised that it needs only 186mA at 3.3V (0.61W) for running
  • ESP32 CPU cores
  • Wifi
  • and ov2640 camera
in CamWebServer example application.
I think current goes through the roof using Raspberry cameras, perhaps USB cameras don't use that mach current?
What would a minimal ZeroW based CamWebServer consume?
It seems best to power ZeroW by 3.3V instead 5V to get low Watts ...

https://twitter.com/HermannSW/status/11 ... 8050680832
Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

whiteshepherd
Posts: 44
Joined: Thu Nov 03, 2011 7:59 pm

Re: 1 Watt server challange!

Sun Apr 28, 2019 9:07 pm

Ok, as the original poster I'm going to be more clear. The goal of this "for fun" contest is to see what kind of Raspberry Pi server we can build that will run stable on 1 watt or less (either under 1 watt all the time or averaging less than 1 watt just post which). Voltage/amps combo used don't matter as long as that combo is 1 watt or less. The server can be anything and it can be any Pi though Pi Zero/W is recommended. Like I said it doesn't mater what you run. Just surprise us what creativity you came up with to run so efficient and all the services you can run at that power. There are many ways you can cut power down on a Pi 0/W. Turn off LEDs, turn off HDMI (big one), bypass linear power regulator and use a high efficiency buck. As far as storage there are some extremely efficient SSDs out there. If you can't hit less than 1 watt power feel free to post what you were able to do (we'd still like to see) and perhaps others will offer suggestions.

As for myself still waiting on more parts so 4-5 more days (live in the boonies) and my server will be posted. To measure power used for myself I will put a modest capacitor in parallel to smooth spikes and use a ohm meter in series with a battery to give a good measure of my watts used when posted.

Good luck everyone and look forward to seeing all the creativity. :)

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11993
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: 1 Watt server challange!

Mon Apr 29, 2019 12:54 am

Don't you realise that a typical 10/100MB ethernet connection alone uses about 1/2Watt, to send out ethernet signals?

good luck with this! :mrgreen:

Return to “Networking and servers”