Spigot and Paper give parameters that can greatly improve performances. If you server gets lags, you can quickly check if your server is well optimized.

You can quickly check if your Minecraft server configuration is properly optimized. Recommended values aim to provide the best from your server without compromising the gameplay.