Borg Cluster Management Overview

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What is one of Borg's primary goals regarding machine utilization?

To make efficient use of Google's fleet of machines.

How does Borg reduce correlated failures in task management?

By spreading tasks of a job across failure domains like machines and racks.

What is the significance of increasing utilization by a few percentage points?

It can result in savings of millions of dollars.

What does the left column of the cells in the provided figure represent?

<p>The original size and combined workload of each cell.</p> Signup and view all the answers

What would be the effect of segregating prod and non-prod workloads?

<p>It would require more machines.</p> Signup and view all the answers

In the context of Borg, what is meant by 'overhead from segregation'?

<p>The additional machines needed when workloads are separated into different cells.</p> Signup and view all the answers

Why is it important to limit the allowed rate of task disruptions?

<p>To maintain operational efficiency and minimize downtime.</p> Signup and view all the answers

What do the graphs in the figure illustrate about additional machines needed?

<p>They show the percentage of extra machines required for segregated workloads.</p> Signup and view all the answers

What role do priorities play in Borg's resource management?

<p>Priorities determine the order in which jobs receive resources, with higher priority tasks able to obtain resources at the expense of lower priority ones.</p> Signup and view all the answers

What is the purpose of the Borg name service (BNS)?

<p>The BNS provides a stable name for each task, allowing clients and systems to locate tasks even after they are relocated.</p> Signup and view all the answers

How does Borg handle the situation when more work arrives than can be accommodated?

<p>Borg uses priority and quota systems to manage excess work, ensuring that resources are allocated based on task priority.</p> Signup and view all the answers

Explain the cascading effect of preemption in Borg.

<p>Preemption can lead to a cascading effect where a higher priority task bumps a lower priority task, causing further preemptions among lower-ranked tasks.</p> Signup and view all the answers

What specific bands does Borg define for priority tasks?

<p>Borg defines non-overlapping priority bands for monitoring, production, batch, and best effort tasks.</p> Signup and view all the answers

Why are tasks in the production priority band disallowed to preempt one another?

<p>This restriction prevents instability and ensures that critical production tasks are not prematurely terminated by other tasks.</p> Signup and view all the answers

How does Borg utilize Chubby for managing job information?

<p>Borg writes job size and task health information into Chubby, ensuring that load balancers have updated data for routing requests.</p> Signup and view all the answers

What is the format used to reach a specific task in Borg?

<p>The task's DNS name follows the format 'task_number.job_name.user_name.cell.borg.google.com'.</p> Signup and view all the answers

What is the purpose of specifying a resource limit in a job?

<p>The resource limit is used to determine if the user has enough quota to admit the job and if a machine has sufficient free resources to schedule the task.</p> Signup and view all the answers

How does Borg respond to tasks that try to exceed their allocated resources?

<p>Borg typically kills tasks that try to use more RAM or disk space than requested and throttles CPU usage to the specified limit.</p> Signup and view all the answers

What issue can arise when users request more resources than their tasks require?

<p>Users who request excessive resources may not utilize them efficiently, leading to waste and potential scheduling delays.</p> Signup and view all the answers

In what situation might a task need to use all its resources?

<p>Tasks may need to use all their resources during peak times or when responding to events like denial-of-service attacks.</p> Signup and view all the answers

What does the 1ms threshold in scheduling delays signify?

<p>The 1ms threshold indicates how often a runnable thread must wait longer than 1ms to access a CPU.</p> Signup and view all the answers

What percentage of the time did threads wait longer than 5ms for CPU access, according to the data?

<p>Threads almost never waited longer than 5ms to access a CPU.</p> Signup and view all the answers

What can be inferred from the latency-sensitive tasks being represented on the left side of the bar chart?

<p>Latency-sensitive tasks generally require quicker access to CPU resources compared to batch tasks, impacting scheduling delays.</p> Signup and view all the answers

What is indicated by the error bars in the scheduling data?

<p>The error bars represent day-to-day variance in scheduling delays over the month of December 2013.</p> Signup and view all the answers

