General Minecraft Server Resource Requirements

Hi everyone, I currently have a VPS with 16GB of RAM with 6 cores (16Hz) CPU and i have a Paper server on it with 6-8 GB of ram that has around 10 plugins my problem is when there are 5+ players the server starts to have noticable lag but we dont have any big redstone machine on the server and the plugins are the usual plugins you find on servers (WorldEdit, WorldGuard, Vault, etc)
I have searched for this but i couldnt find a reliable answer so I came here to ask you guys, how much RAM should i allocate for a server like that? I've read that allocating too much RAM can also cause lag due to problems with java garbage collector not being able to handle that much space
I also wanted to run a Fabric server so any knowledge on that matter (again, about how much ram i should allocate for it and if there are any launch options i should consider and/or any config modifications) would be HEAVILY appreciated

Thanks Again everyone
Was this page helpful?