读书笔记:Large-scale cluster management at Google with Borg

  名篇,讲的Google自用的调度平台Borg,我感觉也是Google的钓鱼论文,当年大家知道有Borg的时候,好多人在各种地方呼吁Google把Borg开源,或者再详细的讲讲细节。结果Google趁势推出Kubernetes,“Borg虽然不开源,可是俺们开源了在这个基础上研发的更新、更通用的Kubernetes啊,大家快来用啊啊啊啊啊啊啊啊”。 Kubernetes于是大火。

   Borgs 最NB的地方是同时跑Long-running service和batch jobs, 这样据该论文所说会提高大概20~30%的效率,很NB的。他的原话是:“Since many other organizations run user-facing and batch jobs in separate clusters, we examined what would happen if we did the same. Figure 5 shows that segregating prod and non-prod work would need 20–30% more machines in the median cell to run our workload.” 大意就是别人都是把面向用户和批处理Job分开在不同的机群里跑,我们也试了一下这么会怎么样。我们一试,结果哎呀妈呀,要多用20~30%的机器才行。

目的    

    Google'sBorg system is a cluster manager that runs hundreds of thousands of jobs, frommany thousands of different applications, across a number of clusters each withup to tens of thousands of machines.

 

好处:

   1, Hides the detail of resources management and failure handings 

   2, operates with very haigh relability and availability and supportsapplications that do the same

   3, lets user run workloads accross tens of thousands o machines. 

概念:

1,Borg cell: a set of machines that are managed as a unit.

2,Workload: Borg cells run a heterogenous workload withtwo main parts.

Thefirst is long-running services that should “never” go down, and handleshort-lived latency-sensitive requests (a few ms to a few hundred ms). Suchservices are used for end-user-facing products such as Gmail, Google Docs, andweb search, and for internal infrastructure services (e.g., BigTable).

Thesecond is batch jobs that take from a few seconds to a few days to complete;these are much less sensitive to short-term performance fluctuations.

3,Cluster: The machines in a cell belong to a singlecluster, defined by the high-performance datacenter-scale network fabric thatconnects them. A cluster lives inside a single datacenter building, and acollection of buildings makes up a site.

4,Jobs:A Borg job’s properties include its name, owner, andthe number of tasks it has. Jobs can have constraints to force its tasks to runon machines with particular attributes such as processor architecture, OSversion, or an external IP address.

5,Task:  Each task maps to aset of Linux processes running in a container on a machine

6,Alloc: A Borg alloc (short for allocation) is areserved set of resources on a machine in which one or more tasks can be run;the resources remain assigned whether or not they are used.

7,Quota:Quota is used to decide which jobs to admit forscheduling. Quota is expressed as a vector of resource quantities (CPU, RAM,disk, etc.) at a given priority, for a period of time (typically months).

 

架构

Borgmaster:Each cell’s Borgmaster consists of two processes: themain Borgmaster process and a separate scheduler (x3.2). The main Borgmasterprocess handles client RPCs that either mutate state (e.g., create job) orprovide read-only access to data (e.g., lookup job). It also manages statemachines for all of the objects in the system (machines, tasks, allocs, etc.),communicates with the Borglets, and offers a web UI as a backup to Sigma.

 

Scheduling:When a job is submitted, the Borgmaster records itpersistently in the Paxos store and adds the job’s tasks to the pending queue.This is scanned asynchronously by the scheduler, which assigns tasks tomachines if there are sufficient available resources that meet the job’sconstraints. (The scheduler primarily operates on tasks, not jobs.)

 

Borglet:The Borglet is a local Borg agent that is present onevery machine in a cell. It starts and stops tasks; restarts them if they fail;manages local resources by manipulating OS kernel settings; rolls over debuglogs; and reports the state of the machine to the Borgmaster and othermonitoring systems.

 

一些小细节

The vastmajority of the Borg workload does not run inside virtual machines

Borgwrites the task's hostname and port into a consistent. highly-available file inChubby

Allcomponents of Borg are written in c++

A keydesign feature in Borg is that already-running tasks continue to run even ifthe Borgmaster or a task's Borglet goes down.

性能

各种NB.

最后推K8S的广告:

The Kubernetes architecture goes further: it has an API server at its core that is responsible only for processing requests and manipulating the underlying state objects. The cluster management logic is built as small, composable micro-services that are clients of this API server, such as the replication controller, which maintains the desired number of replicas of a pod in the face of failures, and the node controller, which manages the machine lifecycle.  

时间: 2024-09-10 06:59:20

读书笔记:Large-scale cluster management at Google with Borg的相关文章

『 读书笔记 』4月读书总结|博文推荐

原文链接:『 读书笔记 』4月读书总结|博文推荐 写在前面 计划是每月读 5-10 本书,书籍类型大概是三个方面的:金融,技术,管理.之所以选择这三个方面,一方面是因为自己对这三个方面都很有兴趣,其次是被 linkedin 创始人 Hoffman 的 ABZ 理论 深度影响.建议大家都看看 abz 理论那篇文章,如果我有空,也会整理一些常用的这类理论模型到博客里的. 月底读书总结的形式都很简单,只是简单的一个列表和简单的书评,对觉得比较好的书会有单独的读书笔记.另外推荐大家用 excel 来做一