What mechanism does the Borglet use to dynamically adjust resource caps for tasks?

<p>The Borglet uses post-hoc usage checking of memory, disk space, and CPU cycles.</p> Signup and view all the answers

Why do some users inflate their resource requests in Borg?

<p>Users inflate their resource requests to reduce the number of tasks that Borg can co-schedule, aiming to increase their task utilization.</p> Signup and view all the answers

What scheduling mechanism is mentioned as requiring tuning to support both low latency and high utilization?

<p>The standard Linux CPU scheduler, known as Completely Fair Scheduler (CFS), requires substantial tuning.</p> Signup and view all the answers

What is one way the Borglet mitigates the effects of persistent load imbalances?

<p>The use of a thread-per-request model in many applications helps mitigate persistent load imbalances.</p> Signup and view all the answers

What approach does the Borglet take when tasks consume too many resources?

<p>The Borglet selectively terminates tasks that use excessive memory or disk resources.</p> Signup and view all the answers

What recent developments are being focused on to improve the performance of the Borglet?

<p>There is ongoing work to improve thread placement, CPU management that is NUMA-, hyperthreading-, and power-aware.</p> Signup and view all the answers

What are cpusets used for in the context of the Borglet?

<p>Cpusets are sparingly used to allocate CPU cores to applications with particularly tight latency requirements.</p> Signup and view all the answers

What type of resource interference can still occur among tasks despite Borglet’s control?

<p>Occasional low-level resource interference, such as memory bandwidth or L3 cache pollution, can still occur.</p> Signup and view all the answers

What is the primary approach Borg takes towards debugging information for users?

<p>Borg surfaces debugging information to all users rather than hiding it.</p> Signup and view all the answers

What challenge does Borg face when it comes to deprecating features?

<p>Borg finds it harder to deprecate features because users rely on them.</p> Signup and view all the answers

What tools does Borg provide to handle the volume of debugging data?

<p>Borg provides several levels of UI and debugging tools to identify anomalous events.</p> Signup and view all the answers

How does Kubernetes relate to Borg in terms of introspection techniques?

<p>Kubernetes aims to replicate many of Borg's introspection techniques.</p> Signup and view all the answers

What mechanism does Kubernetes use to record events?

<p>Kubernetes uses a unified mechanism for all components to record events.</p> Signup and view all the answers

Who were the primary designers and implementers of the initial Borgmaster?

<p>The initial Borgmaster was primarily designed and implemented by Jeremy Dion and Mark Vandevoorde.</p> Signup and view all the answers

What role does the master play in the Borg system?

<p>The master is the kernel of a distributed system in Borg.</p> Signup and view all the answers

What is the purpose of using tools like Elasticsearch/Kibana and Fluentd in Kubernetes?

<p>These tools are utilized for log aggregation in Kubernetes.</p> Signup and view all the answers

What is the primary function of Apollo's opportunistic execution feature?

<p>Apollo's opportunistic execution boosts utilization by allowing lower-priority background tasks to run, which can lead to multi-day queueing delays.</p> Signup and view all the answers

How does Apache Mesos manage resource allocation differently from Borg?

<p>Apache Mesos uses a central resource manager with an offer-based mechanism, while Borg employs a central scheduler with a request-based mechanism.</p> Signup and view all the answers

What is a unique aspect of YARN as a cluster manager in comparison to others?

<p>YARN is Hadoop-centric and includes a manager that negotiates resource requests specifically for Hadoop applications.</p> Signup and view all the answers

What challenges do large-scale server clusters face according to the studies analyzed?

<p>The studies highlight challenges of scale and heterogeneity within modern datacenters and workloads.</p> Signup and view all the answers

In what year did Alibaba's Fuxi system start running, and what type of workloads does it support?

<p>Alibaba's Fuxi has been running since 2009, supporting data-analysis workloads.</p> Signup and view all the answers

What prediction capabilities do Apollo nodes provide regarding task scheduling?

