Skip to content

Commit

Permalink
Factor in the rtt scaling when enforcing the max pacing rate
Browse files Browse the repository at this point in the history
Summary: As title.

Differential Revision: D51856503

fbshipit-source-id: ecc4d5e97b3cc6a260cc9d1d5002b68d9c06c407
  • Loading branch information
jbeshay authored and facebook-github-bot committed Dec 7, 2023
1 parent 5a3e948 commit 6b242ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quic/congestion_control/TokenlessPacer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void TokenlessPacer::refreshPacingRate(
}
uint64_t targetRateBytesPerSec = (rtt == 0us)
? std::numeric_limits<uint64_t>::max()
: cwndBytes * 1s / rtt;
: (cwndBytes * 1s * rttFactorDenominator_) / (rtt * rttFactorNumerator_);
if (targetRateBytesPerSec > maxPacingRateBytesPerSec_) {
return setPacingRate(maxPacingRateBytesPerSec_);
} else if (rtt < conn_.transportSettings.pacingTickInterval) {
Expand Down

0 comments on commit 6b242ab

Please sign in to comment.