I recently opened a local minecraft server to play with my friends. We've been 5-6 people on at the same time (at most).
At the very beginning everything seemed fine, but after maybe the first 3-4 hours of playing the server started lagging a bit. Since then it has gotten worse.
I downloaded a plugin to check TPS and it is always 19.5-20, even though the lag is unbearable. I have allocated 8GB of ram to the server (even though it never uses more than 1) and according to Windows' task manager my CPU is never on more than 50% load.
The type of lag we're experiencing is entities move in a laggy way (practically teleport 2 blocks, pause, then teleport another 2 blocks and so forth). Also when firing arrows from a bow, about 0,5-1 sec passes between when you release the RMB and when the arrow fires. Also when breaking blocks it takes 0,5-1 sec before the block drops.
don't add too much ram if it is not needed if you are using about 1GB ram then make sure you have a Gb free if needed also have you tried using an optimized server jar? but it sounds like you have connection lag is it just you or is everyone having the lag? and are they on external network or internal?
Everyone is having the lag, and I'm hosting on my own computer so I shouldn't have any connection lag. Also as i wrote i have 500Mbit download and upload speed. Not sure what an optimized server jar is. My friends are on an external network.
your internet speed is not always a variable it depends on your network hardware your friend's internet speeds and hardware and the pipeline in-between. an optimized jar would be a server jar that you have compiled like hose, spigot, glowstone etc