<p>Apollo nodes offer a prediction matrix for starting times of tasks based on two resource dimensions and estimates of startup costs.</p> Signup and view all the answers

How do DRF and Borg differ in terms of resource allocation strategies?

<p>DRF focuses on high-availability and long-running applications with priority and admission quotas, while Borg uses a priority-based allocation model.</p> Signup and view all the answers

What optimization goal do the Mesos developers have for their system?

<p>The Mesos developers aim to extend their system to include speculative resource assignment and reclamation.</p> Signup and view all the answers

How do users initiate job operations in Borg, and what is one common tool used for this?

<p>Users initiate job operations by issuing remote procedure calls (RPCs) to Borg, commonly using a command-line tool.</p> Signup and view all the answers

Describe the nature of updates made to a running job configuration in Borg.

<p>Updates to a running job configuration are lightweight and non-atomic transactions that can easily be undone until closed.</p> Signup and view all the answers

What features of BCL facilitate job configuration adjustments in Borg?

<p>BCL includes declarative keywords and lambda functions that allow dynamic calculations and environmental adjustments.</p> Signup and view all the answers

What is the significance of rolling updates in Borg job management?

<p>Rolling updates allow changes to be applied progressively, limiting task disruptions and ensuring ongoing job reliability.</p> Signup and view all the answers

Explain the task lifecycle states within the Borg system as mentioned in the diagram.

<p>Tasks in Borg can transition through states such as Pending, Running, and Dead, controlled by user-triggered actions.</p> Signup and view all the answers

What are the primary characteristics that define a cluster in a datacenter?

<p>A cluster is defined by the high-performance datacenter-scale network fabric connecting machines, and it typically resides within a single datacenter building.</p> Signup and view all the answers

Describe the role of a Borg job and its associated properties.

<p>A Borg job includes properties such as its name, owner, and number of tasks, and can impose constraints on where tasks run based on machine attributes.</p> Signup and view all the answers

What strategies does Borg use to manage heterogeneous machines within a cell?

<p>Borg isolates users from machine heterogeneity by managing task allocation, resources, and dependencies, ensuring efficient operation despite differences.</p> Signup and view all the answers

Explain the difference between hard and soft constraints in the context of a Borg job.

<p>Hard constraints must be met for a task to run on a machine, while soft constraints serve as preferences that can be relaxed if necessary.</p> Signup and view all the answers

What is the significance of defining task resource requirements independently in Borg?

<p>Defining task resource requirements independently allows fine-grained control over resource allocation, enabling efficient utilization of CPU, RAM, and more.</p> Signup and view all the answers

How does Borg minimize the overhead associated with virtualization in its workload management?

<p>Borg minimizes overhead by avoiding the use of virtual machines for the majority of its workloads, opting instead for processes running directly in containers.</p> Signup and view all the answers

What role does task monitoring play in Borg’s operation?

<p>Task monitoring is crucial in Borg for ensuring task health, enabling automatic restarts if they fail and maintaining overall system reliability.</p> Signup and view all the answers

Identify one key reason why Borg prefers statically linked programs.

<p>Borg prefers statically linked programs to reduce dependencies on the runtime environment, enhancing portability and reliability.</p> Signup and view all the answers

What is a potential problem that can occur due to task preemption in Borg?

<p>Preemption cascades can occur, where a high-priority task bumps a lower-priority one, creating a chain reaction of preemptions.</p> Signup and view all the answers

Explain why quota is significant in Borg's job scheduling.

<p>Quota ensures that jobs are admitted for scheduling based on resource availability and prevents jobs from exceeding their resource allocations.</p> Signup and view all the answers

What signal do tasks in Borg use to request clean termination before a forceful kill?

<p>Tasks use the Unix SIGTERM signal.</p> Signup and view all the answers

How does Borg utilize fine-grained priorities in its task management?

<p>Borg uses fine-grained priorities to differentiate between task importance, allowing master tasks to run at a higher priority than their worker tasks.</p> Signup and view all the answers

What happens to jobs with insufficient quota in Borg?

<p>Jobs that lack sufficient quota are immediately rejected upon submission.</p> Signup and view all the answers

How does Borg define priority for tasks, and what is its effect on resource allocation?

<p>Borg assigns a small positive integer as priority, allowing higher-priority tasks to obtain resources at the expense of lower-priority ones.</p> Signup and view all the answers

Discuss the significance of the Borg name service (BNS) in task management.

<p>The Borg name service assigns stable names to tasks, enabling clients and other systems to reliably locate tasks even after relocation.</p> Signup and view all the answers

What occurs when an alloc in Borg must be relocated to another machine?

<p>The tasks associated with the alloc are rescheduled alongside it.</p> Signup and view all the answers

What is the purpose of an alloc set in Borg?

<p>An alloc set reserves resources on multiple machines for one or more jobs.</p> Signup and view all the answers

Why might users overbuy quota in Borg?

<p>Users often overbuy quota to guard against future shortages as their application’s demand grows.</p> Signup and view all the answers

What role does Chubby play in Borg's resource and task management?

<p>Chubby provides a consistent and highly-available store for task information, such as task health and job size, which is used by other systems for monitoring.</p> Signup and view all the answers

What are the potential consequences for jobs when workload exceeds available resources in Borg?

<p>When workload exceeds available resources, tasks may be preempted or denied entry based on defined priorities and quotas.</p> Signup and view all the answers

What happens to tasks that are in the monitoring and production priority bands in Borg?

<p>Tasks in these bands are given precedence and can preempt lower-priority tasks.</p> Signup and view all the answers

How does Borg's priority system impact the running of production-priority jobs?

<p>Production-priority jobs are given access to resources limited to what is available in the cell, ensuring they can run as expected if within quota.</p> Signup and view all the answers

What role does the SIGKILL signal play in task management within Borg?

<p>SIGKILL is used to forcibly terminate tasks that do not respond to a SIGTERM notice.</p> Signup and view all the answers

What is the significance of the stable naming convention in Borg for job monitoring?

<p>The stable naming convention allows consistent tracking and monitoring of tasks, essential for providing reliable service to clients.</p> Signup and view all the answers

How does Borg's capability system enhance user privileges and operational control?

<p>Borg's capability system allows certain users, like administrators, to perform privileged actions such as modifying any job or accessing kernel features.</p> Signup and view all the answers

How does the Borg system handle resource allocation between multiple tasks?

<p>Multiple tasks share the resources assigned to an alloc, enabling efficient utilization.</p> Signup and view all the answers

Flashcards

Job Priority

A numerical value assigned to a job, determining its access to resources. Higher priority jobs can preempt lower priority jobs.

Preemption

The act of interrupting and terminating a lower-priority job to allocate resources to a higher-priority job.

Priority Bands

Categories of job priorities, for example, monitoring or production, to manage resource allocation.

Quota

A limit on the resources (e.g., CPU, memory) a job can use. It prevents a single job from consuming disproportionate resources.

Signup and view all the flashcards

Borg Name Service (BNS)

A service that provides stable names for tasks within the Borg system. These names are used to locate tasks.

Signup and view all the flashcards

Task Location in Borg

Tasks in Borg are often relocated to different machines to provide efficient resource allocation.

Signup and view all the flashcards

Task Monitoring

Borg monitors task size and health information in Chubby, to improve request routing.

Signup and view all the flashcards

Job Naming Scheme

A naming convention for identifying jobs in Borg, including cell name, job name, and task number.

Signup and view all the flashcards

Utilization in Borg

Efficiently using Google's machine fleet (a significant financial investment) to achieve cost savings through increased utilization.

Signup and view all the flashcards

Correlated failures (in Borg)

Failures spreading across different parts of the system, such as machines, racks, and power domains.

Signup and view all the flashcards

Task disruption rate (in Borg)

The rate at which tasks are interrupted, which is limited by Borg policies to prevent system instability.

Signup and view all the flashcards

Workload segregation (in Borg)

Separating production (prod) and non-production (non-prod) workloads into different cells (groups of machines).

Signup and view all the flashcards

Additional machines needed (segregation)

The increase in machines required when segregating workloads (estimated as a percentage of minimum machines required for single-cell operation).

Signup and view all the flashcards

Cell (in Borg)

A group of machines used to run a specific workload or task.

Signup and view all the flashcards

Overhead from segregation

The additional resources required for separating workloads into different cells (a percentage).

Signup and view all the flashcards

Percentage of cell (in charts)

Represents the percentage of cells, showing the proportion of tasks/activities in each cell.

Signup and view all the flashcards

Resource Limits

Upper bounds on resources (CPU, RAM, disk) each task can use.

Signup and view all the flashcards

Task Resource Usage

Tasks request or use more resources than needed.

Signup and view all the flashcards

Quota limits

The maximum amount of resources a user is allowed to consume.

Signup and view all the flashcards

Resource Reclamation

The process of recovering or freeing up unused resources.

Signup and view all the flashcards

Scheduling Delays

The time a task waits to access a resource (CPU).

Signup and view all the flashcards

CPU Utilization

Percentage of time a CPU is actively processing tasks.

Signup and view all the flashcards

Latency-sensitive tasks

Tasks needing quick response (e.g., interacting with users).

Signup and view all the flashcards

Batch tasks

Tasks that can take longer without impacting users.

Signup and view all the flashcards

Borglet

A component of Borg that dynamically adjusts resource caps for tasks, like memory, disk, CPU, and network bandwidth. It ensures that tasks don't hog resources and allows for efficient resource allocation.

Signup and view all the flashcards

Resource Container

A sandbox-like environment created using Linux cgroups, isolating tasks from each other and managing resource usage. Each task gets its own container with limits on resources like CPU, memory, and disk.

Signup and view all the flashcards

Resource Caps

Limits imposed on the amount of resources a task can consume, like CPU time, memory, or network bandwidth. These help prevent a single task from monopolizing resources.

Signup and view all the flashcards

CFS (Completely Fair Scheduler)

The Linux kernel scheduler responsible for distributing CPU time fairly among tasks. Borg optimizes CFS, ensuring that high-priority tasks get more CPU time.

Signup and view all the flashcards

LS tasks

Tasks requiring low latency (fast response times), for example, web server requests. They are prioritized by Borg to ensure responsiveness.

Signup and view all the flashcards

NUMA-aware

A system design that is aware of the non-uniform memory access architecture of modern processors. It optimizes thread placement and resource allocation to minimize memory access latency.

Signup and view all the flashcards

Apollo

A system for scheduling short-lived batch jobs in large-scale server clusters, aiming for high throughput.

Signup and view all the flashcards

Opportunistic Execution

Running lower-priority background tasks when resources are available, increasing overall utilization.

Signup and view all the flashcards

Prediction Matrix

A tool in Apollo that predicts task starting times based on their size and resource requirements.

Signup and view all the flashcards

Apache Mesos

A cluster manager that splits resource management and placement functions between a central manager and multiple frameworks.

Signup and view all the flashcards

DRF

A resource allocation strategy initially developed for Mesos, prioritizing and managing quotas.

Signup and view all the flashcards

YARN

A Hadoop-centric cluster manager, where each application has a manager that negotiates for resources.

Signup and view all the flashcards

Alibaba's Fuxi

A cluster manager designed for data analysis workloads, with a central FuxiMaster for resource management.

Signup and view all the flashcards

Borg's Debugging Philosophy

Borg aims to make debugging information readily available to all users, promoting self-help and troubleshooting. This approach, despite being more complex, prioritizes user empowerment and efficiency.

Signup and view all the flashcards

Borg's Debugging Tools

To manage the vast amount of data, Borg provides various levels of user interfaces and debugging tools, allowing users to pinpoint anomalous events and analyze detailed event logs.

Signup and view all the flashcards

Kubernetes's Introspection Techniques

Kubernetes replicates many of Borg's introspection features by providing tools like cAdvisor for resource monitoring and log aggregation using Elasticsearch and Kibana, enabling detailed system analysis.

