Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad behavior when using congestion control #141

Open
nullchinchilla opened this issue Sep 14, 2019 · 3 comments
Open

Bad behavior when using congestion control #141

nullchinchilla opened this issue Sep 14, 2019 · 3 comments

Comments

@nullchinchilla
Copy link

When using congestion control, packets continued to be queued up far past the congestion window, all the way to the send window. This cause extreme bufferbloat when congestion control is enabled.

Pull request #140 fixes this issue.

@xtaci
Copy link
Owner

xtaci commented Sep 14, 2019

it's non-trivial, changes should consider corresponding notification scheme

if s.kcp.WaitSnd() < waitsnd 

@nullchinchilla
Copy link
Author

// kcp update, returns interval for next calling
func (s *UDPSession) update() (interval time.Duration) {
	s.mu.Lock()
	waitsnd := s.kcp.WaitSnd()
	interval = time.Duration(s.kcp.flush(false)) * time.Millisecond
	if s.kcp.WaitSnd() < waitsnd {
		s.notifyWriteEvent()
	}
	s.uncork()
	s.mu.Unlock()
	return
}

I'm not really sure how this works. When can s.kcp.WaitSnd() < waitsnd { given the waitsnd := s.kcp.WaitSnd() above? 可以用中文回覆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants