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?

  • Rioting Pacifist@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    16 hours 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
      ·
      12 hours 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.

    • notabot@piefed.social
      link
      fedilink
      English
      arrow-up
      3
      ·
      16 hours ago

      WoL works, but your server will take some time to come back online, but the router probably wont be able to buffer the traffic for that long, and a tcp connection would likely timeout before then anyway. You usually want to send the WoL magic packet, wait for the server to come back online, and only then start sending traffic.

      • Rioting Pacifist@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        10 hours ago

        What’s the timeout on a TCP connect?

        Could you not wake from suspend in that window? Maybe even a full hibernate?

        • notabot@piefed.social
          link
          fedilink
          English
          arrow-up
          2
          ·
          9 hours ago

          The TCP connection time out on linux defaults to a bit over two minutes, although individual client programs can use different values, and I’m assuming Windows is similar. Honestly, I was thinking about the time to boot a server, but if you’re just suspending you’d almost certainly be ok, albiet with a slight power draw even when the machine is not in use. Hibernating might also be ok as long as your hardware gets through its POST quickly.