#10376 closed enhancement (wontfix)
pptp performs suboptimally with TCP
Reported by: | anonymous | Owned by: | developers |
---|---|---|---|
Priority: | low | Milestone: | Barrier Breaker 14.07 |
Component: | packages | Version: | Trunk |
Keywords: | pptp gre | Cc: |
Description
Modern TCP is designed to send an ACK after every other packet.
This PPTP implementation is designed to wait half a second before sending an ACK-only packet for a single packet, or to send an ACK-only packet immediately upon the receipt of a second unacknowledged packet.
These two operations combine to nullify each other under normal TCP traffic. The reason is that upon the receipt of the second packet, a GRE ACK-only packet is sent. This is immediately followed by the TCP ACK packet.
An ideal implementation would do one of these three:
1) Modify line 143 of pptp_gre.c to set the sleep time (block_usecs) from 1 microsecond to 10000 microseconds. This allows enough time for the the TCP ACK to arrive, so that both ACKs may ride on the same packet. This solution may have a problem if packets arrive more often than every 10ms, and an outgoing packet is never produced. This may happen with a uni-directional protocol, or in the event of a network malfunction.
2) Modify the code to only send an instant GRE ACK once there are FOUR unacknowledged ACKs. (I choose the number four, and not three, because of the possibility that the 2nd and 3rd packets may arrive simultaneously, and before the TCP ACK can be generated, thus encountering the same problem. This might be over-cautious.) Watch for wrap-around issues.
3) Modify the code more significantly, so that a timer is reset every time a GRE ACK is sent, rather than resetting the timer each time through the dispatch loop in pptp_gre_copy(). If the timer expires with unacknowledged packets, send an ACK-only packet.
I have implemented #1 across a number of devices, and seen no side-effect yet, while seeing a dramatic reduction in ACK-only packets.
Attachments (0)
Change History (3)
comment:1 Changed 6 years ago by jow
comment:2 Changed 6 years ago by jow
- Resolution set to wontfix
- Status changed from new to closed
Kernel mode pptp added in r32197, further optimization work should be directed upstream.
comment:3 Changed 4 years ago by jow
- Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07
Milestone Attitude Adjustment 12.09 deleted
Wouldn't this be better reported upstream to kernel.org and/or the pptp client project?