一直用的 jenkins + saltstack 自动化构建发布项目,一共也就不超过20台服务器,奈何运行时间越来越慢,并且负载越来越高(这里大部分都是使用state模块),但是不用state模块效率挺高的,所以初步锁定坑应该在 state配置以及运行机制上.

查阅各种资料果不其然,需要注意几点.

Minion 配置


By default, the Salt fileserver recurses fully into all defined environments
to attempt to find files. To limit this behavior so that the fileserver only
traverses directories with SLS files and special Salt directories like _modules,
enable the option below. This might be useful for installations where a file root
has a very large number of files and performance is negatively impacted. Default
is False.

# 关闭软连接
fileserver_followsymlinks: False
# 忽略软连接
fileserver_ignoresymlinks: True
# 见上面的引文
fileserver_limit_traversal: True

虽然我修改了minion配置里的 fileserver_limit_traversal 为true 但是效果还是不明显,因为这个fileserver目录里面太多文件了(node打包等一系列文件全在里面,文件数太多了(⊙﹏⊙)b),由上面的引文可见

默认情况,每次执行state文件,minion都会发出 “_file_list” 命令从master同步整个文件列表。当fileserver(即master端配置文件中file_roots设置的目录)中的文件比较多的情况下,会增大集群负载.

再github上也搜到类似的问题,提供思路

参考:

http://vearne.cc/?p=88

https://github.com/saltstack/salt/issues/30498

最新文章

  1. java中HashMap重要性质和优化总结
  2. 学号160809224姓名黄家帅c语言程序设计实验2 选择结构程序设计
  3. JUnit笔记
  4. 网站地图sitemap.xml的格式
  5. QTabWidget添加自定义样式
  6. redis的内部实现机制
  7. [ACM] HDU 5083 Instruction (模拟)
  8. CodeForces 384C Milking cows
  9. C实战:强大的程序调试工具GDB
  10. Linux本地网络脚本配置(内网与外网)
  11. CMDB服务器管理系统【s5day88】:采集资产之Agent、SSH和Salt模式讲解
  12. Pseudo Registers
  13. 20172325 2018-2019-2 《Java程序设计》第九周学习总结
  14. Spark学习笔记——Spark上数据的获取、处理和准备
  15. Jackson xml json
  16. muduo源码分析:组成结构
  17. 【javascript】js 获取 url 后的参数值
  18. 通过android studio上传项目到github
  19. Linux启动提示Kernel panic - not syncing: Attempted to kill init解决办法
  20. 02-线性结构4 Pop Sequence (25 分)

热门文章

  1. heapq 对有序的数组列表进行整体排序
  2. POJ 1797 Heavy Transportation(Kruskal灵活使用)(瓶颈树)
  3. SVN (TortioseSVN) 版本控制之忽略路径(如:bin、obj)
  4. P1525 关押罪犯[扩展域并查集]
  5. VS2005编译QT4.8.2
  6. 2019-2020-1 20199301《Linux内核原理与分析》第八周作业
  7. 大数据之路week07--day07 (Hive结构设计以及Hive语法)
  8. 阿里云——扩展Linux系统盘
  9. Json在序列化注意问题
  10. spring配置文件ApplicationContext.xml里面class等没有提示功能