0
I have a question about how to reduce delay for packets sent using a USB WiFi adapter, ALFA AWUS 036ACH.
I installed this driver (rtl8812au, version 5.2.20) for my USB WiFi adapter, ALFA AWUS 036ACH which uses chipset rtl8812au. I installed the driver for Ubuntu 16.04. The kernel version is 4.15.0. With the driver, the USB adapter can send and receive packets. However, the driver causes a 80 ms delay for packets sent. After I do a calculation, I think there is a buffer of about 200k bytes in the driver. But I didn’t find it. Do anyone have any idea about the buffer causing the 80 ms delay? Where is the buffer? How can reduce the size of the buffer. Thanks.
"A Driver Buffer Causes a 80 ms Delay ..." -- How did you derive this delay number? How do you know that a buffer "causes" a delay? Since this is a USB device there will be many buffers involved, yet you insist that there is just one buffer that is the root cause of a "delay". – sawdust – 2019-06-08T22:43:18.393
The delay is measured in this way. Record time at which a packet is inserted to the send socket buffer in a sender and time at which the packet is received by a receiver. Time difference (delay) is 80 ms. I know this delay is caused by a buffer because the delay is keeping increasing from about 0.5 ms to 80 ms and then stop at 80 ms when sending packets. Based on this observation, there should be a buffer between the sender and receiver. You are right, there are many buffers involved. There may not be just one buffer causing the delay. However, I need to limit the delay to a minimal number. – Y. Zhong – 2019-06-09T16:23:36.603
Your "delay" time seems to actually be a *transmit+receive* time, because it includes the time to send the message packet. It also requires synchronized clocks. "I know this delay is caused by a buffer because ..." -- IMO what you "know" is wrong. Your crude scheme to measure "delay" is heavily subject to the variations of userspace scheduling (on *both* sides of the link). – sawdust – 2019-06-10T01:07:02.573