Ubuntu: Folding during specific hours

Moderators: Site Moderators, FAHC Science Team

Post Reply
MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Ubuntu: Folding during specific hours

Post by MeeLee »

I'm thinking of switching over to a day/night setup, where my folding rig will only be folding at night.
One is the cost of electricity, two is the signal is much more clean and stable at night (nicely capped at 124V in my area, while during day time it regularly goes below 118V),
And third, because of heat (I live in a hot region, and folding at night, will get 20 degrees off of ambient air).

My question is, in Ubuntu or Debian (doesn't matter which), what's the best way to turn a system on/off remotely; or via a timed schedule?
Either turn on/off the entire system, or turn on/off FAHcontrol through some sort of task host?
toTOW
Site Moderator
Posts: 6307
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: Ubuntu: Folding during specific hours

Post by toTOW »

To turn off the system in a nice way, I would rely on OS tools : shutdown command issued by a scheduled task (a cron job on Linux).

To turn the system on, I would use BIOS/UEFI wake on RTC features. It can be scripted on some machines from Linux if your BIOS doesn't have the feature.

Starting and stopping FAHClient on Linux is easier : schedule two tasks with "service FAHClient start/stop" commands when you want to start/stop the client.
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Re: Ubuntu: Folding during specific hours

Post by MeeLee »

Yes, I'd have to take a look at how to implement those scripts at bootup.
Starting and stopping the system is easy, I can just use a timer on my wall ac, and shut down the system a few seconds before.
At the moment, my system hangs during boot, when powered down (notifying there was a powerloss). All I have to do is press enter, but I'll be able to remove this later on.
Starting FAHClient right after bootup probably easy.

Stopping it at the right time, and shutting down the system, is where I'll need some advice on.
I'm sure I can just cut off the power in Linux, won't harm a thing.
But I'll lose a few percent of work that way.
toTOW
Site Moderator
Posts: 6307
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: Ubuntu: Folding during specific hours

Post by toTOW »

It depends on what you want to achieve :
- just start and stop FAH, leaving the system on (and idle)
- start and stop the entire system
- start and stop the entire system and cutting power to it.

First one is easy with a couple of automated tasks. The second one would have to mix automated tasks and BIOS tweaks. The third one is the same as the second one, with a programmable plug on the wall (which will require a bit of synchronisation between what you automate on the machine and on the wall plug).

And with a bit of electronics, you could even monitor your AC source and choose to start/stop the system only when proper voltage is delivered ... but that's another story. ;)
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Re: Ubuntu: Folding during specific hours

Post by MeeLee »

Well, to shut down my sytem, all I have to do is a 'sudo shutdown' command.
It can be executed right after the 'sudo /etc/init.d/FAHClient stop' command.
I guess I was hoping some people have experience with some sort of task scheduler.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Ubuntu: Folding during specific hours

Post by bruce »

The key here is that we need to understand what you're trying to achieve. You didn't answer toTOW's question above.

* You can do a shdo shutdown at any time, with or without stopping FAHClient -- and you can create a cron job to do that on specific (or all) days at a designated time.

* You can either pause all FAH jobs or shut down the client. (IMHO there's really no reason to stop FAHClient if all slots are paused.)
Theodore
Posts: 118
Joined: Sun Feb 10, 2019 2:07 pm

Re: Ubuntu: Folding during specific hours

Post by Theodore »

Does the client save the state at pause?
Or will some data be lost?
MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Re: Ubuntu: Folding during specific hours

Post by MeeLee »

I think some data will be lost; but it's inevitable.
Either wait until all WUs are finished, (which is hard to do on a multi GPU system), or have a portion of a percent of calculations lost at reboot.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Ubuntu: Folding during specific hours

Post by bruce »

Checkpoints are written periodically. After a pause or other interruption in the processing, FAH will restart the projects which were running from the last checkpoint that was written, so you'll have to repeat whatever work that was processed after that last checkpoint. The same is true whether you actively "pause" the WUs or not -- except for the fact that you'll have to actively "fold" (i.e.- un-pause) before the WUs resume processing.

There is no setting which allows you to "pause after then next checkpoint" although that enhancement has been suggested (and might be in a future version of FAHClient). The closest thing to that is the "finish" option which will complete the specified Wu(s) and upload the results but will not download a new assignment unless you restart the client or specify "fold" manually.
Post Reply