In an effort to make the homelab more environmentally friendly, I have started to explore ways to conserve energy consumption. I always see a lot of considerations for choosing equipment that sips power, but other than avoiding enterprise power hogs and very old equipment, I don’t see a lot of advice in how to tame the server(s) you may already have.

So far I’ve looked at:

  • TLP: Adjusts CPU frequency scaling, PCI‑e ASPM, SATA link power‑management
  • Powertop: Used to profile power consumption and has a tune feature sudo powertop --auto-tune
  • cpufrequtils: Used to manage the CPU governor directly
  • logind.conf: Can be used to put the whole server to sleep when idle

Since I am the only user of my network, and since a lot of times the server sits unused until I want to engage maybe listening to my audio collection via Navidrome, or perhaps I’m working on some automation in n8n, et al, there’s no need to be at max power 24/7.

So besides just powering off and on the server, which would work but not be quite as elegant of a solution, are there other ways you have come across, read about, deployed on your own server?

ETA: Thanks for everyone’s input. I realize that the ideal scenario is to have more energy effecient equipment. Sometimes tho, this is not a ready made solution due to many constraints. The exercise was to try to squeeze out every last little power saving option I could, without obviously replacing equipment.

Many thanks.

  • Onomatopoeia@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    22
    ·
    edit-2
    2 days ago

    The number one thing you can do, by orders of magnitude, is to start with power-friendly hardware.

    For example, my previous server was an old gaming machine. It’s lowest idle power consumption was 80 watts. That was with running an OS that permitted heavy power reduction control, and enabling every power saving feature in the BIOS.

    Compare that to my 2019 Dell Optiplex Small-Form-Factor desktop I’m running as a server. The power supply is rated for 80 watts, MAX. It idles at 20w, peaks at about 70w when converting multiple videos simultaneously. This with an 8 TB enterprise drive for data.

    So 1/4 the power draw when idle, where it spends perhaps 90%+ of its time. Even things like Resilio Sync and Syncthing don’t significantly raise CPU time.

    Streaming with Jellyfin or Mediamonkey have nearly no CPU impact.

    There’s nothing in heavier hardware you could tune to get down to 20w.

    • BrianTheeBiscuiteer@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      For pure energy efficiency it’s hard to beat an SBC (raspi, rockpi). Mine does a good job with Jellyfin streaming so long as I avoid transcoding.

      • Onomatopoeia@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 days ago

        Yep.

        My Pi is about 8 watts. Really hard to beat.

        The SFF started at 12w, but swapping out the data drive for a much larger one pushed it up 5w. And now with 2 VMs always running (PiHole and a Windows VM), it hovers at 20w.

        The ancient NAS (Drobo) sits at about 15w.