| | 186 | |
| | 187 | == An idea for prioritizing batches == |
| | 188 | |
| | 189 | Goals: |
| | 190 | * Give short batches priority over long batches |
| | 191 | * But don't let a long stream of short batches starve long ones |
| | 192 | * Enforce quotas over long term |
| | 193 | |
| | 194 | For each user U, we maintain a "logical start time" LST(U). |
| | 195 | LST(U) is always at least the current time. |
| | 196 | |
| | 197 | When U submits a batch B, LST(U) is incremented by an amount |
| | 198 | |
| | 199 | R / share(U) |
| | 200 | |
| | 201 | where R is the expected runtime of B given the project's entire resource. |
| | 202 | |
| | 203 | Each batch B has a "logical end time" LET(B). |
| | 204 | This is set when the batch is submitted as |
| | 205 | |
| | 206 | LST(U) + R |
| | 207 | |
| | 208 | Priority is given to the batch for which LET(B) is least. |