Opentsdb官方优化文档 - 翻译

这篇具有很好参考价值的文章主要介绍了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配置中设置的参数包括:

tsd.storage.use_otsdb_timestamp=true-默认情况下,每个数据点的编辑时间戳为现在。这会将时间戳更改为实际数据点的时间戳。请注意,汇总尚未使用此策略。

tsd.storage.get_date_tiered_compaction_start=<Unix Epoch MS时间戳>-在表上启用日期分层压缩程序时的时间戳(以毫秒为单位)。如果您正在为OpenTSDB创建一个全新的表,您可以将其保留为默认值0。

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来减少内存存储大小限制。文章来源地址https://www.toymoban.com/news/detail-792153.html

到了这里,关于Opentsdb官方优化文档 - 翻译的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • slint1.32 官方文档翻译00

    来源于 Slint 1.3.2 Reference 主要用 有道翻译,个人参考用。翻译不妥的,请指正。 目录: Slint 1.3.2 Reference Slint 1.3.2参考 INTRODUCTION 介绍 Getting Started 开始 Supported Platforms 支持的平台 LANGUAGE REFERENCE 语言参考 Introduction 介绍 Concepts 概念 .slint File 文件 Positioning and Layout of Elements 元

    2024年01月16日
    浏览(36)
  • slint 1.3.2 官方文档翻译06

    SlintPad 基于官方文档的个人翻译,主要使用 有道翻译。 Debugging Techniques - Slint 1.3.2 Reference ADVANCED TOPICS 高级的主题-- Debugging Techniques 调试技术   On this page we share different techniques and tools we’ve built into Slint that help you track down different issues you may be running into, during the design and dev

    2024年01月18日
    浏览(46)
  • OpenLayers7官方文档翻译,OpenLayers7中文文档,OpenLayers快速入门

    这个入门文档向您展示如何放一张地图在web网页上。 开发设置使用 NodeJS (至少需要Nodejs 14 或更高版本),并要求安装 git 。 开始使用OpenLayers构建项目的最简单方法是运行: npm create ol-app 第一个命令将创建一个名为 my-app 的目录(如果您愿意,可以使用不同的名称),安装

    2024年02月10日
    浏览(39)
  • 数据库信息速递 -- MariaDB 裁员后,前景不确定 (翻译)

    开头还是介绍一下群,如果感兴趣polardb ,mongodb ,mysql ,postgresql ,redis 等有问题,有需求都可以加群群内有各大数据库行业大咖,CTO,可以解决你的问题。加群请加 liuaustin3微信号 ,在新加的朋友会分到3群(共1140人左右 1 + 2 + 3) MariaDB,该公司是开源基于MySQL的关系数据库管理

    2024年02月13日
    浏览(32)
  • 运维系列(仅供参考):官方文档翻译 -- 开始 Elasticsearch 入门

    想快速入门,来看 官方文档吧!!! 个人翻译版 Github地址,英语水平有限,有错误或遗漏的欢迎留言指正。 准备好如何使用 Elasticsearch 来测试驱动使用 REST APIs 来存储、查询、分析数据了吗? 遵循如下开始教程: 获取一个 Elasticsearch 实例并启动运行 添加索引实例文档 使用

    2024年04月27日
    浏览(45)
  • 数据库信息速递: Apache Arrow 如何加速 InfluxDB (翻译)

    开头还是介绍一下群,如果感兴趣PolarDB ,MongoDB ,MySQL ,PostgreSQL ,Redis, Oceanbase, Sql Server等有问题,有需求都可以加群群内,可以解决你的问题。加群请联系 liuaustin3 ,(共1760人左右 1 + 2 + 3 + 4 +5) 4群(260+),另欢迎 OpenGauss 的技术人员加入。 最近是百业萧条,本地前十的新能源

    2024年02月03日
    浏览(41)
  • 快速傅里叶变换-FFTW库的使用-参考和翻译官方文档

    Plan:为实现意外结果的最佳方法而烦恼。 [Ambrose Bierce, The Enlarged Devil’s Dictionary。] FFTW 计算大小为 N 的一维 DFT 的基本用法很简单,它通常看起来像这样的代码: 您必须将此代码与 fftw3 库链接。 在 Unix 系统上,使用 -lfftw3 -lm 链接。 示例代码首先分配输入和输出数组。 您可

    2023年04月08日
    浏览(75)
  • Python办公自动化 – 自动化文本翻译和Oracle数据库操作

    以下是往期的文章目录,需要可以查看哦。 Python办公自动化 – Excel和Word的操作运用 Python办公自动化 – Python发送电子邮件和Outlook的集成 Python办公自动化 – 对PDF文档和PPT文档的处理 Python办公自动化 – 对Excel文档和数据库的操作运用、设置计划任务 Python办公自动化 – 对

    2024年01月17日
    浏览(60)
  • 近13万汉藏对照词典汉藏翻译ACCESS\EXCEL数据库

    今天这个数据库来源于《汉藏英常用新词语词典》编纂小组编纂、四川民族出版社和四川出版集团出版的《汉藏英常用新词语词典》及其增补本。具体看截图,截图包含所有字段: 目录汇总:藏汉大辞典(25228)、藏汉英信息技术词典(11763)、汉藏对照词典(82530)、汉藏英

    2024年02月08日
    浏览(31)
  • MongoDB 可调节的一致性,其他数据库都不行系列 (白皮书 翻译)--2

    开头还是介绍一下群,如果感兴趣PolarDB ,MongoDB ,MySQL ,PostgreSQL ,Redis, Oceanbase, Sql Server等有问题,有需求都可以加群群内有各大数据库行业大咖,CTO,可以解决你的问题。加群请联系 liuaustin3 ,(共2000人左右 1 + 2 + 3 + 4 +5) 新人奖直接分配到5群,另欢迎 OpenGauss 的技术人员加入。

    2024年03月18日
    浏览(39)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包