Opentsdb官方优化文档 - 翻译

文档地址 :

Tuning — OpenTSDB 2.4 documentation

Tuning

As with any database there are many tuning parameters for OpenTSDB that can be used to improve write and read performance. Some of these options are specific to certain backends, others are global.

翻译:

与任何数据库一样,OpenTSDB有许多调优参数可用于提高写和读性能。其中一些选项是特定于某些后端的,另一些则是全局的。

TSDB Memory

As with any server process, tuning the TSD’s memory footprint is important for a successful install. There are a number of caches in OpenTSDB that can be tuned.

翻译:

与任何服务器进程一样,调整TSD的内存占用对于成功安装非常重要。OpenTSDB中有许多缓存可以进行调优

UID Caches

OpenTSDB saves space in storage by converting strings to binary UIDs. However for writing and querying, these UIDs have to be cached to improve performance (otherwise every operation would amplify queries against storage). In early versions of OpenTSDB, the cache would maintain an unbounded map of strings to UIDs and UIDs to strings regardless of modes of operation. In 2.4 you can choose how much data to cache and optionally use an LRU. The pertinent settings include:

  • ‘tsd.uid.use_mode=true’ - When this is set to true, the tsd.mode value is examined to determine if either or both of the forward (string to UID) and reverse (UID to string) maps are populated. When empty or set to rw, both maps are populated. When set to ro, only the reverse map is populated (as query results need caching). When in w or write-only mode, only the forward map is populated as metrics need to find their UIDs when writing.

  • tsd.uid.lru.enable=true - Switch to the LRU version of the cache that will expire entries that haven’t been read in a while.

  • tsd.uid.lru.id.size=<integer> - For TSDs focused on reads, set this size larger than tsd.uid.lru.name.size.

  • tsd.uid.lru.name.size=<integer> - For TSDs focused on writes, set this size larger than the tsd.uid.lru.id.size.

翻译:

OpenTSDB通过将字符串转换为二进制UID来节省存储空间。然而,对于写入和查询,必须缓存这些UID以提高性能(否则,每个操作都会放大对存储的查询)。在早期版本的OpenTSDB中,无论操作模式如何,缓存都会维护字符串到UID和UID到字符串的无边界映射。在2.4中,您可以选择缓存多少数据,也可以选择使用LRU。相关设置包括:

“tsd.uid.use_mode=true”-如果设置为true,将检查tsd.mode值,以确定是否填充正向(字符串到uid)和反向(uid到字符串)映射中的一个或两个。当为空或设置为rw时,将填充两个映射。当设置为ro时,只填充反向映射(因为查询结果需要缓存)。当处于w或仅写模式时,由于写入时度量需要找到其UID,因此仅填充前向映射。

tsd.uid.lru.enable=true-切换到缓存的lru版本,该版本将使一段时间内未读取的条目过期。

tsd.uid.lru.id.size=<integer>-对于专注于读取的tsd,请将此大小设置为大于tsd.uid.lou.name.size。

tsd.uid.lru.name.size=<integer>-对于专注于写入的tsd,请将此大小设置为大于tsd.uid.loi.id.size。

HBase Storage

These are parameters to look at for using OpenTSDB with Apache HBase.

Date Tierd Compaction

HBase is an LSM store meaning data is written to blocks in memory, then flushed in blocks to disk, then periodically those blocks on disk are merged into fewer blocks to reduce file count and redundancies. The process of reading and merging blocks from disk can consume a fair amount of CPU and memory so if a system is heavily loaded with time series write traffic, background compactions can begin to impact write performance. HBase offers various compaction strategies including Date Tiered Compaction that looks at the the edit timestamps of columns to figure out if stale file that haven’t been modified should be ignored and arranges data so that time ranged queries are much more efficient.

OpenTSDB can leverage this compaction strategy (as of 2.4) to improve HBase performance, particularly for queries. To setup Date Tiered Compaction in HBase, see HBase Book. Parameters that must be set in the OpenTSDB config include:

  • tsd.storage.use_otsdb_timestamp=true - By default the edit timestamps of every data point is now. This changes the timestamp to be that of the actual data point. Note that rollups do not use this strategy yet.

  • tsd.storage.get_date_tiered_compaction_start=<Unix Epoch MS timestamp> - A timestamp in milliseconds when the date tiered compactor was enabled on a table. If you are creating a brand new table for OpenTSDB you can leave this at the default of 0.

HBase是一种LSM存储,意味着数据被写入内存中的块,然后在块中刷新到磁盘,然后定期将磁盘上的这些块合并为更少的块,以减少文件数量和冗余。从磁盘读取和合并块的过程可能会消耗相当多的CPU和内存,因此,如果系统负载了大量时间序列写入流量,则后台压缩可能会开始影响写入性能。HBase提供了各种压缩策略,包括日期分层压缩,它查看列的编辑时间戳,以确定是否应该忽略尚未修改的陈旧文件,并排列数据,从而使时间范围的查询更加高效。

