FoldingAtHome / fah-issues

49 stars 9 forks source link

Applying Finish function to slot(s) that's attempting to download a new WU should cause it to stop searching. #1375

Open PantherX opened 4 years ago

PantherX commented 4 years ago

From: https://foldingforum.org/viewtopic.php?f=106&t=34395

When pausing the slot, any downloads should be terminated but that doesn't happen. However, it may mean that any upload would also be terminated if pause, unless uploading was exempted from this behavior.

`5:30:43:WU00:FS01:Requesting new work unit for slot 01: READY gpu:0:TU116 [GeForce GTX 1660] from 140.163.4.231

05:30:43:WU00:FS01:Connecting to 140.163.4.231:8080 05:30:45:FS01:Paused 05:31:18:WU00:FS01:Downloading 7.92MiB 05:31:24:WU00:FS01:Download 18.14% 05:31:30:WU00:FS01:Download 42.60%`

shorttack commented 4 years ago

Debatable, but marked as an Enhancement. Implementation questions to answer:

  1. Should uploads be terminated by PAUSE? Probably not given the incentives of the project. If the work is done, get it back to the Work Servers.
  2. Should downloads be terminated by PAUSE? Terminating the download means all the server work in communications to date is lost. If the user is toggling Pause/Unpause, that's an enormous burden on a million-device network. With's today's loads, I'd argue this is an unnecessary waste of work. However, what if a slot at Ready and no downloads in progress responded to a Finish command by ceasing/pausing comms? That would be elegant and easy to implement.
PantherX commented 4 years ago

I definitely agree that it would be better to not terminate upload.

I think that terminating the download would prevent a downloaded WU from just sitting and not being processed. However, I am not too attached to this behavior so whatever benefits science, I support that :)

ipkh commented 4 years ago

The server workload in this case is almost certainly nil. In most cases the AS already replied no assignment and the client is awaiting its retry timer. In those cases it causes no loss of productivity as the systems are already overloaded. But it reduces the opportunity for system management if we say finish to clean up while a slot us in limbo download and it manages to grab a unit. For instance if I want go game or do some productivity work I can press finish and do something else while the WU finishes.

bb30994 commented 4 years ago

The present Finish function was created when every client had a single slot, and it works fine in that situation. Today, (almost) every client has multiple slots, and questions about what happens to the other slots are certainly valid. The Finish function can be applied either globally or to a single slot. The global command should be applied to each slot,, whether they're folding or seeking a new assignment.

Maybe a better title would be: Applying the Finish function to a slot that's attempting to download a new WU should cause it to finish searching.