| | 88 | == Runtime-based credit via trickle messages == |
| | 89 | |
| | 90 | If you have very long-running jobs (a week or more) you may want to |
| | 91 | grant credit incrementally. |
| | 92 | To do so: |
| | 93 | |
| | 94 | * Have your application periodically send [TrickleApi trickle-up messages] |
| | 95 | with variety '''runtime''' and content |
| | 96 | {{{ |
| | 97 | <runtime>X</runtime> |
| | 98 | }}} |
| | 99 | where X is the runtime since the last trickle message. |
| | 100 | |
| | 101 | * Run the '''trickle_credit''' daemon as follows: |
| | 102 | {{{ |
| | 103 | trickle_credit --variety runtime --max_runtime Y |
| | 104 | }}} |
| | 105 | where Y is the limit on runtime |
| | 106 | (typically the period of the trickle messages). |
| | 107 | |
| | 108 | * Run your validator for the app with the '''--no_credit''' option |
| | 109 | |
| | 110 | The '''trickle_credit''' daemon grants credit in proportion to (runtime * CPU FLOPS), |
| | 111 | hence this approach should be used only for applications with only single-CPU versions. |
| | 112 | |
| | 113 | This approach is not device-neutral because hosts with the same peak FLOPS |
| | 114 | may have different actual FLOPS for the app version. |
| | 115 | |