文档章节

YugaByte TServer

MtrS
 MtrS
发布于 08/17 22:06
字数 1039
阅读 29
收藏 0

YB-TServer The YB-TServer (short for YugaByte Tablet Server) is the process that does the actual IO for end user requests. Recall from the previous section that data for a table is split/sharded into tablets. Each tablet is composed of one or more tablet-peers depending on the replication factor. And each YB-TServer hosts one or more tablet-peers.

Note: We will refer to the “tablet-peers hosted by a YB-TServer” simply as the “tablets hosted by a YB-TServer”.

Below is a pictorial illustration of this in the case of a 4 node YugaByte universe, with one table that has 16 tablets and a replication factor of 3.

tserver_overview

The tablet-peers corresponding to each tablet hosted on different YB-TServers form a Raft group and replicate data between each other. The system shown above comprises of 16 independent Raft groups. The details of this replication are covered in a previous section on replication.

Within each YB-TServer, there is a lot of cross-tablet intelligence built in to maximize resource efficiency. Below are just some of the ways the YB-TServer coordinates operations across tablets hosted by it:

Server-global block cache The block cache is shared across the different tablets in a given YB-TServer. This leads to highly efficient memory utilization in cases when one tablet is read more often than others. For example, one table may have a read-heavy usage pattern compared to others. The block cache will automatically favor blocks of this table as the block cache is global across all tablet-peers.

Throttled Compactions The compactions are throttled across tablets in a given YB-TServer to prevent compaction storms. This prevents the often dreaded high foreground latencies during a compaction storm.

Small/Large Compaction Queues Compactions are prioritized into large and small compactions with some prioritization to keep the system functional even in extreme IO patterns.

Server-global Memstore Limit Tracks and enforces a global size across the memstores for different tablets. This makes sense when there is a skew in the write rate across tablets. For example, the scenario when there are tablets belonging to multiple tables in a single YB-TServer and one of the tables gets a lot more writes than the other tables. The write heavy table is allowed to grow much larger than it could if there was a per-tablet memory limit, allowing good write efficiency.

Auto-Sizing of Block Cache/Memstore The block cache and memstores represent some of the larger memory-consuming components. Since these are global across all the tablet-peers, this makes memory management and sizing of these components across a variety of workloads very easy. In fact, based on the RAM available on the system, the YB-TServer automatically gives a certain percentage of the total available memory to the block cache, and another percentage to memstores.

Striping tablet load uniformly across data disks On multi-SSD machines, the data (SSTable) and WAL (RAFT write-ahead-log) for various tablets of tables are evenly distributed across the attached disks on a per-table basis. This ensures that each disk handles an even amount of load for each table. The YB-TServer (short for YugaByte Tablet Server) is the process that does the actual IO for end user requests. Recall from the previous section that data for a table is split/sharded into tablets. Each tablet is composed of one or more tablet-peers depending on the replication factor. And each YB-TServer hosts one or more tablet-peers.

Note: We will refer to the “tablet-peers hosted by a YB-TServer” simply as the “tablets hosted by a YB-TServer”.

Below is a pictorial illustration of this in the case of a 4 node YugaByte universe, with one table that has 16 tablets and a replication factor of 3.

tserver_overview

The tablet-peers corresponding to each tablet hosted on different YB-TServers form a Raft group and replicate data between each other. The system shown above comprises of 16 independent Raft groups. The details of this replication are covered in a previous section on replication.

Within each YB-TServer, there is a lot of cross-tablet intelligence built in to maximize resource efficiency. Below are just some of the ways the YB-TServer coordinates operations across tablets hosted by it:

Server-global block cache The block cache is shared across the different tablets in a given YB-TServer. This leads to highly efficient memory utilization in cases when one tablet is read more often than others. For example, one table may have a read-heavy usage pattern compared to others. The block cache will automatically favor blocks of this table as the block cache is global across all tablet-peers.

Throttled Compactions The compactions are throttled across tablets in a given YB-TServer to prevent compaction storms. This prevents the often dreaded high foreground latencies during a compaction storm.

Small/Large Compaction Queues Compactions are prioritized into large and small compactions with some prioritization to keep the system functional even in extreme IO patterns.

Server-global Memstore Limit Tracks and enforces a global size across the memstores for different tablets. This makes sense when there is a skew in the write rate across tablets. For example, the scenario when there are tablets belonging to multiple tables in a single YB-TServer and one of the tables gets a lot more writes than the other tables. The write heavy table is allowed to grow much larger than it could if there was a per-tablet memory limit, allowing good write efficiency.

