I’m wondering what folks do to optimise the power efficiency of their Linux servers. I’ve never really got to the bottom of what is the best way to do this and with the current energy crisis its a pertinent topic.

I’m talking about home servers, so the availability requirements are not the same as in a corporate environment. There might be vast chunks of time during the day or night when they sit idle, and home users are more tolerant of a lag when accessing resources if it means lower energy bills.

Specifically I’ve been thinking about:

  • allowing lower power states when idle
  • spinning-down hdd’s when they’re not in use
  • MAYBE letting machines sleep/hibernate
  • setting schedules of times where you know demand will be low/zero and efficiency can be managed aggressively
  • any other quick wins I’ve missed

It would be amazing if there was one tool or one guide that helps with all of that but thats never the case, is it 😅

Thoughts?

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    43
    ·
    1 month ago

    Letting go of older inefficient hardware is no 1.

    Why run a 200w server when a 30w mini PC or 10w pi can run a dozen containers

      • slazer2au@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 month ago

        I have never measured my pi consumption but ilo says my DL380 Gen8 idles at between 120w to 180w

        • ExcessShiv@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 month ago

          My old Pi4 with SSD averaged around 7W, so only 1W lower than my mini PC, but performance and usability of my mini PC is far greater (and it comes with 1tb NVME and 16GB ram). I generally advice against using most SBCs these days unless you specifically need the pin I/O for something.

    • poVoq@slrpnk.net
      link
      fedilink
      English
      arrow-up
      17
      ·
      1 month ago

      Sadly this. I have a graveyard of nice server boards that I got cheap before realizing how power hungry they are.

      For CPUs basically anything older than gen 6 intel is too power hungry (although be careful with Xeon and xeon derived cpus, that are sometimes older gens rebadged as gen 6).

  • irmadlad@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 month ago

    I made a post about this a while back because I had some of the same concerns about power usage. (https://lemmy.world/post/41185625)

    As most people are telling you, as they told me, ‘get better, more efficient equipment’, which is great advice if you are buying, but not so helpful if you’ve already bought. First thing I’d do is get a watt meter to get a baseline of what is being consumed. You can get watt meters from Amazon, or your preferred big box vendor, for cheap.

    Once you have the baseline, then you can go about fiddling with Linux and your server, to find areas of excess power consumption. Please note tho, you’re not going to tame a $100 a month server down to $20. That’s just outside the realm of reality. However, every little bit helps. Go into your BIOS and check if there are power saving options there as well.

    I know this will go against the grain, but I have a cron that powers off the server every evening before I retire. I am the only user of my services and I have no midnight, mass Linux ISO downloads going on, so I couldn’t justify having the server run for 10+ hours idle, consuming electricity. Electricity here is fairly cheap and I also have solar panels, but still, I think it’s worth the effort to be prudent with your resources.

    In the end, the final tally was that I spend around $35 USD per month in electricity, which is far less than most people spend on a hobby.

    • irmadlad@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 month ago

      I do this via cron. Shuts down the server while I’m asleep. I haven’t gotten around to it, but I want to issue a WOL from my standalone pFsense firewall to the server, and have it power up when I get out of bed.

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    1 month ago

    I got a power-efficient mainboard and PSU. I think that’ll be the lion’s share. And I don’t have any unnecessary stuff like a GPU or extra stuff connected.

    I ran powertop and adopted the recommendations to set the various buses, peripherals and devices into powersave mode. That does a few Watts here and there. CPU of course is also allowed to save power when idle.

    And then I made the harddisks spin down after 40min of not being used. Or something like that. So they’ll automatically spin down at night and when I’m not using them. As spinning hdds consume quite a lot of power if you have multiple of them and compare it to the 15-20W or so the rest of the computer uses. The operating system is on a SSD.

    • Evil_Shrubbery@thelemmy.club
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      edit-2
      1 month ago

      Yes, ppl usually don’t really look at PSU efficiency curves.

      Random example:

      If you are gonna run on 20W most of the time you can calculate how much of a difference a certain PSU can make you (if you find a proper test that is).

      That said, I do not recommend to use shitty PSUs, safety first, the components & layout need to be good (most of consumer PSUs are fairly garbage).
      A bit like you wouldn’t use regular consumer HDDs.
      (For most ez homelab cases every other component can be cheap consumer grade tho, exemptions ofc exist.)

      • hendrik@palaver.p3x.de
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        1 month ago

        Yeah, I think the correct sticker on a PSU would be something like 80 Plus Ruby?! Everything else comes with 80+% efficiency at 20% rated load. Which is 200W for a 1000W PSU. And there’s no guarantee on what happens below that, so it might very well be utter garbage at a home server power draw of 20-30W.

        You never know without looking up the datasheets. Though, back when I built my home server/NAS, I failed to find a good one. I got a PicoPSU and a 12V power brick instead. Not sure if that’s still a thing. But I remember it was a lot of work to find proper and efficient components. And it doesn’t make any sense to put in all the effort (and money) and then burn all the saved energy, and then some more, in an average PSU.

        Some MiniPCs, NUCs and even computers also come with fairly efficient power supplies.

  • tofu@lemmy.nocturnal.garden
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 month ago

    I had to start over anyways, so I choose SSD only. Pricier of course, but I don’t need a terrible lot of space anyways.

    When I still had HDDs, they were usually used once a day for backups, and I spun them down after that.

    Optimizing power profiles and C states makes a little difference, but planning with efficient hardware from the beginning is the most important thing. Don’t use your old gaming PC if you care for power efficiency.

  • Taasz/Woof@piefed.social
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 month ago

    Newer hardware that has lower idle consumption mostly. I’ve found there’s not much to do on a typical setup as far as software optimization, as most OS’s are already set up for pretty low power usage while idle.

    HDD sleep can work if you don’t have anything accessing the drives, but with all the stuff running on my server there’s basically always some kind of activity going on so they never sleep. Less HDDs is the answer for me, I just have 2 large drives in a ZFS mirror.

    My HP box with an i5-7500 idles around 15-20W which is decently low, but I also have 2 PCs with i3-7100u mobile chips that idle at 1-2W with 32GB of RAM and an NVMe SSD, which is wild.

    Avoiding enterprise gear is key, it’s extremely power hungry.

  • SayCyberOnceMore@feddit.uk
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 month ago

    I split my loads (gigity) between the power hungry NAS and a passively cooled low power Proxmox host.

    For me, most 24/7 activities are low CPU - like Home Assistant, so it needs to be there, but it doesn’t need to do anything.

    Other VMs are ansible, uptime kuma, smokeping, etc… the most they use is RAM

    Then the (relatively) more power hungry NAS powers up 3 times a day to syncthing everything, maybe upload a backup, and if no-one’s using Immich, etc. then it’ll power back off again.

    The only other thing I have yet to downsize is my pfSense box (still a low powered device, but has fans…) and a Raspberry Pi I use for my Zigbee network.

  • MagnificentSteiner@lemmy.zip
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 month ago

    spinning-down hdd’s when they’re not in use

    I’ve just been through this recently. I decided to have my 2 backup HDDs spin down when not in use (99% of the time). I ran into an issue though where I needed them to wake up for SMART tests (which SMART didn’t trigger). Tried a few things that didn’t work so just set them to spin all the time. There’s about a 1-2w difference when they’re spinning all the time. So it’s just not something worth worrying about IMO (In the UK with high energy costs that comes out to 1.3 pence per day roughly).

    • JustEnoughDucks@slrpnk.net
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 month ago

      Spinning up and down hard drives repeatedly drastically reduces their lifespan though. Once a day or so, fine, but if you set a 30 minute idle time or something and it spins them down a dozen times per day, you are putting acceleration forces on the drive many more times than intended.

      If you have to buy a new HDD twice as often because you spin it down, any financial or environmental savings is instantly negated and in the end it is much, much worse in both respects.

      • SayCyberOnceMore@feddit.uk
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 month ago

        My NAS powers up & down about 3 times a day. Drives are all fine & healthy and some have been in there for years.

        I don’t disagree with your core point though…

        If the drive just finished spinning down and then it’s triggered for a 1 byte file, spins down, repeat… yeah, that definitely needs sorting out.

        Just the initial spin-up lag would do my head in.

        But off & on ~ daily, yeah not a problem.

  • Rioting Pacifist@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 month ago

    I use powetop on laptops to recommend config optimizations, it could run on a server too.

    hdparm can configure HDDs to powerdown, but I’ve never had any success using it on my router.

    In theory I think You could use WoL and have your router wake a device before sending traffic but I haven’t seen any guides for doing this so maybe I’m missing something.

    • irmadlad@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      In theory I think You could use WoL and have your router wake a device before sending traffic but I haven’t seen any guides for doing this so maybe I’m missing something.

      Working on this. Cron to power off the server in the evening, and WOL from my standalone pFsense box to the server to power up with etherwake.

  • superweeniehutjrs@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 month ago

    Dell Thin Client type machine with a 2TB SSD of the essentials. Backs up once a week to my gaming desktop. Has enough horsepower for Homeassistant, Jellyfin, adblocking. Enough fast USB for two 2.5GBE. Upgraded to 16GB RAM before the crisis, but could make due with 8GB. Cheaper than a raspberry pi for only a few extra watts.

  • poVoq@slrpnk.net
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 month ago

    When building you own servers from consumer hardware this is a bit difficult, but getting a PSU that actually fits to the power use profile of the server seems to make a difference. Sadly it is hard to get small PSUs with sufficient SATA power connections.

  • yaroto98@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 month ago

    When I built my NAS I intentionally bought the latest gen cpu, but kept it in to the 65W series with a GPU chip onboard. It’s an AMD Ryzen 5 7600 6-Core @ 3800 MHz. My coral usb does frigate and the integrated graphics chip does jellyfin just fine. I started with ssds, but half of them burned out pretty quick, so I replaced them with spinning rust. But, as-is it can run for an hour on my desktop grade UPS before it shuts down. My proxmox cluster is old laptops that mount an NFS drive from my NAS. So, yes, I took power efficiency into account.

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    1 month ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    IP Internet Protocol
    NAS Network-Attached Storage
    NFS Network File System, a Unix-based file-sharing protocol known for performance and efficiency
    NUC Next Unit of Computing brand of Intel small computers
    NVMe Non-Volatile Memory Express interface for mass storage
    PSU Power Supply Unit
    Plex Brand of media server package
    SATA Serial AT Attachment interface for mass storage
    SBC Single-Board Computer
    SSD Solid State Drive mass storage
    TCP Transmission Control Protocol, most often over IP
    ZFS Solaris/Linux filesystem focusing on data integrity
    Zigbee Wireless mesh network for low-power devices

    12 acronyms in this thread; the most compressed thread commented on today has 8 acronyms.

    [Thread #204 for this comm, first seen 1st Apr 2026, 10:30] [FAQ] [Full list] [Contact] [Source code]