First of all, i have 4 core with idk too, but still usable, 6GB of RAM, 20gb of SSD. Its a VPS with good network connection. I need a technique or a solution to proceed multiple actions: set skin, items, teleport, send custom packets, set variable... All in 1 command with as high TPS as possible. It's 1 player per turn in 1 second, with all the actions above. And it still drag my TPS down to < 1 just "a" moment. (2 second) I've tried to delay the time between 2 commands (the same command with multiple action), but it just drag my TPS down. My server is running at 30% CPU in normal. (Still handle multiple actions but not the same time). This is a minigame. I'm very appreciate with your experience of reducing lag. I want to know the secret of large servers on handling this.
However if i wanna teleport someone to somewhere, i could directly teleport them rather than go plant AsyncTask. The same thing as the set variables. These tasks is on the main thread so you can't just use AsyncTask for something simple like this, compare to get the huge data from the website.