Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go »
No member browsing this thread
Thread Status: Active
Total posts in this thread: 12
Posts: 12   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3501 times and has 11 replies Next Thread
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Boinc Task Saver

I shutdown my pc daily and used to lose the portion completed by tasks that did not have a chance to checkpoint before I shutdown.

I wrote a script that shuts the pc only after all running tasks have checkpointed.

If you're interested in finding out if it works for you too, or if you can make it better, you can find it here:

http://gallery.technet.microsoft.com/scriptcenter/Boinc-Task-Saver-6de3f2ae

Thanks,
Amir
[Jul 26, 2013 8:38:57 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Boinc Task Saver

Thanks. Whilst one task will then not loose any progress, if you run e.g. an eight core like me, the other 7 would. Think rickjb posted a strategy with later clarification how to minimize the loss of all tasks... he wants to switch running projects with long intervals with those have short ones... elaborate for you need to have both on board.

Any loss can be prevented by hibernating a device, needs to backup power, or sleep, which needs sustained power to maintain what's in memory. Hibernation works for me, just close lid, of hit power switch briefly to activate. then on power up tasks resume exactly from where they were paused... no last checkpoint regression. Booting I do rarely, only when there's a must must upgrade that requires a kernel refresh, which with KSplice on Linux does not even require that... updating while running.
[Jul 26, 2013 8:46:22 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Boinc Task Saver

Hi Rob,

Hibernation required had disk space that I did not have, but it's good it's working for you.
My windows powershell script waits for all running tasks to checkpoint on all cores and does not start new ones. You can read how it does that on the script page.

You can also use it to backup Boinc data directory and not lose any data which you cannot do with hibernation.

Powershell is windows only of course.

Thanks,
Amir
[Jul 26, 2013 9:09:09 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Boinc Task Saver

"My windows powershell script waits for all running tasks to checkpoint on all cores"

This was the point being discussed with rickjb. When you sequentially pause tasks that have checkpointed until all cores are idle, in effect you have a mean time of CPU cores not being used. If all have short checkpoint intervals, you're fine, but if there's e.g. just one CEP2 in that running lot, it could be hours before the last one checkpoints. I prefer to just run all cores and take whatever loss there is if boot is required, which is really a gain to me. If when planned to boot, I just switch to short interval crunching tasks and suspend al waiting CEP2 and let them run to the end.

Anyway, I'll have a read and surely there will be others who can fit in your approach.

cheers
[Jul 26, 2013 9:26:21 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
It's good for the project and you save power too

"in effect you have a mean time of CPU cores not being used"
"I prefer to just run all cores and take whatever loss there is if boot is required, which is really a gain to me."

Hi Rob,

I have edited this post, because on a second thought your assumption is not correct unless you run long tasks that never checkpoint.

Hibernation happens immediately, so the extra time you get before shutdown when you run the script is a gain to you and the project not a loss, even if at that time the rest of cores will be free. because you will be saving on power.

Also, what happens when you hibernate while a task is in the middle of a checkpoint (writing files)? I know from experience that when power goes off at this critical time, I end up with a computation error.

The script has a variable that lets you set a timeout to allow the last task to checkpoint before killing boinc.

If, on the other hand, you're running tasks that never checkpoint and that takes more than two hours to complete, then this script is not for you because the script (and boinc) does not know if and when a task will checkpoint and therefore will wait the entire time for the task to checkpoint or complete then terminates.

The script is a starting point for anyone that may want to modify it or make it better.

thanks,
Amir
----------------------------------------
[Edit 4 times, last edit by Former Member at Jul 27, 2013 12:56:22 PM]
[Jul 27, 2013 12:31:40 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Coleslaw
Veteran Cruncher
USA
Joined: Mar 29, 2007
Post Count: 1343
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Boinc Task Saver

There are a lot of people that use virtual machines when they are concerned about this same issue. They turn on snapshots so that it continues right where you left off. I don't bother doing it, but it is an option to explore.
----------------------------------------

[Jul 27, 2013 3:57:03 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Hibernation vs Script

Hi Coleslaw,

Virtual machines use a lot of RAM and hard disk space, and may cause a computation error if you hibernate while a task is in the middle of a checkpoint (writing files). correct me if I am wrong!

This script is low on RAM. uses RAM only for a short period of time (when you run it), not the entire time you run Boinc, and saves you on power consumption, and increases your contribution to the project at the same time.

Because the script does not shutdown Boinc immediately, it increases your contribution to the projects you crunch, while at the same time minimizing your power consumption (at the time you run it only), by shutting down cores until all tasks have check-pointed.

If, on the other hand, you're running tasks that never checkpoint and that takes more than two hours to complete, then this script is not for you because the script (and boinc) does not know if and when a task will checkpoint and therefore will wait the entire time for the task to checkpoint or complete then terminates.

If you have any suggestions to make it better, feel free to comment.

Amir
----------------------------------------
[Edit 2 times, last edit by Former Member at Jul 27, 2013 12:47:56 PM]
[Jul 27, 2013 12:11:26 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hibernation vs Script

....of course the ultimate fix is to do what I do, never turn off my machines, 24/366 wink wink
[Jul 27, 2013 1:20:37 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Hardnews
Senior Cruncher
England
Joined: Oct 11, 2008
Post Count: 151
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Hibernation vs Script

Timed startup and shutdown interests me, as the Boinc-dedicated Win 7 i7-2600k machine here is not allowed to interfere with sleep. sad

I use the 'shutdown /h' command in a batchfile called up by the Task Scheduler to hibernate the machine on a daily timed basis. This does need some small extra disk space. Hibernate files can be 12 Gb+.

Once the machine is hibernating, the Task Scheduler can be set to wake it up, by telling it to display a simple message.

So the machine runs from 07:00 to say 22:00 by itself without losing work units (on my machine.) Manually turning it off, as opposed to hibernation, means the machine won't auto-start. Note:machine is WCG dedicated- so won't affect workflow if it auto-shuts down.

The full set of shutdown commands is here:

http://pcsupport.about.com/od/commandlinereference/p/shutdown-command.htm
----------------------------------------
[Edit 2 times, last edit by Hardnews at Aug 11, 2013 7:26:31 AM]
[Aug 11, 2013 7:15:11 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hibernation vs Script

Hibernation is simple as long as it works for you and you have the disk space.

Cheers,
Amir
[Aug 11, 2013 1:52:45 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Posts: 12   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread