cctools
category.h File Reference
#include "hash_table.h"
#include "itable.h"
#include "histogram.h"
#include "timestamp.h"
#include "bucketing_manager.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,
  CATEGORY_ALLOCATION_GREEDY_BUCKETING,
  CATEGORY_ALLOCATION_EXHAUSTIVE_BUCKETING
}
 
enum  category_mode_t {
  CATEGORY_ALLOCATION_MODE_FIXED = 0,
  CATEGORY_ALLOCATION_MODE_MAX,
  CATEGORY_ALLOCATION_MODE_MIN_WASTE,
  CATEGORY_ALLOCATION_MODE_MAX_THROUGHPUT,
  CATEGORY_ALLOCATION_MODE_GREEDY_BUCKETING,
  CATEGORY_ALLOCATION_MODE_EXHAUSTIVE_BUCKETING
}
 

Detailed Description

Implements bookkeeping for categories of tasks and their resources.

Enumeration Type Documentation

◆ category_allocation_t

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)

CATEGORY_ALLOCATION_GREEDY_BUCKETING 

Use the greedy bucketing algorithm to label resources.

CATEGORY_ALLOCATION_EXHAUSTIVE_BUCKETING 

Use the exhaustive bucketing algorithm to label resources.

◆ category_mode_t

Valid modes for computing automatic resource allocations.

Enumerator
CATEGORY_ALLOCATION_MODE_FIXED 

When monitoring is disabled, all tasks run as WORK_QUEUE_ALLOCATION_MODE_FIXED.

If monitoring is enabled and resource exhaustion occurs for specified resources values, then the task permanently fails.

CATEGORY_ALLOCATION_MODE_MAX 

When monitoring is enabled, tasks are tried with maximum specified values of cores, memory, disk or gpus until enough statistics are collected.

Then, further tasks are first tried using the maximum values observed, and in case of resource exhaustion, they are retried using the maximum specified values. The task permanently fails when there is an exhaustion using the maximum values. If no maximum values are specified, the task will wait until a larger worker connects.

CATEGORY_ALLOCATION_MODE_MIN_WASTE 

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

CATEGORY_ALLOCATION_MODE_MAX_THROUGHPUT 

As above, but maximizing throughput.

CATEGORY_ALLOCATION_MODE_GREEDY_BUCKETING 

Use the greedy bucketing algorithm to label resources.

CATEGORY_ALLOCATION_MODE_EXHAUSTIVE_BUCKETING 

Use the exhaustive bucketing algorithm to label resources.