cooperative-computing-lab/cctools — pull request #523 by btovar (2014-08-07 15:54:15+00:00)
Title: Adds send/receive tasks ratio to specify user preference.

On highly stable and homogenous resources, we prefer to send as many
tasks as possible. This gives us more tasks execution asynchrony without
the risk of losing completed tasks do to eviction.

When the rates of eviction are higher, we prefer to receive tasks as
soon as possible, in order not to lose already completed tasks.

This commit adds the q->send_receive_ratio option, together with the API:
work_queue_send_receive_ratio(q, ratio).

If ratio = 1 we have Classical WQ: given the choice, always send. If
ratio = 0 we are "evictionphobic": always receive when you can.

Default is 0.75: if there is a choice, then, on average, send a task
rather than receive 3 out of 4 times.