Skip to content

Default TCP sysctl values are incompatible with DRBD usage #13074

Closed as not planned

Description

@kvaps

Problem

Talos default TCP sysctl values cause issues when running DRBD (used by LINSTOR/Piraeus for replicated storage). Specifically:

  • net.ipv4.tcp_orphan_retries defaults to 0, which causes orphaned TCP connections to accumulate indefinitely. DRBD creates many peer connections between nodes, and under load (node reboots, resync storms) this leads to TCP port exhaustion.
  • Default tcp_fin_timeout (60s) is too long for fast port recycling during DRBD reconnect storms.
  • Default TCP keepalive settings (2h idle) are too slow to detect dead DRBD peers.

We (Cozystack team) have confirmed this on multiple production clusters. The following sysctl overrides resolve the issue:

machine:
  sysctls:
    net.ipv4.tcp_orphan_retries: "3"
    net.ipv4.tcp_fin_timeout: "30"
    net.core.netdev_max_backlog: "5000"
    net.core.netdev_budget: "600"
    net.core.netdev_budget_usecs: "8000"
    net.ipv4.tcp_keepalive_time: "600"
    net.ipv4.tcp_keepalive_intvl: "10"
    net.ipv4.tcp_keepalive_probes: "6"

Question about approach

We'd like to discuss the best way to address this. A few options:

  1. Consider more reasonable defaults in Talos itself — some of these values (especially tcp_orphan_retries=0) seem aggressive for any workload with many TCP connections, not just DRBD.

  2. Update DRBD extension documentation — document that these sysctls are highly recommended when using DRBD, so users know to set them in their machine config.

  3. Apply sysctls automatically as part of the DRBD extension — though this raises the question of how to handle user-provided overrides in machineconfig. Extension-set sysctls that conflict with user-specified values could cause confusion.

What is the preferred approach from the Talos side?

Related: cozystack/cozystack#2332

Activity

  1. smira commented on Apr 4, 2026

    @smira
    Member

    I think documentation might be the best approach, as these are not scoped to DRBD, and might affect other workloads, so should be applied with caution.

  2. github-actions commented on Oct 2, 2026

    @github-actions

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  3. github-actions commented on Oct 7, 2026

    @github-actions

    This issue was closed because it has been stalled for 7 days with no 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

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions