xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Opened 20 months ago

Last modified 3 months 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 (7)

comment:1 Changed 20 months ago by Antoine Martin

Description: modified (diff)
Status: newassigned

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

Milestone: 4.04.1
Last edited 5 months ago by Antoine Martin (previous) (diff)

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

comment:5 Changed 4 months ago by Antoine Martin

See also #3001

comment:6 Changed 4 months ago by Antoine Martin

Milestone: 4.14.2

comment:7 Changed 3 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2421

Note: See TracTickets for help on using tickets.