《淘宝技术这十年》读书笔记 (三). 创造技术TFS和Tair

        前面两篇文章介绍了淘宝的发展历程和Java时代的变迁:             <淘宝技术这十年>读书笔记 (一).淘宝网技术简介及来源             <淘宝技术这十年>读书笔记 (二).Java时代的脱胎换骨和坚若磐石         马云说过"创新不是为了与对手竞争,而是跟明天竞争",所以这篇文章讲述淘宝的创新技术TFS和Tair及创新的产品.         该篇文章不仅仅对在读大学生非常有所帮助,因为你能从文章中看到很多你需要学

《SQL Server企业级平台管理实践》读书笔记——SQL Server数据库文件分配方式

原文:<SQL Server企业级平台管理实践>读书笔记--SQL Server数据库文件分配方式 1.文件分配方式以及文件空间检查方法 最常用的检查数据文件和表大小的命令就是:sp_spaceused 此命令有三个缺陷:1.无法直观的看出每个数据文件和日志文件的使用情况.2.这个存储过程依赖SQL Server存储在一些系统视图里的空间使用统计信息计算出的结果,如果没有更新空间统计信息,比如刚刚发生大数据插入,sp_spaceused的结果就不准确.3.这个命令主要是针对普通用户的数据库,对

《Master Opencv...读书笔记》非刚性人脸跟踪 II

    上一篇博文中,我们了解了系统的功能和模块,明确了需要采集哪些类型的样本点及利用类的序列化的保存方式.这次将介绍几何约束模块,通过统计形态分析法(Statistical Shape Analysis, SSA),利用样本点建立对形状的描述,然后对描述的形状建立点分布模型,并从中学习统计参数,完成对形状的建模.该模块在后续跟踪阶段将被用来约束和剔除不合理的特征点. 本次讲解目录:  facial geometry是什么?程序主要数据结构介绍  普氏分析是什么?作用是什么?怎么实现?[代码分析

我在2017年春节期间所读的书及总结的读书笔记

对于大部分人来说,2017年的春节只有七天假期.但对于我来说,却有将近半个月的时间(具体原因以后再说).在这段时间里,我阅读了好几本书(有几本是之前没有读完的),并总结了几篇读书笔记.在这篇文章中,我简单描述一下自己春节读书的一点感想,希望对大家制定自己的阅读计划有所帮助. 从头到尾读完的书 在这段时间,我从头到尾读完的书有两本:<未来简史>和<巨婴国>. 先来介绍一下<未来简史>.这本书的作者是畅销书<人类简史>的作者.牛津大学的历史学博士赫拉利.在罗辑思

091025 L DNA读书笔记

读书笔记和读后感 02 如何开始第一个工作     大企业,有很多好处.它与小企业的不同在于,小企业的竞争是对外的,而大企业的竞争则是来自于内部的.选择进入大企业的人,一定要有一个目标,多年后做到某个位置的目标.大企业适合喜欢跟同事竞争的人工作.     小企业,坏处是没有大企业的待遇好,不过可以学会更多的本领.     政府机关,如果选择到这里工作,那就是一个比较稳定的工作.在这里,如果比别人更勤奋的话,爬得也比别人快.     自由职业,如果选择这种方式工作,那么需要人有比较高的自我管控能力

Java与XSLT读书笔记(1)

笔记 <Java与XSLT>读书笔记 一,所有的XSLT处理器必须包括四个内置的模版规则,它们的优先级要低于任何其他规则,所以只要编写一个新的模版规则来匹配相同的式样,就可以覆盖它们.理解内置规则的最好方法就是架设它们总是位于后台,如果没有找到其他匹配一个节点的规则,就应用这些内置规则. <xsl:template match="*|/"> <xsl:apply-templates/> </xsl:template> <xsl:te

《点石成金》读书笔记:为网站增加注意力吸引点

文章描述可用性设计建议--<点石成金>读书笔记. 阅读笔记8-12章 1. WEB设计团队讨论可用性是在浪费时间 原因 1"每个人都喜欢______" 我们也是Web用户对网站上自己喜欢什么不喜欢什么有着强烈的感觉.而且由于主张的力量和人的天性自然有种把这些喜欢或不喜欢投射到整个Web用户身上的倾向. 2职位情绪 设计师通常认为大多数人喜欢视觉上看起来有趣的网站开发人员认为人们喜欢功能又多又酷的网站在建立优先级时他们在看法上的不同常引发冲突. 更大的冲突是市场文化和工程文化

深入了解JVM-----Inside JVM读书笔记

笔记   本文首先介绍一下Java虚拟机的生存周期,然后大致介绍JVM的体系结构,最后对体系结构中的各个部分进行详细介绍. (  首先这里澄清两个概念:JVM实例和JVM执行引擎实例,JVM实例对应了一个独立运行的java程序,而JVM执行引擎实例则对应了属于用户运行程序的线程:也就是JVM实例是进程级别,而执行引擎是线程级别的.) 一. JVM的生命周期 JVM实例的诞生:当启动一个Java程序时,一个JVM实例就产生了,任何一个拥有public static void main(String