Auto-Sizing of Block Cache/Memstore The block cache and memstores represent some of the larger memory-consuming components. Since these are global across all the tablet-peers, this makes memory management and sizing of these components across a variety of workloads very easy. In fact, based on the RAM available on the system, the YB-TServer automatically gives a certain percentage of the total available memory to the block cache, and another percentage to memstores.

Striping tablet load uniformly across data disks On multi-SSD machines, the data (SSTable) and WAL (RAFT write-ahead-log) for various tablets of tables are evenly distributed across the attached disks on a per-table basis. This ensures that each disk handles an even amount of load for each table.

© 著作权归作者所有

上一篇: Java HashMap
下一篇: YB-Master
MtrS
粉丝 35
博文 671
码字总数 410400
作品 0
榆林
私信 提问
云原生的分布式 SQL 数据库 - YugaByte DB

YugaByte DB 是一个高性能、云原生的分布式 SQL 数据库。 值得关注的特性包括: 可插入式的查询层,支持两个分布式 SQL APIs: YugaByte SQL (YSQL) - PostgreSQL 兼容的关系型 API YugaByte...

匿名
07/18
9.7K
11
云原生数据库 - YugaByteDB

YugaByte 是用于构建关键任务应用程序的云原生数据库。此 repo 是 YugaByte Community Edition。 YugaByte 同时提供了 SQL 和 NoSQL,保证了正确性和可用性。它允许应用程序在云中、本地或跨...

匿名
2018/06/01
934
2
YugaByte 1.0.5 发布,添加广播地址支持公有、私有 IP

YugaByte yugabyte-db 1.0.5 发布了,YugaByte 是用于构建关键型应用的云原生数据库,使用 C++ 开发,支持 Cassandra 查询语言(CQL)以及 Redis 协议,对 PostgreSQL 协议的支持正在进行中,S...

h4cd
2018/08/20
481
0
netty4.0.28 实现的 tcp server 遭遇保留ip连接

各位大神们,请教大家一个问题: 背景: 1. 基于netty4.0.28 实现的一个私有协议的物联网平台,姑且叫 Tserver,监听在端口 a 2. 使用的阿里云的主机,配置:1核 2G;将 Tserver 部署在改机器...

汪林
2017/11/08
429
1
Yugabyte DB 2.0 发布,云原生的分布式 SQL 数据库

YugaByte DB 是一个高性能、云原生的分布式 SQL 数据库。2.0 版本已经发布,内容如下: YugaByte DB 与 PostgreSQL 兼容,下面是它与 PostgreSQL 兼容的几个特性: 所有的 PostgreSQL 数据类...

afterer
09/19
858
4

没有更多内容

加载失败,请刷新页面

加载更多

会用python把linux命令写一遍的人,进大厂有多容易?

看过这篇《2000字谏言,给那些想学Python的人,建议收藏后细看!》的读者应该都对一个命令有点印象吧?没错,就是 linux 中经常会用到的 ls 命令。 文章中我就提到如何提升自己的 python 能力...

上海小胖
15分钟前
1
0
HashMap的特性

一、hashmap数据结构:哈希表结构:数组+链表 hashmap调用默认构造方法会产生一个默认底层是长度为16的Entry数组,首先调用key的hasCode()方法来得到一个整数, int hash = hash(key.hashCode...

GGbird
15分钟前
10
0
第五章 spring-connet之Imports注解来龙去脉

前言 imports是一个在spring体系里非常重要的注解,基本每个Enable开头的注解必然有一个import注解。接下来我们深入研究下import的作用。看小节的同学建议先取看PostProcessorRegistrationDe...

鸟菜啊
19分钟前
2
0
CentOS部署Harbor镜像仓库

关于Harbor Harbor是用于存储和分发Docker镜像的镜像仓库服务,相比Docker Registry,Harbor在安全、标识、管理等方面做了增强,更适合企业使用; 官方网站:https://goharbor.io/ 官方开源:...

程序员欣宸
23分钟前
3
0
JavaScript调试必会的8个console方法

每个JavaScript开发者都用过console.log()来调试程序,但实际上Console对象还提供了很多其他方法可以提高调试效率。本文将介绍8个有趣的Console方法,即使JavaScript老手也不一定知道! 1、c...

汇智网教程
45分钟前
4
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部