zlacker

[parent] [thread] 22 comments
1. bayind+(OP)[view] [source] 2023-07-18 12:54:12
Chrome's most of the snappiness is coming from how it handles the DNS queries internally from my experience.

Pair Firefox with a fast DNS, and it's noticably faster than Chrome, for the last 3 years or so.

I discovered it accidentally, after switching to local DNS at the office. We run one of the nation-wide ones in a pretty close proximity in network terms.

replies(2): >>EVa5I7+B >>zelphi+53
2. EVa5I7+B[view] [source] 2023-07-18 12:57:23
>>bayind+(OP)
which is a fast DNS? 1.1.1.1 ? I thought the OS caches DNS anyway, so shouldn't matter much in day to day browsing.
replies(3): >>bayind+U >>5e92cb+O2 >>akino_+tH
◧◩
3. bayind+U[view] [source] [discussion] 2023-07-18 12:59:37
>>EVa5I7+B
Anything you can "time nslookup" in or under 0.03 seconds (in "real" terms).

From my desk:

    local one - 0.029 seconds
    1.1.1.1 - 0.035 seconds
    8.8.8.8 - 0.120 seconds
Normally it should be, but Firefox's behavior is very sensitive to DNS response speed. Sounds not intuitive, but I think they're not using glibc's caching, or doing something by themselves.
replies(4): >>aidenn+mc >>EVa5I7+Yd >>jraph+qg >>elisha+ER1
◧◩
4. 5e92cb+O2[view] [source] [discussion] 2023-07-18 13:10:36
>>EVa5I7+B
Depends on your region and what sites you're using. I live in the middle of nowhere far from civilization, and 1.1.1.1 returns terrible IPs for many sites including google.com (which pings at 350-400 ms if you resolve it through 1.1.1.1, but at 90-100 ms if you're using any other resolver). They do it because they block EDNS0 in order to protect your privacy or something like that.

So I use 8.8.8.8 and 9.9.9.9 in parallel through dnsmasq. Whoever responds the first wins. If you're not stuck in the middle of nowhere, you're probably better off with the latter as it's somewhat more trustworthy than Google.

https://quad9.net/

replies(2): >>bayind+43 >>itsTyr+v4
◧◩◪
5. bayind+43[view] [source] [discussion] 2023-07-18 13:11:51
>>5e92cb+O2
Isn't enabling "query all DNS servers in parallel" discouraged in DNSMasq?

Instead I increase the directory size to 4K and be done with it.

replies(1): >>5e92cb+j4
6. zelphi+53[view] [source] 2023-07-18 13:11:53
>>bayind+(OP)
I recently noticed something similar, when I had to enable DoH (unfortunately Cloudflare — good that this thing lives in a separate browser profile) to reach atlassian websites. Suddenly the pages loaded faster than without DoH. Still not sure what changed on my system (nothing?) or what my ISP did so that I could no longer resolve those websites, but at least DoH solved the problem for me.
◧◩◪◨
7. 5e92cb+j4[view] [source] [discussion] 2023-07-18 13:17:29
>>bayind+43
Maybe. I don't recommend it for the typical user of this site (probably could have phrased that one better — I believe `EVa5I7bHFq9mnYK` should use 9.9.9.9 instead of Google or Cloudflare, not that they should implement my parallel bullshit).

It makes sense here because of bad peering: 8.8.8.8 may be responding in 90 ms right now, but could very well start taking 200 ms a few hours later. So I use multiple services as a backup of sorts.

◧◩◪
8. itsTyr+v4[view] [source] [discussion] 2023-07-18 13:18:18
>>5e92cb+O2
> fast DNS

> recommends quad9

huh?

◧◩◪
9. aidenn+mc[view] [source] [discussion] 2023-07-18 13:48:58
>>bayind+U
In the past, at least, firefox has done its own caching since expiring my OS dns cache was insufficient to get it to pick up a change in DNS.
replies(1): >>CmdrKr+Xr
◧◩◪
10. EVa5I7+Yd[view] [source] [discussion] 2023-07-18 13:54:20
>>bayind+U
Tried it on a few sites, yeah, 8.8.8.8 consistently returns slower.
◧◩◪
11. jraph+qg[view] [source] [discussion] 2023-07-18 14:02:56
>>bayind+U
Curious, where does this number comes from? (0.03 seconds)
replies(1): >>bayind+yh
◧◩◪◨
12. bayind+yh[view] [source] [discussion] 2023-07-18 14:06:29
>>jraph+qg
Nothing special. Just that if I have a DNS resolving around that timeframe, Firefox becomes noticeably faster.

All of the networks I have have a DNS server around that speed now, and Firefox works visibly faster on all of them. Possibly an intersection between human perception and hardware capabilities of my systems at hand.

◧◩◪◨
13. CmdrKr+Xr[view] [source] [discussion] 2023-07-18 14:39:33
>>aidenn+mc
Good reason to avoid Firefox for development imo. Nothing is more annoying than mysterious cache interventions when you're trying to get a handle on an unrelated problem.
replies(1): >>bayind+iI
◧◩
14. akino_+tH[view] [source] [discussion] 2023-07-18 15:30:19
>>EVa5I7+B
Find out for yourself using https://www.grc.com/dns/benchmark.htm
replies(1): >>EVa5I7+Nt1
◧◩◪◨⬒
15. bayind+iI[view] [source] [discussion] 2023-07-18 15:32:51
>>CmdrKr+Xr
Dev tools automatically disables caching for that tab, by default.

CTRL+SHIFT+R always disables cache for that reload, too.

replies(2): >>aidenn+ET >>CmdrKr+BD1
◧◩◪◨⬒⬓
16. aidenn+ET[view] [source] [discussion] 2023-07-18 16:13:41
>>bayind+iI
I didn't know about devtools doing that; C-S R is what I use when I run into it.
replies(1): >>bayind+y71
◧◩◪◨⬒⬓⬔
17. bayind+y71[view] [source] [discussion] 2023-07-18 17:01:44
>>aidenn+ET
On the Dev Tools’ network tab, there should be a checkbox about it on the top left.
◧◩◪
18. EVa5I7+Nt1[view] [source] [discussion] 2023-07-18 18:24:45
>>akino_+tH
Not downloading a random exe to my computer, sorry)

And by random I mean downloaded from a website of corporation with less than $100B valuation :)

replies(1): >>akino_+LI4
◧◩◪◨⬒⬓
19. CmdrKr+BD1[view] [source] [discussion] 2023-07-18 19:07:15
>>bayind+iI
In the dev tools settings there is a checkbox "Disable HTTP Cache (when toolbox is open)" which name seems to imply that this only applies to the resources that make up the page, not to DNS lookups (about:config name is devtools.cache.disabled, and it defaults to false).

I investigated and found that Firefox's in-memory DNS cache can be manually cleared by clicking a button in about:networking. To be fair Chrome also has a similar cache and method for clearing it. See: https://www.makeuseof.com/chrome-edge-firefox-safari-opera-b...

◧◩◪
20. elisha+ER1[view] [source] [discussion] 2023-07-18 20:22:36
>>bayind+U
> "time nslookup"

Or as a slightly more thorough approach, you can use something like namebench or dnsbench:

https://code.google.com/archive/p/namebench

https://github.com/askmediagroup/dnsbench

replies(1): >>bayind+HS1
◧◩◪◨
21. bayind+HS1[view] [source] [discussion] 2023-07-18 20:27:39
>>elisha+ER1
Yeah, while it's not as thorough as these tools, the method is at least reproducible and sane, and with ~10 or so samples, you get an interval with a nice confidence.

Another through method will be hyperfine[0], yet I wanted to provide a method which requires no installation and can be done in a whim, without jumps and hoops, with the tools already at hand.

[0]: https://github.com/sharkdp/hyperfine

◧◩◪◨
22. akino_+LI4[view] [source] [discussion] 2023-07-19 16:56:36
>>EVa5I7+Nt1
Then you might find namebench appealing: https://code.google.com/archive/p/namebench/
replies(1): >>EVa5I7+aK6
◧◩◪◨⬒
23. EVa5I7+aK6[view] [source] [discussion] 2023-07-20 06:01:54
>>akino_+LI4
thanks! I better hurry before ChatGpt brings GOOG under the $100B mark)
[go to top]