Page MenuHomePhabricator

Force postgresql-airflow-main pods to run on kubernetes workers equipped with a 10G NIC
Closed, ResolvedPublic

Description

As part of the investigation in T412003, we're tracking down why the airflow-main scheduler repeatedly shows an increase in scheduler loop time. We recently caused all kubernetes nodes to rolling reboot, and as a result, these frequent latency peaks have subsided.

image.png (662×333 px, 78 KB)
image.png (992×390 px, 101 KB)

Previously to this reboot, the master postgresqlq pod was located on a Kubernetes node equipped with a 1G NIC, and after the rolling-reboot, it ended up (by chance) on a host equipped with a 10G card.

I believe the root cause is still the one explained in T414953, aka very large XCOMs being stored into and fetched from the database at a large scale, causing peaks of traffic between the scheduler and the database. When the master PG pod runs on a host with a 1G card, that traffic saturates the interface, and causes a peak of latency, probably due to TCP retries. When that pod is on a host equipped with a 10G NIC, then the network does not saturate.

Until we can fix the root cause and have the large XCOMs stored into and fetched from S3 (and/or until all our nodes are equipped with 10G NICs, cf T414787 )we should ensure that postgresql-airflow-main pods run on nodes equipped with 10G NICs, to mitigate the symptoms.

Event Timeline

brouberol triaged this task as Medium priority.
brouberol changed the task status from Open to In Progress.Jan 27 2026, 9:33 AM
brouberol claimed this task.
root@deploy2002:~# kubectl label node dse-k8s-worker1010.eqiad.wmnet dse-k8s-worker1011.eqiad.wmnet dse-k8s-worker1012.eqiad.wmnet dse-k8s-worker1013.eqiad.wmnet dse-k8s-worker1015.eqiad.wmnet dse-k8s-worker1016.eqiad.wmnet dse-k8s-worker1017.eqiad.wmnet dse-k8s-worker1018.eqiad.wmnet dse-k8s-worker1019.eqiad.wmnet capabilities.nic=1G
node/dse-k8s-worker1010.eqiad.wmnet labeled
node/dse-k8s-worker1011.eqiad.wmnet labeled
node/dse-k8s-worker1012.eqiad.wmnet labeled
node/dse-k8s-worker1013.eqiad.wmnet labeled
node/dse-k8s-worker1015.eqiad.wmnet labeled
node/dse-k8s-worker1016.eqiad.wmnet labeled
node/dse-k8s-worker1017.eqiad.wmnet labeled
node/dse-k8s-worker1018.eqiad.wmnet labeled
node/dse-k8s-worker1019.eqiad.wmnet labeled

Using the list of nodes coming from T414787.

root@deploy2002:~# kubectl get node dse-k8s-worker1019.eqiad.wmnet -o json | jq .metadata.labels
{
  "beta.kubernetes.io/arch": "amd64",
  "beta.kubernetes.io/os": "linux",
  "capabilities.nic": "1G",
  "kubernetes.io/arch": "amd64",
  "kubernetes.io/hostname": "dse-k8s-worker1019.eqiad.wmnet",
  "kubernetes.io/os": "linux",
  "node.kubernetes.io/disk-type": "ssd",
  "topology.kubernetes.io/region": "eqiad",
  "topology.kubernetes.io/zone": "row-c"
}

I'll now send a patch to steer the postgresql-airflow-main pods away from these nodes.

Change #1233660 had a related patch set uploaded (by Brouberol; author: Brouberol):

[operations/deployment-charts@master] postgresql-airflow-main: force the pods to avoid nodes with 1G NICs

https://gerrit.wikimedia.org/r/1233660

Change #1233660 merged by Brouberol:

[operations/deployment-charts@master] postgresql-airflow-main: force the pods to avoid nodes with 1G NICs

https://gerrit.wikimedia.org/r/1233660

Change #1233675 had a related patch set uploaded (by Brouberol; author: Brouberol):

[operations/deployment-charts@master] postgresql-airflow-main: (fix) force the pods to avoid nodes with 1G NICs

https://gerrit.wikimedia.org/r/1233675

Change #1233675 merged by Brouberol:

[operations/deployment-charts@master] postgresql-airflow-main: (fix) force the pods to avoid nodes with 1G NICs

https://gerrit.wikimedia.org/r/1233675

I applied the patch, and the pods found thesemlves scheduled on nodes with 10G interfaces (which, by chance, they already were):

brouberol@deploy2002:~$ kubectl get pod -l "cnpg.io/podRole=instance" -o wide
NAME                        READY   STATUS    RESTARTS   AGE   IP             NODE                             NOMINATED NODE   READINESS GATES
postgresql-airflow-main-1   1/1     Running   0          56s   10.67.28.121   dse-k8s-worker1014.eqiad.wmnet   <none>           <none>
postgresql-airflow-main-3   1/1     Running   0          24s   10.67.28.15    dse-k8s-worker1005.eqiad.wmnet   <none>           <none>
root@deploy2002:/srv/deployment-charts/helmfile.d/dse-k8s-services/postgresql-airflow-main# kubectl get node dse-k8s-worker1014.eqiad.wmnet -o json | jq .metadata.labels
{
  "beta.kubernetes.io/arch": "amd64",
  "beta.kubernetes.io/os": "linux",
  "kubernetes.io/arch": "amd64",
  "kubernetes.io/hostname": "dse-k8s-worker1014.eqiad.wmnet",
  "kubernetes.io/os": "linux",
  "node.kubernetes.io/disk-type": "ssd",
  "topology.kubernetes.io/region": "eqiad",
  "topology.kubernetes.io/zone": "row-b"
}
root@deploy2002:/srv/deployment-charts/helmfile.d/dse-k8s-services/postgresql-airflow-main# kubectl get node dse-k8s-worker1005.eqiad.wmnet -o json | jq .metadata.labels
{
  "beta.kubernetes.io/arch": "amd64",
  "beta.kubernetes.io/os": "linux",
  "kubernetes.io/arch": "amd64",
  "kubernetes.io/hostname": "dse-k8s-worker1005.eqiad.wmnet",
  "kubernetes.io/os": "linux",
  "node.kubernetes.io/disk-type": "ssd",
  "topology.kubernetes.io/region": "eqiad",
  "topology.kubernetes.io/zone": "row-e1"
}