OpenTSDB可以利用这种压缩策略(从2.4开始)来提高HBase的性能,特别是对于查询。要在HBase中设置日期分层压缩,请参阅HBase Book。必须在OpenTSDB配置中设置的参数包括:

HBase Read/Write Queues

HBase has the ability to split the queues that handle RPCs for writes (mutations) and reads. This is a huge help for OpenTSDB as massive queries will avoid impacting writes and vice-versa. See the HBase Book for various configuration options. Note that different HBase versions have different names for these properties.

Possible starting values are 50% or 60%. E.g. hbase.ipc.server.callqueue.read.share=0.60 or hbase.ipc.server.callqueue.read.ratio=0.60 depending on HBase version.

Also, tuning the call queue size and threads is important. With a large queue, the region server can possibly OOM (if there are a large number of writes backing up) and RPCs will be more likely to time out on the client side if they sit in the queue too long. The queue size is a factor of the number of handlers. Reducing the call queue size also helps to cause clients to throttle, particularly the AsyncHBase client. For HBase 1.3 a good setting may be hbase.ipc.server.max.callqueue.length=100 and hbase.ipc.server.read.threadpool.size=2. If you need to increase the threads, reduce the queue length as well.

翻译:

HBase能够拆分处理写(突变)和读的RPC的队列。这对OpenTSDB来说是一个巨大的帮助,因为大量查询将避免影响写入,反之亦然。有关各种配置选项,请参阅HBase Book。请注意,不同的HBase版本对这些属性有不同的名称。

可能的起始值为50%或60%。例如,hbase.ipc.server.callqueue.read.share=0.60或hbase.iipc.server.callequeue.read.tratio=0.60,具体取决于hbase版本。

此外,调整调用队列大小和线程也很重要。对于大队列,区域服务器可能会OOM(如果有大量写入备份),如果RPC在队列中停留的时间过长,则更有可能在客户端超时。队列大小是处理程序数量的一个因素。减少调用队列大小也有助于导致客户端节流,尤其是AsyncHBase客户端。对于HBase 1.3,一个好的设置可能是HBase.ipc.server.max.callqueue.length=100和HBase.iipc.server.read.threadpool.size=2。如果需要增加线程,也可以减少队列长度。

HBase Cache

Tuning the HBase cache is also important for queries as you want to avoid reading data off disk as much as possible (particularly if that disk is S3). Try using the offheap cache via hbase.bucketcache.combinedcache.enabled=true and hbase.bucketcache.ioengine=offheap. Give the offheap cache a good amount of RAM, e.g. hbase.bucketcache.size=4000 for 4GB of RAM. Since the most recent data is usually queried when reading time series, it’s a good idea to populate the block cache on writes and use most of that space for the latest data. Try the following settings:

hbase.rs.cacheblocksonwrite=true
hbase.rs.evictblocksonclose=false
hfile.block.bloom.cacheonwrite=true
hfile.block.index.cacheonwrite=true
hbase.block.data.cachecompressed=true
hbase.bucketcache.blockcache.single.percentage=.99
hbase.bucketcache.blockcache.multi.percentage=0
hbase.bucketcache.blockcache.memory.percentage=.01
hfile.block.cache.size=.054 #ignored but needs a value.

This will allocate the majority of the black cache for writes and cache it in memory.

For the on-heap cache, you can try an allocation of:

hbase.lru.blockcache.single.percentage=.50
hbase.lru.blockcache.multi.percentage=.49
hbase.lru.blockcache.memory.percentage=.01

翻译:

调整HBase缓存对于查询也很重要,因为您希望尽可能避免从磁盘上读取数据(尤其是当磁盘是S3时)。尝试通过hbase.backetcache.cocombinedcache.enabled=true和hbase.blocketcache.ioengine=offheap使用堆外缓存。为堆外缓存提供充足的RAM,例如,对于4GB的RAM,hbase.bocketcache.size=4000。由于读取时间序列时通常会查询最新的数据,因此最好在写入时填充块缓存,并将大部分空间用于最新数据。请尝试以下设置:

HBase Compaction

Compaction is the process of merging multiple stores on disk for a region into fewer files to reduce space and query times. You can tune the number of threads and thresholds for compaction to avoid using too many resources when the focus should be on writes.

hbase.hstore.compaction.ratio=1.2
hbase.regionserver.thread.compaction.large=2
hbase.regionserver.thread.compaction.small=6
hbase.regionserver.thread.compaction.throttle=524288000

