运行 `airflow scheduler` 启动 33 个调度程序进程
Running `airflow scheduler` launches 33 scheduler processes
当使用带有 MySQL
后端的 LocalExecutor
时,运行ning airflow scheduler
在我的 Centos 6 机器上创建了 33 个调度程序进程,例如
deploy 55362 13.5 1.8 574224 73272 ? Sl 18:59 7:42 /usr/local/bin/python2.7 /usr/local/bin/airflow scheduler
deploy 55372 0.0 1.5 567928 60552 ? Sl 18:59 0:00 /usr/local/bin/python2.7 /usr/local/bin/airflow scheduler
deploy 55373 0.0 1.5 567928 60540 ? Sl 18:59 0:00 /usr/local/bin/python2.7 /usr/local/bin/airflow scheduler
...
这些不同于 Executor 进程和 gunicorn master 和 worker 进程。
运行 它与 SequentialExecutor
(sqlite
后端)一起启动一个调度程序进程。
Airflow 仍然有效(DAG 正在变得 运行),但是这些进程的绝对数量让我觉得有些不对劲。
当我在数据库中 运行 select * from job where state = 'running';
时,只返回 5 SchedulerJob
行。
这正常吗?
是的,这很正常。这些是调度程序进程。您可以使用 airflow.cfg
中的以下参数来控制它
# The amount of parallelism as a setting to the executor. This defines
# the max number of task instances that should run simultaneously
# on this airflow installation
parallelism = 32
这些是从调度程序生成的,其 pid 可以在 airflow-scheduler.pid 文件
中找到
所以您看到的是 32+1=33 个进程。
希望这能消除您的疑虑。
干杯!
从 v1.10.3 开始,这是我发现的。我的设置是:
parallelism = 32
max_threads = 4
共有
- 1(主要)+
- 32(执行人)+
- 1 (dag_processor_manager) +
- 4(DAG 处理器)
= 38 个进程!
当使用带有 MySQL
后端的 LocalExecutor
时,运行ning airflow scheduler
在我的 Centos 6 机器上创建了 33 个调度程序进程,例如
deploy 55362 13.5 1.8 574224 73272 ? Sl 18:59 7:42 /usr/local/bin/python2.7 /usr/local/bin/airflow scheduler
deploy 55372 0.0 1.5 567928 60552 ? Sl 18:59 0:00 /usr/local/bin/python2.7 /usr/local/bin/airflow scheduler
deploy 55373 0.0 1.5 567928 60540 ? Sl 18:59 0:00 /usr/local/bin/python2.7 /usr/local/bin/airflow scheduler
...
这些不同于 Executor 进程和 gunicorn master 和 worker 进程。
运行 它与 SequentialExecutor
(sqlite
后端)一起启动一个调度程序进程。
Airflow 仍然有效(DAG 正在变得 运行),但是这些进程的绝对数量让我觉得有些不对劲。
当我在数据库中 运行 select * from job where state = 'running';
时,只返回 5 SchedulerJob
行。
这正常吗?
是的,这很正常。这些是调度程序进程。您可以使用 airflow.cfg
中的以下参数来控制它# The amount of parallelism as a setting to the executor. This defines
# the max number of task instances that should run simultaneously
# on this airflow installation
parallelism = 32
这些是从调度程序生成的,其 pid 可以在 airflow-scheduler.pid 文件
中找到所以您看到的是 32+1=33 个进程。
希望这能消除您的疑虑。
干杯!
从 v1.10.3 开始,这是我发现的。我的设置是:
parallelism = 32
max_threads = 4
共有
- 1(主要)+
- 32(执行人)+
- 1 (dag_processor_manager) +
- 4(DAG 处理器)
= 38 个进程!