D-Link Forums

The Graveyard - Products No Longer Supported => Routers / COVR => DIR-857 => Topic started by: Karma on June 29, 2017, 07:46:39 AM

Title: Weird performance issue
Post by: Karma on June 29, 2017, 07:46:39 AM
Hi

I have DIR857 router FW 1.03. I have a multi-threaded application (around 50 threads) which creates around 200 HTTP requests per second. The size of the requests + response is pretty small less than 2kB. When the application runs I see that after around 16300 requests the application does not receive responses. At this point the application resend the requests until responses arrives which a happens after a couple of minutes. When I look into routers status first of all there is no dropped packets. A strange thing I noticed the on active (internet) sessions page. On this page I can see the original TCP/IP address of the request and NAT IP address which the router provides. When the application works OK the high port which was used on my PC is also used by the router. When I reach 16300 requests I see that the router uses port 80 for all 50 concurrent requests. Of course this is what causes the problem. After couple of minutes during which the app resend the non-responded requests the used ports probably back to free state and the router reuses them again. So the app continues to work OK for another 16000 requests.
I do not understand why the router combines requests from different ports into same port. But I really need some ideas how to overcome this? how to make the router free quickly other ports or reuse those ports  of requests which responded. 

Of course If I bypass the router and connect directly to the modem the problem does not appear.  But I do not like that solution.
Title: Re: Weird performance issue
Post by: FurryNutz on June 29, 2017, 08:48:53 AM
Link>Welcome! (http://forums.dlink.com/index.php?topic=48135.0)



Is uPnP enabled? Try it disabled?

There is v1.04.

Is this recently happening or only when you started running this program?
Title: Re: Weird performance issue
Post by: Karma on July 05, 2017, 12:17:31 AM
Hi
I upgraded to 1.04 and uPnP is disabled as before. I'm aware of the issue only since i've started running the app since it has I can see the progress of network requests.
Besides that from daily use of my PC I do not see any other network issues.
Any other Ideas? Is there a possibility that WISH or other QOS mechanisms reserve some of the ports?
Title: Re: Weird performance issue
Post by: FurryNutz on July 05, 2017, 08:48:28 AM
What happens if you have uPnP enabled?

Why is this application designed for this kind of operation? Is this a testing app? Who's the Mfr of this app?
Title: Re: Weird performance issue
Post by: Karma on July 19, 2017, 02:03:23 AM
From the manual:

Time Out
The number of seconds of idle time until the router considers the session terminated. The initial value of Time Out depends on the type and state of the connection.
300 seconds
UDP connections.
240 seconds
Reset or closed TCP connections. The connection does not close instantly so that lingering packets can pass or the connection can be re-established.
7800 seconds
Established or closing TCP connections.

It seems that the router keeps the TCP session for 4 minutes after it is closed and it does not free the allocated port. so when many session created in short time the router has shortage of ports. Is there any way to reduce this timeout ?   
Title: Re: Weird performance issue
Post by: FurryNutz on July 19, 2017, 09:25:03 AM
There isn't. This seems to be an issue between the router and this app.

This is a old generation router which probably had older uPnP code and behaviors. Newer apps and programs like this may have some issues.

Is this a app that can be used by anyone? Is there a link to this app. Maybe someone on here and help you test it out with a different router.
Title: Re: Weird performance issue
Post by: Karma on July 20, 2017, 01:24:09 AM
I have already emailed their support. They are also aware of this issue on some of the routers which maintains timeout after TCP session is closed.
I am thinking about some tweaks that may help. Currently it seems that the app is held after 16300 requests meaning assignment of 16300 ports by the router. Generally, there are 64K possible ports. Are there ports that allocated for wireless / guest zone networks? If I turn off those networks, will I get more ports?
Title: Re: Weird performance issue
Post by: FurryNutz on July 24, 2017, 09:27:14 AM
Is this a app that can be used by anyone? Is there a link to this app. Maybe someone on here and help you test it out with a different router.