is it possible to handle data packets (or just move and interact packet) in another thread? i saw this in MC : PC server and it is good for PVP minigames. e.g. server is laggy but players moving and attacking isn't or just a bit. and only question, each thread can run on another core?
This isn't how threads work. https://mobile.twitter.com/PEMapModder/status/677507257324605444/photo/1
Nope. The problem is, you have to receive and send back the packets from the same thread. As a matter of fact, player movement and PvP does not seem to be a main source of lag. If threads can help you reduce lag, you should be moving laggy things (lag causes) into other threads, not the things affected by lag to another thread, because ultimately you are still restricted by the server ticking rate as packets are only sent with the same frequency as the server tick rate.
I think player movememt is cause of laggs, because php arrays are slow, so if i checks blocks around each player, it is laggy :/ . And it should be moved because in PVP servers it is important to be stable.
That's not very practical. There may be face conditions where the player already left the pressure plate but the pressure plate still triggers. issues There be like may this. unexpected many just Especially plugins do not expect movement to be threaded.