Link to home
Start Free TrialLog in
Avatar of Reade Taylor
Reade Taylor

asked on

TCP Time Wait - Higher on Ubuntu 18

I have been running Ubuntu 14 with custom tcp tuning parameters for a couple years.  I applied, via puppet, all of the same tuning parameters, but on Ubuntu 18, my TCP Time Wait is very high.  What is the best method of finding the source of this high TCP Time Wait?  The process that is using the tcp connections is a java application.

Please let me know any other information I should provide.

Graph on the left is Ubuntu 18.04, right is Ubuntu 14.04

Thank you,

Reade
tcp-time-wait.png
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Reade Taylor
Reade Taylor

ASKER

Hi.  Thanks for your response.  The developer is reviewing to confirm.  In Ubuntu 14.04, the pre 4.12 kernel supported net.ipv4.tcp_tw_recycle, which was handling this differently than it is handled now.  So it appears to me that the TIME_WAIT sockets are piling up, but eventually closed due to the 60s timeout.

Reade
You're welcome!

The TCP subsystem at Kernel 3.18 had around 30% of code rewritten. By the time Kernel-4.20 released, this amount likely is approaching 60% or more

There are 2x general ways to fix this problem.

1) Bandage over the problem using Kernel tunings. This approach will always fail again in the future, either from normal traffic increases or Kernel code rewrites.

2) Fix code causing problem. This approach... well... actually fixes the problem, so there's no reason to play games with Kernel tuning.