压缩是将一个区域的磁盘上的多个存储合并为更少的文件以减少空间和查询时间的过程。您可以调整线程数量和压缩阈值,以避免在应该将重点放在写入上时使用过多资源。

HBase Regions

For OpenTSDB we’ve observed that 10G regions are a good size for a large cluster hbase.hregion.max.filesize=10737418240.

翻译:

对于OpenTSDB,我们已经观察到10G区域对于大型集群hbase.hregion.max.filesize=1037418240来说是一个不错的大小。

HBase Memstore

Try flushing the mem store to disk (and cache) more often, particularly for heavy write loads. We’ve seen good behavior with 16MBs hbase.hregion.memstore.flush.size=16777216. Also try reducing the memstore size limit via hbase.regionserver.global.memstore.lowerLimit=.20 and hbase.regionserver.global.memstore.upperLimit=.30.

翻译: 

请尝试更频繁地将内存存储刷新到磁盘(和缓存),尤其是在写负载很大的情况下。我们已经看到了16MB hbase.hregion.memstore.flash.size=16777216的良好性能。也可以尝试通过hbase.regiserver.global.membestore.lowerLimit=.20和hbase.reregionserver.global-memstore.upperLimit=.30来减少内存存储大小限制。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/610942.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

在线双目测宽仪 板材实时监测和数据分析!

在各种板材类生产领域里&#xff0c;在线品质检测技术都是非常重要的&#xff0c;它很大程度上决定了生产的质量。在线双目测宽仪就是当前很受欢迎的一种宽度在线检测设备&#xff0c;它采用了双目视觉检测技术&#xff0c;实现宽度尺寸的在线检测&#xff0c;功能十分强大&…

java物品检验管理系统Myeclipse开发mysql数据库web结构java编程计算机网页项目

一、源码特点 java Web 物品检验管理系统是一套完善的java web信息管理系统&#xff0c;对理解JSP java编程开发语言有帮助&#xff0c;系统具有完整的源代码和数据库&#xff0c;系统主要采用B/S模式开发。开发环境为 TOMCAT7.0,Myeclipse8.5开发&#xff0c;数据库为Mysq…

手把手教你如何用python进行数据分析!(附四个案例)

一、前期准备 三个包&#xff1a;Numpy、Pandas和matplotlib&#xff1b;工具&#xff1a;jupyter notebook。首先确保导入这两个包 #导入Numpy包 import numpy as np #导入Pandas包 import pandas as pd二、基础知识 Pandas有三种数据结构&#xff1a;Series、DataFrame和P…

2024 CSRankings全球计算机科学排名发布!清华AI第一,哈工大NLP第一

大家好我是二狗。 这两天全球计算机科学排名 CSRankings 2024发布啦&#xff01; 下面二狗就带大家来看一下最新的排名情况。 清华、北大、上海交大AI领域霸榜前三 在AI板块&#xff0c;主要有人工智能、计算机视觉、机器学习、自然语言处理、网络&信息检索5个细分领域。…

冥想第一千零三十四天

1.周三&#xff0c;跑步跑了6.5公里&#xff0c;很舒服。 2.项目上全力以赴的一天。 3.感谢父母&#xff0c;感谢朋友&#xff0c;感谢家人&#xff0c;感谢不断进步的自己。

[Docker] Mac M1系列芯片上完美运行Docker

docker pull qinchz/dm8-arm64 container_name: dm8ports:- "5236:5236"mem_limit: 1gmemswap_limit: 1gvolumes:- /data/dm8:/home/dmdba/data 数据库实例参数已修改&#xff0c;接近oracle使用习惯 #字符集 utf-8 CHARSET1 #VARCHAR 类型对象的长度以字符为单位 …

成员变量与局部变量的区别?

如果你现在需要准备面试&#xff0c;可以关注我的公众号&#xff1a;”Tom聊架构“&#xff0c;回复暗号&#xff1a;”578“&#xff0c;领取一份我整理的50W字面试宝典&#xff0c;可以帮助你提高80%的面试通过率&#xff0c;价值很高&#xff01;&#xff01; 语法形式&…

外包做了5个月,技术退步一大半了。。。

先说一下自己的情况&#xff0c;本科生&#xff0c;20年通过校招进入深圳某软件公司&#xff0c;干了接近4年的功能测试&#xff0c;今年年初&#xff0c;感觉自己不能够在这样下去了&#xff0c;长时间呆在一个舒适的环境会让一个人堕落!而我已经在一个企业干了四年的功能测试…

什么是Helm?它是如何提升云原生应用私有化部署效率的

