xpra icon
Bug tracker and wiki

Opened 13 months ago

Last modified 3 days ago

#2421 assigned enhancement

detect slow send buffer draining pace using TCP_INFO

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 4.1
Component: network Version: 3.0.x
Keywords: Cc:

Description (last modified by Antoine Martin)

See When TCP sockets refuse to die:

An example of checking the draining pace:

while True:
    notsent1 = get_tcp_info(c).tcpi_notsent_bytes
    notsent1_ts = time.time()
    notsent2 = get_tcp_info(c).tcpi_notsent_bytes
    notsent2_ts = time.time()
    pace_in_bytes_per_second = (notsent1 - notsent2) / (notsent2_ts - notsent1_ts)
    if pace_in_bytes_per_second > 12000:
        # pace is above effective rate of 96Kbps, ok!
        # socket is too slow...


See also #2420

Change History (4)

comment:1 Changed 13 months ago by Antoine Martin

Description: modified (diff)
Status: newassigned

comment:2 Changed 12 months ago by Antoine Martin

Summary: detect slow send buffer drainging pace using TCP_INFOdetect slow send buffer draining pace using TCP_INFO

comment:3 Changed 8 months ago by Antoine Martin

Milestone: 4.04.1
Last edited 2 weeks ago by Antoine Martin (previous) (diff)

comment:4 Changed 3 days ago by Antoine Martin

Based on How to get amount of non-ACK-ed TCP data for the socket?, Is it possible to read the number of bytes buffered for a TCP write socket? and socket.py (Wrapper module for _socket, providing some additional facilities): r27690 adds TCP_INFO to xpra info.

See also : Congestion detection by observing socket queues.

Next step: figure out how to detect congestion faster using this new data.

Last edited 3 days ago by Antoine Martin (previous) (diff)
Note: See TracTickets for help on using tickets.