|
From: | Dave Nadler |
Subject: | Re: [lwip-users] Throughput benchmark question - nasty pauses |
Date: | Thu, 28 Feb 2019 11:42:17 -0500 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
I naively expected that after receiving
the" duplicate ack" signalling a packet dropped,
LwIP would immediately re-transmit the dropped packet. Instead there is a 1.5 second pause (see Wireshark trace below). Why is that? Sorry if that's a dumb question; I'm a newbie with this... Thanks,
Best Regards, Dave
PS: Might this be related to the pauses
seen by UAZ ?
I'm also using FreeRTOS but with preemption enabled (unlike UAZ). Test application uses sockets interface as follows: const int testCnt = 1000;
const int linesPerCycle = 3; static const TickType_t xDelay = 1 / portTICK_PERIOD_MS; /* Block for xx ms. */ static char testData[] = "xxx123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456\n\r"; char saveMe = testData[4]; TickType_t startTick = xTaskGetTickCount(); uint32_t elapsedTicks; for(int i=0; i<testCnt; i++) { sprintf(testData,"%03d", i); testData[4] = saveMe; // replace terminating 0 written by sprintf for(int j=0; j<linesPerCycle; j++) _send(user->socketFD, testData, sizeof(testData)); // Delay to simulate desired throughput, but try not to fall behind... elapsedTicks = xTaskGetTickCount()-startTick; if(elapsedTicks > i+1) continue; // skip delay if we've got behind vTaskDelay( xDelay ); // may delay for a lot longer than requested, for example delayed by processing in LwIP thread... }; char buf[96]; sprintf(buf,"Elapsed ticks=%lu for %d lines (%f msec per line, using %d-line sets)\n\r", elapsedTicks, linesPerCycle*testCnt, ((float)elapsedTicks)/(linesPerCycle*testCnt), linesPerCycle); _send(user->socketFD, buf, strlen(buf)); return; On 2/26/2019 6:45 PM, Dave Nadler
wrote:
-- Dave Nadler, USA East Coast voice (978) 263-0097, address@hidden, Skype Dave.Nadler1 |
[Prev in Thread] | Current Thread | [Next in Thread] |