Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Power management on server?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
The_Great_Sephiroth
Veteran
Veteran


Joined: 03 Oct 2014
Posts: 1364
Location: Fayetteville, NC, USA

PostPosted: Mon Aug 21, 2017 10:05 pm    Post subject: Power management on server? Reply with quote

On shell-only servers doing tasks like a sane server, cups server, or Samba server, what packages should I use for power management? I already install acpid and set it to start on the default runlevel for events such as power button presses. I know I have cpupower and upower. Both normally get installed on workstations. Which (both?) should I install on a server?
_________________
Ever picture systemd as what runs "The Borg"?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Tue Aug 22, 2017 7:15 pm    Post subject: Reply with quote

I'll be honest with you, I do care about power consumption but the thing I hate most about server power consumption is that they need to be "operationally ready on demand" and waiting it for booting (if it even boots properly) or spinning up disks gets really tiring fast.

Upower deals with suspend/hibernate, two features that I'd rarely if ever use on a true "server" as waiting for a server to serve my requests is a pain. Technically hibernate is a very rare possibility - in case I need to temporarily and quickly shut down the machine in an emergency and don't want to go through a full shutdown sequence.

I also found that on a properly C1-C7 working Cstate (ACPI) machine, CPU frequency doesn't matter way too much as long as you're not overclocking and need to bump up voltage. So let it run whatever default frequency you bought the machine to run at, unless you don't care about slow and just leave the CPU underclocked all of the time.

Up to you, what are your key objectives? Does it need to be ready 24/7? A lot of the time a workstation profile is sufficient but I don't want my machine to be asleep when I need to use it remotely and have to coax it to wake up...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
The_Great_Sephiroth
Veteran
Veteran


Joined: 03 Oct 2014
Posts: 1364
Location: Fayetteville, NC, USA

PostPosted: Wed Aug 23, 2017 5:39 pm    Post subject: Reply with quote

I guess I only need CPUPower then. The server will NEVER hibernate or sleep. I wasn't sure what upower did, I only know I need it with KDE on my workstations. I will let cpupower set the governor to ondemand and let it be. It is an AD DC with DHCP, DNS, VPN, and file services.
_________________
Ever picture systemd as what runs "The Borg"?
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Wed Aug 23, 2017 7:05 pm    Post subject: Reply with quote

I wish drive spin-down were more straightforward. I keep my backup drives unmounted, except while I'm backing them up. I'd really like to spin them down, too. It's only once a day, so it's not that much wear and tear. I looked into it once, but I could only get one of my drives to spin down on command. (hdparm)
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Wed Aug 23, 2017 8:22 pm    Post subject: Reply with quote

They should spin down fine, I have machines that spin down...but yes having them mounted tends to hurt the chances of them stop spinning.

"mounted" also implies use of LVM and especially md. Having these used also counts as being mounted even if the overlaid filesystem isn't being used.

Once again, at least for me, servers need operational readiness. If the disks are spun down and unmounted, that means at least you have to manually log in and mount them before you can use NFS or SMB or whatever.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Wed Aug 23, 2017 10:23 pm    Post subject: Reply with quote

How do you spin them down? I tried various USB options to no avail, but I'm willing to accept that I missed something. I got one drive to spin down with hdparm, but not the others. These are only backup drives that I'm wanting to spin down, so that would get taken care of by the cron job.... Spin up, back-up, spin down.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Thu Aug 24, 2017 12:08 am    Post subject: Reply with quote

USB there's no guarantee. It depends on your USB chipset whether it will spin down or not and there are a lot of cheap ones that do not spin down.

Only reliable spin down are direct connect SATA/IDE. I avoid USB like the plague, again for reliability. USB isn't reliable imho.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Thu Aug 24, 2017 12:20 am    Post subject: Reply with quote

But when it's a portable drive, meant to be swapped with the one in my office at work, USB is pretty darned convenient.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
The_Great_Sephiroth
Veteran
Veteran


Joined: 03 Oct 2014
Posts: 1364
Location: Fayetteville, NC, USA

PostPosted: Thu Aug 24, 2017 11:23 pm    Post subject: Reply with quote

I leave my drives at the default settings. I'd prefer they never stop. Starts and stops shorten desktop/server drive lifespan more than staying live.
_________________
Ever picture systemd as what runs "The Borg"?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2512
Location: Canada

PostPosted: Fri Aug 25, 2017 5:08 pm    Post subject: Reply with quote

On a server (even home server) I never suspend/hybernate or spin down disks (spin up/down is what kills spindle disks in the long run, in constant on state they are happy for many years), so I don't need any user level power management. Modern CPU's happily go into lower power state by themselves when the kernel is properly configured.
That leaves you with power used by disks - choose the ones that use less, they usually use just 1-2 watts when spinning idly
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3254
Location: de

PostPosted: Fri Aug 25, 2017 5:43 pm    Post subject: Reply with quote

I'm using a small ARM based NAS server at home with a lot of installed services.

The NAS contains 2 harddisks: 1 SSD (system) and 1 HDD (media + downloads) and runs 24/7. Via udev rule I put the HDD after 30 minutes inactivity into standby mode. For the rest of the system I've installed Powertop, which put's some devices (e.g. USB) into a powersave mode.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Fri Aug 25, 2017 6:12 pm    Post subject: Reply with quote

Yeah I don't usually let disks spin down, nor do they want to due to the random disk traffic.

My main server is a Core2 Quad that I leave up 24/7, it runs VMs and now has three 2TB disks running root on LVM over MD RAID5. No chance getting these to spin down (plus, one of its VMs is a public facing webserver and never know who submits a HTTP request). Due to RAID5, files are distributed across the disks and need to deal with parity as well.

I do have another machine I use as a disk backup and is loaded with random hard drives. It readily can spin disks down when I leave the disks unmounted as I only need it for backing up the main server. Oddly enough, I wish these SATA disks wouldn't all spin up at the same time on boot (does not appear to be an option for stagger start) as the original power supply had trouble spinning them all up simultaneously. After the disks are spinning, the new beefier power supply is complete overkill. Grr.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
The_Great_Sephiroth
Veteran
Veteran


Joined: 03 Oct 2014
Posts: 1364
Location: Fayetteville, NC, USA

PostPosted: Mon Aug 28, 2017 2:39 pm    Post subject: Reply with quote

Doesn't the BIOS start the disks initially? Staggering may be a BIOS option. Some of my systems stagger them prior to POST, others do them all at once.
_________________
Ever picture systemd as what runs "The Borg"?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Mon Aug 28, 2017 2:53 pm    Post subject: Reply with quote

BIOS can start disks, but if the disks come up on their own when power is applied, it's too late.

The feature that is desired is on the disk themselves - feature is usually called "delayed start" or "stagger start". Old SCSI drives meant for arrays have a jumper to enable this, and I think some modern hard drives have a firmware hack to enable this as well.

Maybe someday there's an hdparm setting to do this as a standard...

---

Actually when one looks, you get an answer.

hdparm supports a -s option to enable stagger start. However it's one of these "VERY DANGEROUS" options... and that it probably only works with WD disks...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum