VictoriaMetrics:使用vmctl来实现vm-storage向victoria-metrics-prod(单机版)迁移数据
前一篇提到了,vm-storage的备份数据,无法被victoria-metrics-prod(单机版)读取。
继续翻文档发现vmctl可以实现这个效果:
1.启动vm-restore恢复数据
vmrestore-prod \
-configFilePath="/etc/cos/config.ini" \
-credsFilePath="/etc/cos/creds.ini" \
-customS3Endpoint="https://cos.ap-guangzhou.myqcloud.com" \
-src="s3://bucket/vm-storage/2021-12-27/" \
-storageDataPath="/var/victoria-metrics/data/2021-12-27/" \
-httpListenAddr="0.0.0.0:8420" \
-memory.allowedBytes=2GB \
-concurrency=10 \
-maxBytesPerSecond=100MB
2.启动vm-storage
vmstorage-prod \
-memory.allowedBytes 30GB \
-storageDataPath /var/victoria-metrics/data/2021-12-27/ \
-retentionPeriod=15d \
-httpListenAddr 0.0.0.0:8482 \
-vminsertAddr 0.0.0.0:8400 \
-vmselectAddr 0.0.0.0:8401 \
-search.maxTagKeys 100000 \
-search.maxTagValues 1000000 \
-search.maxUniqueTimeseries=10000000
3.启动一个vm-select来查询这个节点
vmselect-prod \
-cacheDataPath /var/victoria-metrics/cache \
-memory.allowedBytes 10GB \
-replicationFactor 1 \
-storageNode 127.0.0.1:8401 \
-httpListenAddr 0.0.0.0:8481 \
-search.maxConcurrentRequests 2000 \
-search.maxPointsPerTimeseries 5000000 \
-search.maxQueryDuration 600s
4.启动victoria-metrics-prod(单机版)
victoria-metrics-prod \
-dedup.minScrapeInterval=30s \
-httpListenAddr="0.0.0.0:8428" \
-insert.maxQueueDuration=2m \
-maxInsertRequestSize=500MB \
-memory.allowedBytes=7GB \
-retentionPeriod=1y \
-search.maxConcurrentRequests=500 \
-search.maxPointsPerTimeseries=100000 \
-search.maxUniqueTimeseries=1000000 \
-storageDataPath=/var/victoria-metrics/data/vm-single/data/
5.启动vmctl来传输数据
vmctl-prod vm-native \
--vm-native-filter-time-start=0 \
--vm-native-filter-time-end=$(date +"%s") \
--vm-native-src-addr="http://127.0.0.1:8481/select/0/prometheus/" \
--vm-native-dst-addr="http://127.0.0.1:8428/"
运行结果:
VictoriaMetrics Native import mode
Initing export pipe from "http://127.0.0.1:8481/select/0/prometheus" with filters:
filter: match[]={__name__!=""}
start: 0
end: 1640919407
Initing import process to "http://127.0.0.1:8428":
Total: 5.81 GiB Speed: 1.29 MiB p/s
2021/12/31 12:13:22 Total time: 1h16m35.022151869s
结论:
- 用vmctl来传输数据,奇慢,每秒传输几百KB数据。生产环境中用于迁移数据,简直是找死!
- 统计下来,每核传输数速率
663kb/s(主要是vm单机版耗CPU很高) - 传输的时候,所有核跑满。可以通过增加CPU资源加快导入速度。
- 统计下来,每核传输数速率
- 这个东西可能只适合特定的某些数据的导入导出
VictoriaMetrics:使用vmctl来实现vm-storage向victoria-metrics-prod(单机版)迁移数据的更多相关文章
- Azure Storage 利用 azCopy 复制迁移数据
一,引言 前两天遇到了Azure Blob Storage 需要迁移到另外的一个 Azure Blob Storage 中.手动下载.上传已经无法满足了,得另寻一种方式了 AzCopy.Azure 为 ...
- VM Storage Policies深度解析
- 【Azure Developer】使用Java SDK代码创建Azure VM (包含设置NSG,及添加数据磁盘SSD)
在参考Azure官方文档进行VM创建时,发现其中没有包含如何设置NSG的内容,以及如何在创建时就添加数据磁盘的代码(设置磁盘为SSD类型).本文的内容以"使用 Java 创建和管理 Azur ...
- [New Portal]Windows Azure Virtual Machine (23) 使用Storage Space,提高Virtual Machine磁盘的IOPS
<Windows Azure Platform 系列文章目录> 注意:如果使用Azure Virtual Machine,虚拟机所在的存储账号建议使用Local Redundant.不建议 ...
- Windows Azure Virtual Machine (26) 使用高级存储(SSD)和DS系列VM
<Windows Azure Platform 系列文章目录> Update: 2016-11-3,如果大家在使用Linux VM,使用FIO进行IOPS测试的时候,请使用以下命令: su ...
- ES(3): ES Cluster Extended Azure Storage
Azure VM的磁盘空间远远不能满足ES集群存储需求(还需除掉VM的临时盘),同时也未找着ES配置 block blob storage 存储的组件,因此下文介绍通过挂载附加盘的方式增加ES集群存储 ...
- Exam E05-001 Information Storage and Management Version 3 Exam
Emc 考试 e05-001信息存储和管理版本3考试 [总问题:171] 哪种 emc 产品提供软件定义的存储基础架构的自动监视和报告? A. viprSrmB. 斯纳普内C. 阿瓦马尔D. 快速副总 ...
- 上海-北京间通过Azure Storage的RA-GRS类型的存储账户进行快速复制
Azure的Blob存储分成多种类型,目前主要有: 其中RA-GRS可以在上海-北京两个数据中心间同步数据.并且,在第二个数据中心可以只读的方式读取这个存储账户中的Blob内容. 虽然GRS采用的是准 ...
- google cloud storage products
https://cloud.google.com/products/storage/ BigTable Cloud Bigtable 是 Google 面向大数据领域的 NoSQL 数据库服务.它也是 ...
随机推荐
- Spring Boot应用程序启动器
官网地址:https://docs.spring.io/spring-boot/docs/2.1.12.RELEASE/reference/html/using-boot-build-systems. ...
- JAVA获取昨天、今天、明天等日期
/** * 获取明天的日期字符串 * @return */ public static String tomorrowDateStr(){ Date date=new Date();//取时间 Cal ...
- 『与善仁』Appium基础 — 27、模拟手势点击坐标
目录 1.模拟手势点击坐标 2.tap()用法 3.练习 4.弊端 1.模拟手势点击坐标 在定位元素的时候,你使出了十八班武艺还是定位不到,怎么办呢?(面试经常会问) 那就拿出绝招:点击元素所在位置的 ...
- c++之一个方便的日志库
概述 本文演示环境: win10 + vs2017 日志,我用的很少,通常是用作动态库调试使用. 日志记录下来,基本就没看过,除非模块出现了问题. 使用cmake管理的项目 使用C++封装了C语言读写 ...
- c++设计模式概述之外观
类写的不够规范,目的是缩短篇幅,请实际中不要这样做. 1.概述 了解外观模式相关概念后,一下子想到的是主板, 主板上有各种元器件,各种指示灯,各种电容,各种电路.然而,主板供电的接口就一个,其他元器件 ...
- 【九度OJ】题目1442:A sequence of numbers 解题报告
[九度OJ]题目1442:A sequence of numbers 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1442 ...
- 【LeetCode】829. Consecutive Numbers Sum 解题报告(C++)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 数学方法 日期 题目地址:https://leetc ...
- 【九度OJ】题目1072:有多少不同的面值组合? 解题报告
[九度OJ]题目1072:有多少不同的面值组合? 解题报告 标签(空格分隔): 九度OJ http://ac.jobdu.com/problem.php?pid=1072 题目描述: 某人有8角的邮票 ...
- 【LeetCode】368. Largest Divisible Subset 解题报告(Python)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址:https://leetcode.com/problems/largest-d ...
- javascript原始值和引用值类型及区别
原始值和引用值类型及区别 首先,原始值和引用值类型都是js中的数据类型,为了充分利用存储空间,定义了不同的数据类型,而且js是弱类型,动态语言,数据类型可变. 原始值(简单数据类型) 存储在栈中的简单 ...