压测环境

  • k8s容器环境
  • 单核
  • 32GB内存
  • thanos版本:v0.22.0
  • 客户端发送32271959条数据,100个并发;同样的数据文件发送了两遍,取第二遍的性能数据
  • 在thanos receiver CPU占用100%的情况下观察其表现
  • 持续时间:14:29~15:03,33分钟

压测详细数据

1.请求曲线:



查询表达式:sum by (instance) (rate(http_requests_total{handler="receive",method="post",instance="$instance",code="200"}[1m]))*60



查询表达式:sum by () (rate(http_request_size_bytes_sum{instance="$instance"}[1m])/1024/1024)



查询表达式:sum by (code) (rate(http_requests_total{handler="receive",method="post",instance="$instance",code!="200"}[1m]))*60

2.资源情况



查询表达式:sum by (instance) (rate(process_cpu_seconds_total{instance="$instance"}[1m]))*60



查询表达式:

  • 物理内存:sum by (instance) (max_over_time(process_resident_memory_bytes{instance="$instance"}[1m]))/1024/1024/1024

    • 物理内存峰值:25.9GB
    • 压测前的物理内存:13.8GB,内存上涨12.1GB
  • 虚拟内存:sum by (instance) (max_over_time(process_virtual_memory_bytes{instance="$instance"}[1m]))/1024/1024/1024
  • thanos receiver的内存,并没有因为切换tsdb而明显的降低,没有请求后,内存释放得非常缓慢:

    • 从9:30~11:09,共100分钟内,内存从22.8GB减少到13.8GB,减少了9GB

3.sample情况



查询表达式:prometheus_tsdb_head_samples_appended_total{instance="$instance"}

  • 新增data point 85490118,平均 2590610/min, 43177/s



    查询表达式:sum by () (rate(prometheus_tsdb_head_samples_appended_total{instance="$instance"}[1m]))*60
  • 峰值:4807544/min, 80126/s,可以认为thanos receiver单核的极限的处理data point的能力为8万每秒。

4. time series情况:



查询表达式:prometheus_tsdb_head_series{instance="$instance"}



查询表达式:sum by () (rate(prometheus_tsdb_head_series_created_total{instance="$instance"}[1m]))*60

  • 因为同样的数据文件发送了两次,所以time series的总数是一致的;time series总数达到 3934198

    • 平均每个time series有 85490118 / 3934198 = 21.7 个data point(sample)

5. chunk情况:



查询表达式:prometheus_tsdb_head_chunks{instance="$instance"}

  • tsdb的两个参数:"--tsdb.min-block-duration=30m","--tsdb.max-block-duration=30m",因此14:29~14:49达到了tsdb切换的周期



    查询表达式:sum by () (rate(prometheus_tsdb_head_chunks_created_total{instance="$instance"}[1m]))*60

6.其他



查询表达式:prometheus_tsdb_compactions_triggered_total{instance="$instance"}

  • 为什么只在没有请求的时候触发 compaction ?



    查询表达式:prometheus_tsdb_head_truncations_total{instance="$instance"}
  • truncate动作的执行规律,还没搞明白

结论

  • thanos receiver单核处理data point的能力大约在 43177/s ~ 80126/s
  • 粗略的认为:存储 3934198 time series + 85490118个data point花费了12.1GB内存

最新文章

  1. java Io缓冲区复制文件
  2. sass编译
  3. Python3 升级pip
  4. (AS3)关于arguments
  5. JAVA使用HBASE常用方法
  6. Ckeditor 中一些核心的对象的作用
  7. ubuntn 虚拟机NAT 静态IP 网络配置
  8. QStringLiteral(源代码里有一个通过构造函数产生的从const char*到QString的隐式转换,QStringLiteral字符串可以放在代码的任何地方,编译期直接生成utf16字符串,速度很快,体积变大)
  9. 标准I/O库函数的缺陷
  10. js 时间
  11. Model中设置表单验证方法
  12. Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/adp;
  13. Android Studio精彩案例(四)《DrawerLayout使用详解仿网易新闻客户端侧边栏 》
  14. 《java入门第一季》之面向对象(匿名对象)
  15. MongoDB分组查询,聚合查询,以及复杂查询
  16. 程序执行流程/布尔类型与布尔:运算猜数字游戏;库的使用:turtle
  17. Perl面向对象(2):对象
  18. python文件的分类
  19. ios the request was denied by service delegate for reason unspecified
  20. JSON数据格式解析

热门文章

  1. mysql表死锁查询
  2. JAVA整合kaptcha生成验证码 (字母验证码和算术验证码)
  3. JAVA携带参数(带有请求参数,请求头参数)直接发送POST请求
  4. 【LeetCode】994. Rotting Oranges 解题报告(Python)
  5. 【剑指Offer】从上往下打印二叉树 解题报告(Python)
  6. 【LeetCode】832. Flipping an Image 解题报告(Python)
  7. hdu 5592 ZYB's Premutation(线段树优化)
  8. HDU 1052:Tian Ji -- The Horse Racing(贪心)
  9. EBGAN
  10. <数据结构>XDOJ324,325图的优先遍历