Signup and view all the flashcards

Kubernetes's Unified Event Recording

Kubernetes uses a unified mechanism for all components to record events, like pod scheduling, container status, or failures. This centralized event logging provides a comprehensive view of system activity.

Signup and view all the flashcards

Borg Master's Role

The 'master' is the central component of the distributed Borg system, responsible for orchestration, resource allocation, and managing the overall system state.

Signup and view all the flashcards

Borg's User-Centric Design

Borg prioritizes surfacing debugging information to all users, rather than hiding it, encouraging self-sufficiency and empowering users to troubleshoot independently.

Signup and view all the flashcards

Borg's Self-Help Approach

Borg's design emphasizes self-help debugging, making it easier for users to diagnose and fix problems, freeing up resources for more complex issues.

Signup and view all the flashcards

The Importance of Debugging Tools

Adequate debugging tools are essential for any large-scale distributed system, as they provide crucial insights into system behavior and facilitate effective problem-solving.

Signup and view all the flashcards

Cluster (Borg)

A collection of cells, typically housed within a single datacenter building, representing a physical grouping of machines.

Signup and view all the flashcards

Job (Borg)

A unit of work consisting of one or more tasks, defined by its name, owner, and constraints specifying required resources.

Signup and view all the flashcards

Task (Borg)

A single unit of execution within a job, running as a set of Linux processes inside a container on a machine, representing a specific piece of work.

Signup and view all the flashcards

Heterogeneity in a Cell

Machines within a cell can have diverse characteristics (CPU, RAM, disk, network, etc.), offering flexibility for different workloads.

Signup and view all the flashcards

Borg's Role in Resource Allocation

Borg isolates users from machine heterogeneity, allocating resources, installing programs, and managing tasks to ensure efficient execution.

Signup and view all the flashcards

Constraints (Borg)

Requirements or preferences specified for a job, limiting the types of machines its tasks can run on based on attributes like processor architecture or OS version.

Signup and view all the flashcards

Borg's Avoidance of Virtualization

Borg primarily avoids virtual machines (VMs) for efficiency, opting for direct containerized execution of tasks on bare metal machines.

Signup and view all the flashcards

Job States

Jobs in Borg progress through different stages, beginning with 'Pending', transitioning to 'Running', and finally ending in 'Dead' or 'Lost'. Users can trigger transitions like 'submit', 'kill', and 'update'.

Signup and view all the flashcards

Update in Borg

Users can modify running jobs by pushing new job configurations to Borg, leading to a 'update' transition. This enables lightweight, non-atomic transactions that allow for reconfiguration and can be undone until committed.

Signup and view all the flashcards

Task Disruption

Borg allows for 'update' operations that modify running tasks, leading to disruptions. To prevent excessive disruption, Borg imposes limits on the number of tasks that can be interrupted at a time.

Signup and view all the flashcards

Jobs vs. Tasks

Jobs are collections of tasks. A single job can contain numerous tasks executing in parallel. Users can trigger actions like 'submit', 'kill', and 'update’ for both jobs and individual tasks.

Signup and view all the flashcards

Task Rescheduling

When an update causes a task to no longer fit on its current machine, Borg will stop the task and reschedule it on a suitable machine.

Signup and view all the flashcards

Task Preemption

A higher-priority task can interrupt and terminate (preempt) a lower-priority task to gain access to its resources.

Signup and view all the flashcards

Task Notification

Before a task is preempted, it can be notified with a SIGTERM signal, allowing time to gracefully shut down and save its state.

Signup and view all the flashcards

Borg Alloc

A reserved set of resources on a machine, dedicated for one or more tasks, even if unused.

Signup and view all the flashcards

Alloc Set

A group of allocs that reserves resources across multiple machines.

Signup and view all the flashcards

Admission Control

A mechanism that decides which jobs are allowed to run based on their resource requirements and the available resources.

Signup and view all the flashcards

Production Priority

