【SaltStack官方版】—— MANAGING THE JOB CACHE
MANAGING THE JOB CACHE
The Salt Master maintains a job cache of all job executions which can be queried via the jobs runner. This job cache is called the Default Job Cache.
Salt Master维护所有作业执行的作业缓存,可以通过作业执行器查询。此作业缓存称为默认作业缓存。
default job cache
A number of options are available when configuring the job cache. The default caching system uses local storage on the Salt Master and can be found in the job cache directory (on Linux systems this is typically /var/cache/salt/master/jobs). The default caching system is suitable for most deployments as it does not typically require any further configuration or management.
配置作业缓存时可使用多种选项。默认缓存系统使用salt Master上的本地存储,并且可以在作业缓存目录中找到(在Linux系统上,这通常是 /var/cache/salt/master/jobs)。默认的缓存系统适用于大多数部署,因为它通常不需要任何进一步的配置或管理。
The default job cache is a temporary cache and jobs will be stored for 24 hours. If the default cache needs to store jobs for a different period the time can be easily adjusted by changing the keep_jobs parameter in the Salt Master configuration file. The value passed in is measured via hours:
默认作业缓存是临时缓存,作业将被存储24小时。如果缺省缓存需要存储不同时期的作业,则可以通过更改Salt Master配置文件中的keep_jobs参数来很容易地调整时间。通过时间测量的值通过:
keep_jobs: 24
reducing the size of the default job cache
The Default Job Cache can sometimes be a burden on larger deployments (over 5000 minions). Disabling the job cache will make previously executed jobs unavailable to the jobs system and is not generally recommended. Normally it is wise to make sure the master has access to a faster IO system or a tmpfs is mounted to the jobs dir.
默认的作业缓存有时会对更大的部署(超过5000个任务)造成负担。禁用作业缓存将使以前执行的作业对作业系统不可用,通常不推荐。通常情况下,确保master能够访问更快的IO系统,或者将tmpfs 安装到job dir上是明智的。
However, you can disable the job_cache by setting it to False in the Salt Master configuration file. Setting this value to False means that the Salt Master will no longer cache minion returns, but a JID directory and jid file for each job will still be created. This JID directory is necessary for checking for and preventing JID collisions.
但是,可以通过在Salt Master配置文件中将其设置为false来禁用job_cache 。将此值设置为false意味着Salt Master将不再缓存minion返回,但仍将创建每个作业的JID目录和JID文件。这个JID目录是检查和防止JID冲突所必需的。
The default location for the job cache is in the /var/cache/salt/master/jobs/ directory.
作业缓存的默认位置在/var/cache/salt/master/jobs/目录。
Setting the job_cache` to False in addition to setting the keep_jobs option to a smaller value, such as 1, in the Salt Master configuration file will reduce the size of the Default Job Cache, and thus the burden on the Salt Master.
除了将 keep_jobs 作业选项设置为较小的值(如1),在Salt Master 配置文件中设置 job_cache 为False,将减少默认作业缓存的大小,从而减轻 Salt Master 服务器的负担。
注意:
Changing the keep_jobs option sets the number of hours to keep old job information and defaults to 24 hours. Do not set this value to 0 when trying to make the cache cleaner run more frequently, as this means the cache cleaner will never run.
更改 keep_jobs 选项设置了将旧作业信息和默认值保持为24小时的小时数。当试图使缓存清洁器更频繁地运行时,不要将此值设置为0,因为这意味着缓存清洁器将永远不会运行。
ADDITIONAL JOB CACHE OPTIONS
Many deployments may wish to use an external database to maintain a long term register of executed jobs. Salt comes with two main mechanisms to do this, the master job cache and the external job cache.
许多部署可能希望使用外部数据库来维护已执行作业的长期注册。salt有两种主要的机制来完成这一工作:master job cache 和 external job cache。
See Storing Job Results in an External System.
【SaltStack官方版】—— MANAGING THE JOB CACHE的更多相关文章
- 【SaltStack官方版】—— job management
JOB MANAGEMENT New in version 0.9.7. Since Salt executes jobs running on many systems, Salt needs to ...
- 【SaltStack官方版】—— returners——返回器
ETURNERS 返回器 By default the return values of the commands sent to the Salt minions are returned to t ...
- 【SaltStack官方版】—— STORING JOB RESULTS IN AN EXTERNAL SYSTEM
STORING JOB RESULTS IN AN EXTERNAL SYSTEM After a job executes, job results are returned to the Salt ...
- 【SaltStack官方版】—— states教程, part 2 - 更复杂的states和必要的事物
states tutorial, part 2 - more complex states, requisites 本教程建立在第1部分涵盖的主题上.建议您从此处开始. 在Salt States教程的 ...
- 【SaltStack官方版】—— Events&Reactor系统—BEACONS
Events&Reactor系统—BEACONS Beacons let you use the Salt event system to monitor non-Salt processes ...
- 【SaltStack官方版】—— Events&Reactor系统—EVENT SYSTEM
Events&Reactor系统 EVENT SYSTEM The Salt Event System is used to fire off events enabling third pa ...
- 【SaltStack官方版】—— EVENTS & REACTOR指南
EVENTS & REACTOR Event System Event Bus Event types Salt Master Events Authentication events Sta ...
- 【SaltStack官方版】—— states教程, part 4 - states 说明
STATES TUTORIAL, PART 4 本教程建立在第1部分.第2部分.第3部分涵盖的主题上.建议您从此开始.这章教程我们将讨论更多 sls 文件的扩展模板和配置技巧. This part o ...
- 【SaltStack官方版】—— states教程, part 3 - 定义,包括,延伸
STATES TUTORIAL, PART 3 - TEMPLATING, INCLUDES, EXTENDS 本教程建立在第1部分和第2部分涵盖的主题上.建议您从此开始.这章教程我们将讨论更多 s ...
随机推荐
- Oracle 数据字典视图(V$,GV$,X$)
常用的几个数据字典: user_objects : 记录了用户的所有对象,包含表.索引.过程.视图等信息,以及创建时间,状态是否有效等信息,是非DBA用户的大本营.想知道自己有哪些对象,往这里查. u ...
- java:LeakFilling (SQL,JDBC)
1.JDBC中的sql里面不能加 :号,否则报错 2.Oracle数据必须提交后才可以使用JDBC进行操作,否则没有结果 3. JDBC插入序列: 首先在sequences建一个序列 insert i ...
- 应用安全 - 工具 | 平台 -webmin - 漏洞 - 汇总
简介 开发语言 PHP 用途系统管理 CVE-2019-15642 Date2019.7 类型远程代码执行 影响范围Webmin <= 1.920 复现POC|EXPOBJECT Socket; ...
- python中导入模块的注意点
1.import 和 from import 的区别 import module导入模块:语句执行完后会创建一个新的命名空间,在该命名空间中执行相应的函数.执行时,需要的变量.函数和类名前需要加 ...
- CentOS7之root密码破解
1.重新启动Linux系统,在出现引导界面时上下移动光标选择第一引导项,按下键盘的“e”键进入内核编辑界面,如图所示: 2.找到linux16参数这一行,按住“Ctrl+e”组合键跳转到行尾,添加rd ...
- QT use of undeclared identifier 'cout'
在QT 5.12中直接使用cout将提示错误如下: 添加库 #include<iostream>,并将cout&end改为std::cout&std::endl 代码如下: ...
- 拉勾网python开发要求爬虫
#今日目标 **拉勾网python开发要求爬虫** 今天要爬取的是北京python开发的薪资水平,招聘要求,福利待遇以及公司的地理位置. 通过实践发现除了必须携带headers之外,拉勾网对ip访问频 ...
- php常用header状态
<?php //200 正常状态 header('HTTP/1.1 200 OK'); // 301 永久重定向,记得在后面要加重定向地址 Location:$url header('HTTP/ ...
- Codeforces - 1203D2 - Remove the Substring (hard version) - 双指针
https://codeforces.com/contest/1203/problem/D2 上次学了双指针求两个字符串之间的是否t是s的子序列.但其实这个双指针可以求出的是s的前i个位置中匹配t的最 ...
- 09、RNA降解图的计算过程
RNA降解是影响芯片质量的一个很重要的因素,因为RNA是从5’开始降解的,所以理论5’的荧光强度要低于3’.RNA降解曲线可以表现这种趋势. 以样品GSM286756.CEL和GSM286757.CE ...