DNS resolution on iOS 9 is slow in Cronet |
|||||
Issue descriptionChrome 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.
,
Jul 14 2017
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.
,
Jul 14 2017
,
Jul 17 2017
,
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
,
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. :(
,
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.
,
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.
,
Jul 31 2017
Closing for now. We can reopen it when we have new information. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by mef@chromium.org
, Jul 14 2017