cctools
Data Structures | Enumerations
category.h File Reference

Implements bookkeeping for categories of tasks and their resources. More...

#include "hash_table.h"
#include "itable.h"
#include "histogram.h"
#include "timestamp.h"

Go to the source code of this file.

Data Structures

struct  category
 

Enumerations

enum  category_allocation_t {
  CATEGORY_ALLOCATION_FIRST = 0,
  CATEGORY_ALLOCATION_AUTO = 0,
  CATEGORY_ALLOCATION_MAX,
  CATEGORY_ALLOCATION_ERROR
}
 Valid states for the lifetime of automatic resource allocations for a single task. More...
 
enum  category_mode_t {
  CATEGORY_ALLOCATION_MODE_FIXED = 0,
  CATEGORY_ALLOCATION_MODE_MAX,
  CATEGORY_ALLOCATION_MODE_MIN_WASTE,
  CATEGORY_ALLOCATION_MODE_MAX_THROUGHPUT
}
 Valid modes for computing automatic resource allocations. More...
 

Detailed Description

Implements bookkeeping for categories of tasks and their resources.

Enumeration Type Documentation

Valid states for the lifetime of automatic resource allocations for a single task.

Enumerator
CATEGORY_ALLOCATION_FIRST 

No automatic allocation, or using first step value of the two-step policy.

CATEGORY_ALLOCATION_AUTO 

Same as FIRST, FIRST is deprecated.

CATEGORY_ALLOCATION_MAX 

Using max of category.

(2nd step of two-step policy)

CATEGORY_ALLOCATION_ERROR 

No valid resources could be found.

(E.g., after 2nd step fails)

Valid modes for computing automatic resource allocations.

Enumerator
CATEGORY_ALLOCATION_MODE_FIXED 

When monitoring is disabled, all tasks run as CATEGORY_ALLOCATION_MODE_FIXED.

If monitoring is enabled and resource exhaustion occurs: Task fails. (default)

CATEGORY_ALLOCATION_MODE_MAX 

If maximum values are specified for cores, memory, or disk (either a user-label or category-label) and one of those resources is exceeded, the task fails.

                                       Otherwise it is retried until a large enough worker
                                       connects to the manager, the maximum values so far

seen for resources not specified.

CATEGORY_ALLOCATION_MODE_MIN_WASTE 

As above, but tasks are tried with an automatically computed first-allocation to minimize resource waste.

CATEGORY_ALLOCATION_MODE_MAX_THROUGHPUT 

As above, but maximizing throughput.