New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 742683 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

DNS resolution on iOS 9 is slow in Cronet

Project Member Reported by ianswett@google.com, Jul 14 2017

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...) iOS 9

What steps will reproduce the problem?
(1) Run an application built on Cronet on iOS 9.
(2) Measure DNS resolution time relative to iOS 10.

What is the expected result?
They have similar performance.

What happens instead?
DNS resolution commonly takes over 400ms on iOS 9.

Please use labels and text to provide additional information.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 

Comment 1 by mef@chromium.org, Jul 14 2017

I've done tests with straight calls to getaddrinfo and I do see some of them taking over 400ms on the same device as was used for Cronet tests. 
It is fairly sporadic though, with most taking under 100ms.

Comment 2 by ianswett@google.com, Jul 14 2017

Cc: kapishnikov@chromium.org
In the logs Andrei gathered, it was very consistent, but possibly it depends upon whether it's in the device's cache?  I'm fairly sure these domain names would not have been in the OS cache.
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 14 2017

Labels: Hotlist-Google

Comment 4 by pkl@chromium.org, Jul 17 2017

Status: Assigned (was: Untriaged)

Comment 5 by ianswett@google.com, Jul 19 2017

One option which may improve performance is to try dns_sd.h instead of getaddrinfo.

https://opensource.apple.com/source/mDNSResponder/mDNSResponder-541/mDNSShared/dns_sd.h

Comment 6 by mef@chromium.org, Jul 20 2017

Looking at dns_sd.h the DNSServiceGetAddrInfo is an interesting function, especially considering that it should provide more details, including ttl, but I could not get it to return anything meaningful neither on the physical device, nor on simulator. :(

Comment 7 by mef@chromium.org, Jul 20 2017

I've added (https://chromium-review.googlesource.com/580398) tests that use NSURLSession with Cronet and platform stack to connect to <random>.googlevideo.com hosts (to avoid cached responses) and results are very comparable.

First run:

Cronet:

[0720/162000.040483:INFO:cronet_http_test.mm(162)] Elapsed Average:54.472ms Max:1067.58ms
[       OK ] HttpTest.NSURLSessionGoogleVideo (13770 ms)

Platform:

[0720/162013.454000:INFO:cronet_http_test.mm(191)] Elapsed Average:52.8421ms Max:1054.17ms
[       OK ] HttpTest.NSURLSessionGoogleVideoPlatform (13405 ms)

Second run:

Cronet:

[0720/162510.340800:INFO:cronet_http_test.mm(160)] Elapsed Average:50.3569ms Max:1053.46ms
[       OK ] HttpTest.NSURLSessionGoogleVideo (12736 ms)

Platform:

[0720/162531.391129:INFO:cronet_http_test.mm(189)] Elapsed Average:83.4414ms Max:4078.59ms
[       OK ] HttpTest.NSURLSessionGoogleVideoPlatform (21045 ms)

DNS response usually takes about 50ms, but sometimes slows all the way down to 1-4 seconds.
There is no significant difference between cronet and platform dns resolution performance.

Comment 8 by ianswett@google.com, Jul 21 2017

Thanks for trying this out Misha.  I followed up with the people who suggested it to see if they have any other ideas.

Comment 9 by mef@chromium.org, Jul 31 2017

Status: WontFix (was: Assigned)
Closing for now. We can reopen it when we have new information.

Sign in to add a comment