Affects Version/s: Minecraft 1.13, Minecraft 1.13.2, Minecraft 19w12b, 1.15.1, 1.16.1
Fix Version/s: None
Environment:The environment this was noticed in was a private 1.13 server.
Running on Windows 10 x64, java version 1.8.0_172.
Server is running with 3GB of memory from a batch file.
EDIT December 26, 2019:
I found the issue of the server problems: the culprit was the server GUI, I tested this by loading up my old world I had issues with and still had the spike problems. I edited my custom bat file that allocates 4GB of memory now and a few other stuff to let my out-of-country friends play latency free on my home hosted server. By changing the file to tell it to run the 'nogui' part, the server latency spikes stopped completely as my friends said their connections were no longer laggy by any means. Using the Tab key showed their icons all as 4 or 5 bars on my end (instead of the old 0 to 3 bars) so I believe the entire issue was just having the server GUI running when the modded server was running and had at least 1 player in.
TL;DR: use the 'nogui' command in your bat file for the server.
END OF EDIT;
When starting the server jar, and no one is logged into the server, the server runs at a constant ~20-30% memory usage. *see serverGraph1.png
When someone logs into the server, the memory steadily rises and then plummets only to repeat the cycle forever. The nature of this causes in-game lag/latency as the server reaches high memory usage. *see serverGraph2.png
The nature of the spikes cause server-client issues. Players sometimes look like they aren't moving but then teleport to where they were moving all along. Sometimes players are kicked for this as the server catches up and see the player movement and calls it flying. Entities are not properly translated from the client or server through normal means when the spikes are at their highest. Blocks are delayed when destroyed (still exist for a moment and then vanish and drop the item they drop).
Also, at the start of this, the server will throw 5 warnings of ambiguity between the various teleport commands. The memory usage here at the start also looks different from past versions. Not sure if this is expected or not but see serverOutput1.png
Start of server throws teleport ambiguity warnings.
Server runs fine at a constant memory usage until someone logs on.
When 1+ people are logged on (via localhost, LAN, or outside connection), memory spikes begin to start.
Server spikes stop when all players leave the server.