转载至我的博客 &#xff0c;公众号&#xff1a;架构成长指南 试想一下&#xff0c;如果有一个项目有50 个微服务&#xff0c;每个微服务都有service、deployment、ingress、pvc等 yaml 文件&#xff0c;算下来大概有 200 个文件&#xff0c;然后这个项目需要基于k8s进行私有化…

动态规划python简单例子-斐波那契数列

def fibonacci(n):dp [0, 1] [0] * (n - 1) # 初始化动态规划数组for i in range(2, n 1):dp[i] dp[i - 1] dp[i - 2] # 计算斐波那契数列的第 i 项print(dp)return dp[n] # 返回斐波那契数列的第 n 项# 示例用法 n 10 # 计算斐波那契数列的第 10 项 result fibonac…

Adding Conditional Control to Text-to-Image Diffusion Models——【论文笔记】

本文发表于ICCV2023 论文地址&#xff1a;ICCV 2023 Open Access Repository (thecvf.com) 官方实现代码&#xff1a;lllyasviel/ControlNet: Let us control diffusion models! (github.com) Abstract 论文提出了一种神经网络架构ControlNet,可以将空间条件控制添加到大型…

【Linux】进程

----------------| 本文目录 |---------------- 1. 进程1.1 基本概念1.2 描述进程 - PCB1.2.1 task_struct - PCB的一种1.2.2 task_struct 内容分类 1.3 组织进程1.4 查看进程1.5 通过系统调用获取进程标示符1.6 通过系统调用创建进程 - fork初识 2. 进程状态2.1 看看Linux内核…

【贪心+循环队列】Dota2 参议院

/** 贪心循环队列* 思路&#xff1a;当每一个参议员行驶禁止权利时&#xff0c;都禁止即将行驶权利的敌方参议员。* 使用两个循环队列&#xff0c;队列中存放位置下标。因此只需要比较两个队列中* 处于队头元素的大小&#xff0c;谁小谁执行权利* auther start* cr…

数字孪生+可视化技术 构建智慧新能源汽车充电站监管平台

前言 充电基础设施为电动汽车提供充换电服务&#xff0c;是重要的交通能源融合类基础设施。近年来&#xff0c;随着新能源汽车产业快速发展&#xff0c;我国充电基础设施持续增长&#xff0c;已建成世界上数量最多、服务范围最广、品种类型最全的充电基础设施体系。着眼未来新…

自行车商城网站网页设计与制作web前端设计html+css+js成品。电脑网站制作代开发。vscodeDrea

【自行车商城网站网页设计与制作web前端设计htmlcssjs成品。电脑网站制作代开发。vscodeDrea】 https://www.bilibili.com/video/BV1wT4y1p7jq/?share_sourcecopy_web&vd_sourced43766e8ddfffd1f1a1165a3e72d7605

AP5153 低压差 线性降压恒流IC 手电筒LED电源驱动

AP5153 是一种 PWM 调光的、低压 差的 LED 线性降压恒流驱动器。 AP5153 仅需要外接一个电阻和一个 NMOS 管就可以构成一个完整的 LED 恒 流驱动电路&#xff0c; 调节该外接电阻就可以调节 输出电流&#xff0c;输出电流可调范围为 20mA 到 3.0A。 AP5153 还可以通过在 DIM…

Leo赠书活动-15期 语义解析:自然语言生成SQL与知识图谱问答实战

✅作者简介&#xff1a;大家好&#xff0c;我是Leo&#xff0c;热爱Java后端开发者&#xff0c;一个想要与大家共同进步的男人&#x1f609;&#x1f609; &#x1f34e;个人主页&#xff1a;Leo的博客 &#x1f49e;当前专栏&#xff1a; 赠书活动专栏 ✨特色专栏&#xff1a;…

C#删除字符串中的回车

string str "这是一段包含\n换行符的文本"; str str.Replace("\r", string.Empty).Replace("\n", string.Empty); Console.WriteLine(str); // 输出结果为&#xff1a;"这是一段包含换行符的文本"

小米机型解锁bl 绕过社区等级5才可以解锁的限制的教程

小米机型目前限制了解锁bl的机制。从以前单一的绑定解锁到目前绑定账号必须小米社区5级的条件限制。切必须要答题分数够才可以申请解锁。限制的根本原因也在为消费者提供更好的服务。避免刷机小白无基础常识解锁bl后第三方固件或者软件造成的故障。另外一方面也在于市场格机脚本…

uniapp之页面返回并调用返回页方法

在H5页面我们只需下面这样&#xff0c;但是打包成APP是无效的app需要单独加上一个.$vm const currentPages getCurrentPages(); const currentPage currentPages[currentPages.length - 1]; currentPage[funName] && currentPage[funName]();最终代码&#xff0c;细…