Skip to content

Performance Issues on Initial Page Load #38776

Description

@vchiapaikeo

Apache Airflow version

Other Airflow 2 version (please specify below)

If "Other Airflow 2 version" selected, which one?

2.7.3

What happened?

We have started to notice more slowness on initial page load. On our deployment, it takes nearly 6s for the server to respond.

image

We started to do some analysis of the queries that are being run and we found 3 that take over 1400ms (and likely are being run serially).

  1. Getting running dags -1.4s
  2. Getting failed dags - 1.8s
  3. Populating the dags and data in the html table itself (which defaults to 25 and we've set to 100 but we don't see much improvement when we lower it - only 500ms at most) - 1.6s
image

All of these queries are attached in the following txt file with explain plans and explain analyzes:

slow_queries_on_initial_load.txt

What you think should happen instead?

We are wondering if there are any ways we could possibly improve the performance of initial page load. Some ideas that come to mind:

  1. Caching with short ttls that are invalidated intelligently
  2. Improved indexing strategies
  3. Concurrent/async query execution
  4. Your idea here!

How to reproduce

Add ~2-4k dags to an Airflow deployment and reload the initial page

Operating System

Debian 11

Versions of Apache Airflow Providers

N/A

Deployment

Official Apache Airflow Helm Chart

Deployment details

We deploy our cluster on GCP's GKE

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions