Managing Batch Contexts

A batch context is a logical framework that defines the system environment for running jobs. This section explains how to create and manage batch contexts.

Each batch context includes the following configurations:
  • Network: Network configuration specifies the Virtual Cloud Network (VCN) and subnet used by jobs and tasks in a batch context. This restricts which resources (such as NFS storage, license servers, and OCI Registry) a batch can access. This helps keep the batch jobs separate from other network resources. For more information, see Setting Up Networking Resources.
  • Fleets: Fleets configuration lets you set up one or more compute resources for the batch context. Each fleet specifies details such as shape, OCPUs, and memory. Fleets control the types and sizes of compute instances that tasks can run on. You can create multiple fleets, each with its own configuration, to support different workload needs or manage costs. Each fleet belongs to a single batch context and its settings can be adjusted to improve performance or stay within budget.
  • (Optional) Logging: Logging configuration specifies where all log output from tasks in a batch context is sent. Correct logging configuration makes it easy to find, review, and troubleshoot task output. For more information, see Log Management and Log Group Management.
  • (Optional) Entitlements: Entitlements define the limits for shared or restricted resources, such as software licenses, that jobs in a batch context require. Entitlements are configured by name and maximum value, ensuring jobs don't oversubscribe limited resources.
  • (Optional) Job Prioritization: Job prioritization configuration sets up the rules for how jobs are prioritized and scheduled when competing for resources. This is managed through tag namespaces and keys, such as a tag key for job priority with configurable weights and values for different tags. By assigning these tags, you can dynamically control or adjust which jobs run first. To set up prioritization, define a tag namespace and one or more tag keys, assign numeric weights and values to each tag, and use these tags when submitting jobs. The combined tag weights and values control job scheduling order. For more information, see Configuring Job Prioritization.
    Note

    Network, fleets, and logging configurations can't be changed after batch context is created. You can only update basic details such as the batch context name, description, entitlements, and job priority levels after the batch context is created.