H3 upload Speed still slow. Three times slower than other browsers.
Categories
(Core :: Networking: HTTP, defect, P1)
Tracking
()
People
(Reporter: andre, Assigned: mail)
References
(Blocks 1 open bug)
Details
(4 keywords, Whiteboard: [necko-triaged])
User Story
user-impact-score:0
Attachments
(4 files, 3 external files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Steps to reproduce:
The upload speed of Firefox is still very slow compared to other browsers out there.
There was an older bug about this, that has been marked as fixed. But I don't see why it has been fixed as the issue still persists: https://bugzilla.mozilla.org/show_bug.cgi?id=1596576
Actual results:
Uploading a file to YouTube for example:
Filesize: 8 GB
Upload takes 8 Minutes to upload via Edge or Chrome.
Upload takes 28 Minutes to upload with Firefox (118 beta 8 and 117).
Tested with upload capacity of 200 Mbit/s. The upload in Chrome and Edge is using the whole capacity for the upload. It is not possible to go faster than 8 minutes. Why does Firefox take so long?
Expected results:
Upload speed of Firefox should not be slower than Edge / Chrome.
Updated•3 years ago
|
Comment 1•3 years ago
•
|
||
Hi, this is likely slow H3 upload speed (Bug 1708868).
We do experiment with a fix (Bug 1851908) and would appreciate help in testing it.
- Make sure you see the preference
network.http.http3.cc_algorithm(Firefox Nightly 119 and onwards) https://www.mozilla.org/en-US/firefox/119.0a1/releasenotes/ - Measure the upload throughput while on the default setting (
1for Cubic). - Modify this preference to
0(indicating newReno). - Restart Firefox and measure the upload throughput again.
(In reply to Manuel Bucher [:manuel] from comment #1)
Hi, this is likely slow H3 upload speed (Bug 1708868).
We do experiment with a fix (Bug 1851908) and would appreciate help in testing it.
- Make sure you see the preference
network.http.http3.cc_algorithm(Firefox Nightly 119 and onwards) https://www.mozilla.org/en-US/firefox/119.0a1/releasenotes/- Measure the upload throughput while on the default setting (
1for Cubic).- Modify this preference to
0(indicating newReno).- Restart Firefox and measure the upload throughput again.
I have downloaded the 119.0a1 nightly build and uploaded with the default setting for network.http.http3.cc_algorith = 1
Upload time for a 5.8 GB file to YouTube estimating at 36 minutes (Same file would be about 6 minutes on Chrome and Edge).
After setting network.http.http3.cc_algorithm = 0 as suggested and restarting the nightly firefox build I uploaded the same file again which was then estimated at 34 minutes... which would mean no change in upload speed at all on my machine.
Comment 3•3 years ago
|
||
Thanks for trying it out so fast. This answer makes this report more interesting. Knowing whether this is h2 or h3 would be good. Can you look into about:networking which http version is used for youtube.com? You can also try to disable h3 by setting network.http.http3.enable to false and see if the upload speed is still slow.
If it is h3, we can probably track it in the other bug. If it is h2, we would need a new one.
Comment 4•3 years ago
|
||
(undoing the accidental title change)
HTTP/3 is used on upload.youtube.com according to about:networking.
It's also worth noting that the initial estimate of about 30 minutes for uploading that file is steadily going up while uploading. This makes Firefox not three but up to 8 times slower that other browsers.
Comment 7•3 years ago
|
||
Okay, lets keep track of this. Andrew is currently working on upload speed performance and will get back if necessary.
I posted on the other bug thread a while ago, but just also posting here that I have the exact same issue. Also I just built a new PC last week, exact same problem - it exists on every Windows machine. I'm on beta not nightly so don't have 119 yet but I'll try the 'cc_algorithm' change when I get 119, but sounds like it may not make a difference based on the above.
But yeah, anytime I have to upload something, I switch to chrome or edge.
Comment 9•3 years ago
|
||
Yes, please do try the network.http.http3.cc_algorithm pref when you have 119.
(Be sure to exit and restart Firefox to ensure that a new connection is made).
We're seeing that it can make a large difference in our tests, which we are now expanding to a nightly experiment.
But it all depends on your network characteristics, so your findings are valuable.
| Reporter | ||
Comment 10•3 years ago
|
||
(In reply to Andrew Creskey [:acreskey] from comment #9)
Yes, please do try the
network.http.http3.cc_algorithmpref when you have 119.
(Be sure to exit and restart Firefox to ensure that a new connection is made).
We're seeing that it can make a large difference in our tests, which we are now expanding to a nightly experiment.
But it all depends on your network characteristics, so your findings are valuable.
As I stated earlier, I have tested that. It does change nothing unfortunately.
Comment 11•3 years ago
|
||
I can trivially reproduce this locally on two different Windows machines. 1GB fiber connection. 4-5x speed difference for me. (50seconds vs 4-5minutes for a 4GB video)
The Performance Impact Calculator has determined this bug's performance impact to be high. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.
Platforms: Windows
Impact on site: Causes noticeable jank
Websites affected: Major
[x] Able to reproduce locally
[x] Multiple reporters
I agree with the triage calculator marking this as High. When uploading large videos this is a significant disruption to your workflow and the type of thing that will make people feel forced to use Chrome.
Comment 12•3 years ago
|
||
The severity field for this bug is set to S3. However, the Performance Impact field flags this bug as having a high impact on the performance.
:edgul, could you consider increasing the severity of this performance-impacting bug? Alternatively, if you think the performance impact is lower than previously assessed, could you request a re-triage from the performance team by setting the Performance Impact flag to ??
For more information, please visit BugBot documentation.
Comment 13•3 years ago
|
||
I'm going to raise this to S2 since it seems like adjusting the cc doesn't change the issue, so it may not be related to Bug 1848840. Noting also that, as mentioned elsewhere in this bug, H3 upload speed work is ongoing
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 14•3 years ago
|
||
Note that this patch only improves the upload performance a bit.
We should ensure the stream's buffer is maximally filled before calling ProcessOutput to create packets.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 15•3 years ago
|
||
Comment 16•3 years ago
|
||
| bugherder | ||
Comment 17•3 years ago
|
||
Updated•3 years ago
|
Comment 18•3 years ago
|
||
Comment 19•3 years ago
|
||
Backed out changeset f5d7c3a00f2b (Bug 1852924) for causing dt failures at mod.rs
Backout: https://hg.mozilla.org/integration/autoland/rev/692f8575939392967f223a9f7514568acc6a2ac7
Failure log: https://treeherder.mozilla.org/logviewer?job_id=435181156&repo=autoland&lineNumber=9239
Comment 20•3 years ago
•
|
||
For anyone interested: The main problems remaining are these two issues tracked in neqo.
Updated•3 years ago
|
Comment 21•3 years ago
|
||
Comment 22•3 years ago
|
||
| bugherder | ||
Comment 23•3 years ago
|
||
Backed out changeset 75ebf5892d17 (Bug 1852924) for frequent fail rate in Bug 1751116
Log: https://treeherder.mozilla.org/logviewer?job_id=435577491&repo=autoland&lineNumber=8951
Backout: https://hg.mozilla.org/integration/autoland/rev/b97795caaddfe442e4e17091b9437a0f216f1622
Comment 24•3 years ago
|
||
Backout merged to central: https://hg.mozilla.org/mozilla-central/rev/b97795caaddfe442e4e17091b9437a0f216f1622
Comment 25•2 years ago
|
||
Comment 26•2 years ago
|
||
| bugherder | ||
Comment 27•2 years ago
•
|
||
We have landed some patches recently to improve the HTTP/3 upload performance.
Could you try to use the latest nightly version and test again?
If the upload speed is still slow, could you try to record a log by visiting about:logging and selecting the logging preset to HTTP/3 upload speed and Logging to a file?
Thanks.
| Reporter | ||
Comment 28•2 years ago
|
||
Tested with 122.0a1 (2023-11-29) as requested.
The result looks very promising. A 4.8 GB File was estimated at 7 Minutes (slightly higher than Google or Edge, who both estimated ~ 5 MInutes).
The upload then took ~ 6 Minutes, which is a huge improvement and very close to Google and Edge who took the estimated 5 Minutes.
I would say Firefox, with these updates, is almost on par with the other browsers, which makes it usable again for me. Thank you very much!
Comment 29•2 years ago
|
||
I see similar results. Not on my normal fast internet as I'm traveling. But I was able to upload a 2.8GB file in 1 minute 15 seconds in Firefox vs 1 minute 5 seconds in Google Chrome. Still a difference, but nowhere near as disabling as it was before. I would consider this issue as it stands resolved.
My recommendation would be to resolve it and remove the leave-open keyword.
Andre, thank you for your active participation in helping resolve this issue!
Comment 30•2 years ago
|
||
I can give this a test on my PC as well a bit later tonight! I have 1000 Fiber and I can test it with a large terabyte upload and let you all know the results compared to chrome/edge!
Comment 31•2 years ago
|
||
I'm not seeing great results on my end. I ended up not having access to a large TB file, but I did upload a 72GB file and here are the results:
Edge: 27 Minutes
FireFox Nightly 122.0a1: 51 minutes
So Firefox is taking almost twice as long. Definitely would not consider this resolved Bas.
Comment 32•2 years ago
|
||
PS - for anyone testing, I would suggest testing with a somewhat large file. Small files (like a couple gb) are harder to tell the difference when they only take a couple minutes. With larger files, the speed/time differences are much more apparent.
Comment 33•2 years ago
|
||
I can attest to taylor's experience. I'm on a 300 mbps connection and the difference is still massive even with a 550 megabyte file, though significantly improved from before:
~550 megabyte file upload to Google Drive:
Edge: 21 seconds
Firefox Nightly 122.0a1: 42 seconds
Firefox 120.0.1: 2 minutes and 43 seconds
Nightly is taking at least twice as long on my PC to upload the same file. The actual upload speeds with Firefox (According to Windows task manager) can start off with nearly ~200 mbps, but that quickly plummets to 100-120 mbps and stays there for most of the upload. Edge reaches 300 mbps instantly and stays there for for the majority of the upload.
Comment 34•2 years ago
|
||
(In reply to TexlGyTrail from comment #33)
I can attest to taylor's experience. I'm on a 300 mbps connection and the difference is still massive even with a 550 megabyte file, though significantly improved from before:
~550 megabyte file upload to Google Drive:
Edge: 21 seconds
Firefox Nightly 122.0a1: 42 seconds
Firefox 120.0.1: 2 minutes and 43 secondsNightly is taking at least twice as long on my PC to upload the same file. The actual upload speeds with Firefox (According to Windows task manager) can start off with nearly ~200 mbps, but that quickly plummets to 100-120 mbps and stays there for most of the upload. Edge reaches 300 mbps instantly and stays there for for the majority of the upload.
Thanks for testing.
Could you use Nightly 122.0a1 and follow the steps in comment #27 to record a log? It would be very useful to analyze the problem with a log.
Comment 35•2 years ago
|
||
Thanks for testing.
Could you use Nightly 122.0a1 and follow the steps in comment #27 to record a log? It would be very useful to analyze the problem with a log.
Here's the moz_log file from uploading that same file to Google drive like before:
https://drive.google.com/file/d/1gbclOYIuffu4IG1IVjIrbEtLdRX4B5Hy/view?usp=sharing
Alternative link just in case:
https://mega.nz/file/tWsW2QSB#6LQgrPHJR6erh8bkLWONVwGn_ItgQc90Xp5FYKeiK08
Comment 36•2 years ago
•
|
||
Thanks for the log. It is really helpful to see the networking condition. This is what I gathered using my log visualizer.
- In this network log all detected packet losses were really lost packets. No spurious retransmission were recorded, so in this network condition RACK wouldn't improve upload speed.
- We do see a time frame of 300ms without sending packets. That is tracked in neqo #1474.
- The second drop in packets is more interesting, because it more than 1s and it fails to recover bytes_in_flight back to the congestion window, but might still be the same bug (neqo #1474). This might be due to other websites/connections affecting h3 upload.
- We don't send packets fast enough, that is tracked in neqo #1483, but neqo #1487 could also be a positive impact with not too much effort.
I think focusing on neqo #1487 first is good, because it is actionable. We saw that in other networking conditions RACK is really helpful, so I would tackle that afterwards. And the other two issues should also be looked at :).
Comment 37•2 years ago
|
||
Moving this bug out of priority queue, remaining work to close the gap with Chrome will be coordinated via project plan.
Updated•2 years ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 38•1 year ago
|
||
Documenting an observation. In the screenshot attached, you can see a qlog, visualized via https://qvis.quictools.info, of an upload of a multi GB file to Google Drive using Firefox Nightly.
Worth noting is the difference in w_max, i.e. the maximum window size, across congestion epochs. While the first couple of epochs (saw tooths) converge around the same w_max, many later epochs reach a w_max significantly below the previous maximum w_max.
Under the assumption that this is not due to competing traffic, it is worth zooming into these epochs that end significantly lower than the highest w_max. Note that this assumption is supported by the fact, that consecutive uploads, using Chromium instead of Firefox, on the same network and machine, did not fluctuate in throughput.
| Assignee | ||
Comment 39•1 year ago
|
||
This screenshot zooms into one of the epochs that end significantly below the highest w_max seen in earlier epochs. What we can see is:
- A significant drop in send-rate (blue) down to 0, thus drop in bytes-in-flight (green).
- Followed by bursts of sents (blue), leading to a quick ramp up of bytes-in-flight (green).
- Accompanied by spikes in latest-rtt (yellow), presumably due to bottleneck buffer filling up.
- Finally ending in a congestion event and thus reduction in congestion-window (purple).
I suspect finding the reason for (1), i.e. the sudden stop in send-rate, followed by (2), i.e. the sudden bursts of sends, might tell us why Firefox's upload throughput is slower than Chromium's.
My next step is to investigate whether our QUIC pacing implementation allows for these bursts to happen. Happy for possible alternative explanations for the events detailed above.
| Assignee | ||
Comment 40•1 year ago
•
|
||
Following-up on the above.
My next step is to investigate whether our QUIC pacing implementation allows for these bursts to happen. Happy for possible alternative explanations for the events detailed above.
The send-bursts above align with our pacing function, i.e. work as expected.
That said, the send-bursts do overwhelm the local UDP send buffer. We oftentimes end up with:
- Calling
conn.conn.process_output, and get anOutput::Datagram(dg). - but then fail to send that datagram via
socket.as_mut().expect("non NSPR IO").send(&dg), where the socket returnsWouldBlock, - thus we drop the datagram before it even enters the network.
(Note that this is not specific to quinn-udp. The same is happening in the NSPR code path.)
My next step is to investigate whether we can poll the socket for readiness before calling conn.process_output and before calling socket.send. Note that we do do this in our neqo-server and neqo-client` implementation.
| Assignee | ||
Comment 41•1 year ago
|
||
neqo_glue first asks the Neqo connection state machine for outbound
UDP datagrams (conn.process_output) and then sends each on a UDP
socket. It does so in a loop. Previously, in case the second step fails
with WOULD_BLOCK, neqo_glue would simply dropp the datagram, relying
on QUIC's retransmit mechanism for the data to be delivered eventually
in consecutive UDP datagrams.
The above "local" packet drops lead to unnecessary congestion window
reductions due to packet loss. This is especially relevant on high
throughput uploads, where neqo_glue might fill the OS UDP socket send
buffer frequently, thus leading to many WOULD_BLOCKs, thus leading to
many datagram drops, thus leading to many congestion control window
reductions. Such scenario is for example detailed in the conversation
below:
https://bugzilla.mozilla.org/show_bug.cgi?id=1852924#c38
With this commit neqo_glue temporarily buffers the datagram on WOULD_BLOCK and
instructs the nsUDPSocket to be polled with PR_POLL_WRITE, i.e. be polled for
being writable. Once writable, neqo_glue is called back and the buffered
datagram is sent, before proceeding as usual.
| Assignee | ||
Comment 42•1 year ago
|
||
Depicted here is yet another 10 GB upload to Google drive, this time using the patch above. The connection saw significantly less congestion events per byte transferred, thus less congestion window reductions and thus higher throughput.
Based on some local testing, this resolves the performance discrepancy towards Chromium. More validation needed.
Still to be investigated are the longer idle times, see https://bugzilla.mozilla.org/show_bug.cgi?id=1852924#c39 enumeration (1), still seen with the patch above in the screenshot here.
Comment 43•1 year ago
|
||
Awesome diagnosis and fix, Max. We should never have treated local stack buffer exhaustion as network congestion.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 44•1 year ago
|
||
Small update: we've also identified an issue where we declare a loss for a 0RTT packet too early, which negatively affects upload performance.
Comment 45•1 year ago
|
||
Comment 46•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Comment 47•1 year ago
|
||
(In reply to Kershaw Chang [:kershaw] from comment #44)
Small update: we've also identified an issue where we declare a loss for a 0RTT packet too early, which negatively affects upload performance.
In addition to D239162 which just landed, we have a patch for the above 0RTT issue pending:
Comment 48•1 year ago
|
||
Does this bug still need to be open? Also, do we want to add a relnote for this?
| Assignee | ||
Comment 49•1 year ago
|
||
Does this bug still need to be open?
I would like to keep it open for the following reasons:
- https://github.com/mozilla/neqo/pull/2492 is not yet in mozilla-central.
- Bug 1852924 is likely still impacting upload performance.
- We don't have enough signal that upload speed is on par with Chrome across all platforms.
Also, do we want to add a relnote for this?
I am not familiar with Mozilla's release notes conventions. Thus will let others decide. That said, given that this is a bug fix only, and given that the original bug is a performance bug with no impact on correctness, I would say "no".
Comment 50•1 year ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #48)
Does this bug still need to be open? Also, do we want to add a relnote for this?
I agree with Max said in comment #49. Let's keep this open and use this as a single place to track the progress.
Thanks.
Comment 51•1 year ago
|
||
Also, do we want to add a relnote for this?
I am not familiar with Mozilla's release notes conventions. Thus will let others decide. That said, given that this is a bug fix only, and given that the original bug is a performance bug with no impact on correctness, I would say "no".
For the release note, I would personally weigh in on the side of yes -- since the fix measurably improves upload performance.
FYI, this is was the release note for the HTTP/2 upload speed fix
https://bugzilla.mozilla.org/show_bug.cgi?id=1596576#c161
And the process in general,
https://wiki.mozilla.org/Release_Management/Release_Notes#How_to_nominate_a_bug_for_release_notes_addition.3F
Max, consider release-noting the patch that integrates the newest neqo?
Or we could wait and release note it with other fixes.
| Assignee | ||
Comment 52•1 year ago
|
||
Thank you for the pointers Andrew.
The two fixes (https://phabricator.services.mozilla.com/D239162 and https://github.com/mozilla/neqo/pull/2492) are not directly related, yet both improve upload performance. Thus I will prepare separate release notes for them. For https://phabricator.services.mozilla.com/D239162, I will add a suggestion right below. For https://github.com/mozilla/neqo/pull/2492 I will add a suggestion on Bug 1959128.
Release management team, feel free to take both, either, or a combination.
Release Note Request (optional, but appreciated)
[Why is this notable]: Improves Firefox HTTP3/QUIC upload performance (on Windows) on high bandwidth connections by ~13%.
[Affects Firefox for Android]: Yes, but we don't have reproducible benchmarks to confirm.
[Suggested wording]: The upload performance of HTTP/3 been significantly improved, particularly on high bandwidth connections.
[Links (documentation, blog post, etc)]: (Depending on how technical release notes should be) one can find more information in the analysis starting at https://bugzilla.mozilla.org/show_bug.cgi?id=1852924#c38.
Comment 54•1 year ago
|
||
Reassigning to Max, who's leading the current work. Thanks for the HTTP/3 upload improvements!
Updated•1 year ago
|
Comment 56•9 months ago
|
||
Spurious congestion event recovery has landed in neqo with release v0.22.0.
That solves upload performance issues for connections that have high packet-reordering. Mechanism and some measurements showing up to 2x upload throughput increase are discussed in the github PR linked above.
While this does of course not solve this issue overall it is an improvement to robustness for a subset of connections. We currently see about ~11% of connections experiencing spurious congestion events in beta that are potentially benefiting from this feature.
Thus updating here for visibility. As far as I'm aware we are using this as a tracking bug for H3 upload performance work now.
Comment 57•9 months ago
|
||
(In reply to Oskar Mansfeld from comment #56)
Spurious congestion event recovery has landed in neqo with release v0.22.0.
That solves upload performance issues for connections that have high packet-reordering. Mechanism and some measurements showing up to 2x upload throughput increase are discussed in the github PR linked above.
While this does of course not solve this issue overall it is an improvement to robustness for a subset of connections. We currently see about ~11% of connections experiencing spurious congestion events in beta that are potentially benefiting from this feature.
Thus updating here for visibility. As far as I'm aware we are using this as a tracking bug for H3 upload performance work now.
Oskar, is this performance improvement in H3 upload speed worth mentioning in our 149 release notes "Fixed" section?
Comment 58•9 months ago
|
||
Weβve been actively working on improving HTTP/3 upload performance over the past year. This includes optimizations such as fast UDP handling and reducing spurious retransmissions.
To better understand the performance gap, we built a benchmarking framework with a simulated network environment to measure upload goodput for both Firefox and Chrome under controlled conditions.
In a 300 Mbps bandwidth / 40 ms RTT scenario:
- Chrome upload goodput: ~190 Mbps
- Firefox upload goodput: ~150 Mbps
These results show that there is still room for improvement, and we will continue working on closing the gap. However, they also indicate that Firefox is not three times slower than Chrome, as originally reported in this bug.
Given this, we propose closing this long-standing bug and filing a new one to track ongoing HTTP/3 upload performance improvements within the benchmarking framework.
Updated•9 months ago
|
Comment 59•9 months ago
•
|
||
(In reply to Pascal Chevrel:pascalc from comment #57)
Oskar, is this performance improvement in H3 upload speed worth mentioning in our 149 release notes "Fixed" section?
Hey Pascal, we talked about this in our team meeting yesterday and are on the fence. This is a pretty technical, low-level change but it does make our HTTP/3 stack more robust for a subset of connections where we previously had poor performance. If you think this fits what we usually put into our release notes then I'd be happy for it to make it in. Nominating below and thanks for calling it out!
Release Note Request (optional, but appreciated)
[Why is this notable]: With Neqo release v0.22.0 that landed in Bug 2010796 we improved HTTP/3 upload performance for connections that see spurious losses, e.g. because of packet-reordering. We see about 11% of connections experiencing some degree of this in desktop telemetry and could see up to 2x upload throughput in local measurements and benchmarks, depending on the severity of packet-reordering. This is a win for upload stability and robustness.
[Affects Firefox for Android]: Yes, but we don't have measurements/data on android.
[Suggested wording]: Increased robustness of HTTP/3 upload performance for unstable network conditions.
[Links (documentation, blog post, etc)]: There is a write-up including graphs, local measurement analysis and benchmarks in this feature's PR description on GitHub for more context.
Comment 60•8 months ago
|
||
I think this is worth mentioning at least for our pre-release notes where our more technical users may be interested in this improvement, thanks. I added this note to our 149 nightly and beta release notes in the Fixed section:
Increased robustness of HTTP/3 upload performance for unstable network conditions.
I am keeping the relnote-firefox? flag set until we include this note in our final 149 release notes, thanks.
Updated•8 months ago
|
Description
•