Menu

uftp execution time

2019-01-23
2019-01-23
  • Daven McCalla

    Daven McCalla - 2019-01-23

    I have an application that needs to send files to 1-10 clients. The file sizes can vary from a few bytes to 80MB.

    When I send a small file:
    uftp -I wlan1 -b 2100 -Q 34 -H 0xC0A8045A,0xC0A80443 /mnt/sram/printbuf1

    uftp reports impressive completion times:

    Transfer status:
    Host: 0xC0A8045A Status: Completed time: 0.041 seconds
    Host: 0xC0A80443 Status: Completed time: 0.044 seconds
    Total elapsed time: 0.044 seconds

    However, when I measure the total execution time in the program that calls uftp it reports 351ms:

    struct timeval start;
    gettimeofday(&start, NULL);
    system("uftp -I wlan1 -b 2100 -Q 34 -H 0xC0A8045A,0xC0A80443 /mnt/sram/printbuf1");
    struct timeval now;
    gettimeofday(&now, NULL);
    unsigned long ms = (((now.tv_sec - start.tv_sec) * 1000000) + (now.tv_usec - start.tv_usec))/1000;
    printf("uftp time = %d ms\n", ms);

    There appears to be around 300ms overhead for a 50ms file transfer. Are there additional command line options that will help reduce the total execution time of uftp?

    Regards,
    Daven

     
  • Dennis Bush

    Dennis Bush - 2019-01-23

    Daven,

    The given elapsed time is for the main transfer phase of the session when actual data packets are being sent. It does not include the overhead of initiating the session.

    One thing you could do is set an initial estimate of the round trip time in seconds using the -r option. It defaults to 0.5, but you can set it as low as 0.001. That can shorten the announcement phase, but don't set it too low otherwise small delays could result in the session being dropped.

    Regards,
    Dennis

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.