Skip to main content

Airflow benchmarks

Summary

Airflow was the slowest in all categories, with high orchestration overhead and poor responsiveness to both lightweight and long-running tasks. It suffers from long assignment delays and inefficient scaling, making it unsuitable for performance-critical workflows.

Airflow setup

We set up Airflow version 2.7.3 using the docker-compose.yaml referenced in Airflows official documentation.

The DAG was the following:

ITER = 10     # respectively 40
FIBO_N = 33 # respectively 10

with DAG(
dag_id="bench_{}".format(ITER),
schedule=None,
start_date=datetime(2023, 1, 1),
catchup=False,
tags=["benchmark"],
) as dag:
for i in range(ITER):
@task(task_id=f"task_{i}")
def task_module():
return fibo(FIBO_N)
fibo_task = task_module()

if i > 0:
previous_task >> fibo_task
previous_task = fibo_task

Fibonacci 40 iterations, n=10

This benchmark measures the performance of Airflow when handling a large number of lightweight tasks. The tasks are Fibonacci calculations with 40 iterations and a base value of 10.

Python

Visualization
Statistics
AirflowWindmillWindmill Dedicated
Total duration (in seconds)116.2214.3832.092
Assignment75.112 (64.63%)1.836 (41.89%)1.795 (85.80%)
Execution12.516 (10.77%)2.215 (50.54%)0.122 (5.83%)
Transition28.593 (24.60%)0.332 (7.57%)0.175 (8.37%)
Timing details
View task timing details
TaskCreated atStarted atCompleted at
task_000.0004.3354.752
task_016.2368.7108.923
task_029.79211.11711.320
task_0312.15713.51313.733
task_0413.80415.41315.622
task_0516.20117.58717.849
task_0618.90220.22720.432
task_0721.26222.69122.958
task_0824.01525.34925.558
task_0926.36828.15828.635
task_1029.36131.03531.357
task_1131.86136.24537.062
task_1238.86842.18042.388
task_1342.64144.02744.280
task_1445.32146.67646.877
task_1547.67649.07349.298
task_1650.43251.78651.999
task_1752.41553.85254.051
task_1854.15555.56455.771
task_1956.57558.34658.781
task_2059.25460.99961.355
task_2162.07163.67164.079
task_2264.36666.01166.442
task_2367.06168.61968.866
task_2469.60171.84272.303
task_2573.37377.49578.212
task_2678.42879.89680.134
task_2781.19982.49582.741
task_2883.66584.95885.153
task_2985.20586.56186.766
task_3087.69089.35789.778
task_3190.41991.97092.282
task_3293.02494.61095.031
task_3395.63697.49597.745
task_3498.857100.626100.877
task_35101.926103.271103.477
task_36103.915105.523105.875
task_37105.996107.412107.622
task_38108.409112.610113.214
task_39114.054115.998116.221
Windmill Comparison
TaskCreated atStarted atCompleted at
task_000.0000.0030.059
task_010.0670.1130.171
task_020.1800.2260.280
task_030.2900.3350.389
task_040.3980.4460.501
task_050.5100.5580.614
task_060.6220.6690.725
task_070.7320.7800.834
task_080.8420.8890.942
task_090.9500.9971.052
task_101.0611.1081.166
task_111.1751.2201.274
task_121.2831.3301.385
task_131.3941.4401.494
task_141.5031.5501.605
task_151.6121.6611.716
task_161.7231.7701.823
task_171.8311.8781.930
task_181.9391.9862.041
task_192.0492.0962.152
task_202.1612.2092.266
task_212.2742.3202.376
task_222.3842.4312.486
task_232.4952.5422.596
task_242.6042.6522.706
task_252.7152.7612.816
task_262.8252.8722.925
task_272.9332.9793.033
task_283.0423.0903.145
task_293.1543.2013.269
task_303.2783.3253.382
task_313.3913.4373.493
task_323.5013.5483.602
task_333.6113.6603.715
task_343.7233.7703.823
task_353.8333.8793.934
task_363.9423.9904.045
task_374.0534.1014.157
task_384.1654.2124.268
task_394.2774.3244.383
Windmill Dedicated Comparison
TaskCreated atStarted atCompleted at
task_000.0000.0190.022
task_010.0290.0730.077
task_020.0810.1250.128
task_030.1340.1790.182
task_040.1870.2310.234
task_050.2390.2840.287
task_060.2920.3380.341
task_070.3450.3910.394
task_080.3980.4440.447
task_090.4510.4970.500
task_100.5050.5490.552
task_110.5570.6030.606
task_120.6100.6550.659
task_130.6630.7090.712
task_140.7160.7610.764
task_150.7680.8140.817
task_160.8210.8670.870
task_170.8760.9210.924
task_180.9290.9730.976
task_190.9811.0271.030
task_201.0351.0801.083
task_211.0871.1321.135
task_221.1391.1861.189
task_231.1931.2381.241
task_241.2461.2921.295
task_251.2991.3451.348
task_261.3521.3981.401
task_271.4051.4511.454
task_281.4581.5041.507
task_291.5121.5571.560
task_301.5641.6111.614
task_311.6181.6641.667
task_321.6711.7171.720
task_331.7241.7701.773
task_341.7771.8231.826
task_351.8301.8761.879
task_361.8841.9301.933
task_371.9371.9831.986
task_381.9912.0362.039
task_392.0432.0892.092

Fibonacci 10 iterations, n=33

This benchmark measures the performance of Airflow when handling a small number of heavyweight tasks. The tasks are Fibonacci calculations with 10 iterations and a base value of 33.

Python

Visualization
Statistics
AirflowWindmillWindmill Dedicated
Total duration (in seconds)54.6688.3477.701
Assignment22.058 (40.35%)0.428 (5.13%)0.370 (4.80%)
Execution28.272 (51.72%)7.832 (93.83%)7.205 (93.56%)
Transition4.338 (7.94%)0.087 (1.04%)0.126 (1.64%)
Timing details
View task timing details
TaskCreated atStarted atCompleted at
task_000.0004.3476.910
task_017.3159.69016.387
task_0216.54518.36120.077
task_0320.13021.78523.487
task_0423.86925.31927.463
task_0528.06129.66532.354
task_0633.21034.99637.498
task_0738.37839.93841.754
task_0842.36643.93345.887
task_0946.28150.17954.668
Windmill Comparison
TaskCreated atStarted atCompleted at
task_000.0000.0020.846
task_010.8580.9061.705
task_021.7151.7612.539
task_032.5482.5953.365
task_043.3753.4214.206
task_054.2154.2635.033
task_065.0425.0895.857
task_075.8665.9136.684
task_086.6936.7407.519
task_097.5297.5798.347
Windmill Dedicated Comparison
TaskCreated atStarted atCompleted at
task_000.0000.0230.745
task_010.7760.7971.518
task_021.5461.5712.292
task_032.2982.3403.057
task_043.0633.1143.845
task_053.8743.8894.608
task_064.6144.6615.380
task_075.3855.4336.151
task_086.1586.2086.925
task_096.9336.9817.701