• Uncategorized

About android : socket-receive-and-send-are-very-slow-over-TCP

Question Detail

kernel_recvmsg with option MSG_WAITALL is taking long time to receive data. even tried default option with flag 0. Overall throughput is affected with kernel_recvmsg. TCP_NODELAY socket option also set. tried to change all kinds of recv and send buffer options, between client and server but overall throughput is not getting changed.

server: windows 10 PC
client: Android 7.1 linux version 4.4.63

testing in 5 ghz network…

Is there any options left over to try.

timers below added shows that more time is consumed in kernel_recvmsg. even perf tool calls shows more time is consumed in kenrel_recvmsg.

t_usb.rx_rcv_start = ktime_get();

while (total_rcvd < length && total_rcvd >= 0 &&
       !kthread_should_stop()) {

    kvec.iov_base = tcp_recv_buf+data_rcvd;
    kvec.iov_len = length-data_rcvd;
    data_rcvd = kernel_recvmsg(tcp_socket->socket, msg, &kvec,
        1, length - total_rcvd, MSG_WAITALL);


    if (data_rcvd > 0) {
        total_rcvd += data_rcvd;

    } else {
        vfree(tcp_recv_buf);
        return data_rcvd;
    }


}
t_usb.rx_start = t_usb.rx_rcv_end=ktime_get();

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.