A high priority level for critical jobs that need to run smoothly, often used for production applications.

Signup and view all the flashcards

Task Location

Tasks in Borg can be moved to different machines to optimize resource utilization and ensure efficient execution.

Signup and view all the flashcards

Cell

A group of machines in Borg, typically dedicated to a specific workload or task, providing a container for resource management.

Signup and view all the flashcards

Study Notes

Borg Cluster Management at Google

  • Borg is a cluster manager at Google that handles hundreds of thousands of jobs from many applications, across numerous clusters with tens of thousands of machines each.

  • Borg optimizes resource utilization through admission control, efficient task packing, over-commitment, and machine sharing with process-level isolation.

  • High availability is ensured through features that minimize fault recovery time and scheduling policies that reduce correlated failures.

  • A declarative job specification language, name service integration, real-time job monitoring, and system behavior analysis tools simplify user interaction.

User Perspective

  • Borg users are Google developers and system administrators (SREs) managing applications and services.

  • Workflows are submitted as jobs, with each job composed of one or more tasks implementing the same program.

  • Each job operates within a Borg cell, a set of managed machines.

  • The workload comprises:

    • Long-running, stable services for user-facing applications (Gmail, Docs, search) and internal infrastructure.
    • Batch jobs requiring seconds to days to complete, less sensitive to performance fluctuations.

Workload and Clusters

  • Clusters consist of machines in a single datacenter building.

  • Cells are larger clusters that typically include several clusters and focus on specific application types.

  • Machines in cells are heterogeneous (CPU, RAM, disk, etc.).

  • Borg hides resource management and failure handling details, letting users focus on application development.

  • Borg enables reliable and highly available application operation across thousands of machines.

Jobs and Tasks

  • Jobs are defined by: name, owner, and the number of tasks.

  • Tasks are represented as Linux processes within a container.

  • Jobs may have resource constraints concerning processor architecture, OS versions, or external IPs.

  • Constraints can be either hard or soft (preferences).

  • Jobs can be deferred until a prior job finishes.

Priority, Quota, and Admission

  • Each job has a priority.

  • High-priority tasks can preempt lower-priority tasks.

  • Priorities are defined for monitoring, production, batch, and best-effort workloads.

  • Quota limits resources available to users at a given priority within a given timeframe.

  • Quota is an admission control mechanism, not scheduling.

  • Jobs lacking sufficient quota are rejected.

Naming and Monitoring

  • Tasks are given unique names (including cell, job, and task number).

  • These names are used by the Borg naming service (BNS).

  • Borg provides task hostname and port information in a consistent store.

  • System status and task health information are reported by Borg.

Borg Architecture

  • The Borg architecture comprises a Borgmaster (controller) and Borglets (agents).

  • The Borgmaster manages client RPCs, handles all system objects, and offers a web UI.

  • Borglets run on each machine and manage local resources and state reporting.

  • Checkpoint data and logs are stored in a highly available Paxos-based store.

Scheduling

  • The scheduler in Borgmaster takes tasks from the pending queue.

  • Jobs are assigned tasks when sufficient available resources meet constraints.

  • The scheduler prioritizes tasks based on priority and allocates machines efficiently.

  • It proactively handles machine and network failures.

Availability

  • Borg ensures system availability and redundancy through failure handling mechanisms.

  • Tasks are proactively rescheduled or restarted on new machines.

  • Correlated failures are minimized.

  • User applications are expected to be resilient, using techniques like replication and checkpoints.

Isolation

  • Borg isolates tasks through Linux cgroups.

  • Separating tasks physically prevents interference.

Performance

  • Performance interference is mitigated by sharing resources and minimizing machine contention.

  • Resource reclamation strategies reclaim underused resources.

  • Optimized scheduling techniques minimize task wait times.

Scalability

  • Borg's architecture scales to thousands of machines and supports high arrival rates.

  • Techniques include a distributed state store, sharded functions, and separate scheduling processes.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Borg System Architecture (PDF)
Use Quizgecko on...
Browser
Browser