簡體   English   中英

運行`airflow Scheduler`啟動33個調度程序進程

[英]Running `airflow scheduler` launches 33 scheduler processes

當將LocalExecutorMySQL后端一起使用時,在Centos 6機器上運行airflow scheduler會創建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 ... 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 ... 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 ... airflow 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主進程和工作進程。 使用SequentialExecutorsqlite后端)運行它只是啟動了一個調度程序進程。
氣流仍然有效(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個進程!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM