xpra icon
Bug tracker and wiki

Opened 16 months ago

Last modified 5 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.2
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()
    ...
    poll.poll(POLL_PERIOD)
    ...
    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!
    else:
        # socket is too slow...

Using TCP_INFO.

See also #2420

Change History (6)

comment:1 Changed 16 months ago by Antoine Martin

Description: modified (diff)
Status: newassigned

comment:2 Changed 15 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 11 months ago by Antoine Martin

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

comment:4 Changed 3 months 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 months ago by Antoine Martin (previous) (diff)

comment:5 Changed 5 days ago by Antoine Martin

See also #3001

comment:6 Changed 5 days ago by Antoine Martin

Milestone: 4.14.2
Note: See TracTickets for help on using tickets.