Goodmorning to all,
i've lurked on all forum about some information about multhithread for pol, but i don't have found a complete answer.
Question:
POL100 is multithreading?
escript vm is multihtreading?
thank's for you cooperation
Best Regard
Scripter Debug
Zhi 7^ age
[INFO\CONFIRM] POL100 X64 - multithread
Moderator: POL Developer
Re: [INFO\CONFIRM] POL100 X64 - multithread
Hi DebugZHI,
POL has been default multi-threaded since 2016, and has supported _only_ multi-threaded since 2019. However, the underlying C++ objects in the game themselves do not support multi-threads (eg. changing a Character's name is not thread-safe and cannot be done in two threads). We have thread synchronization to take care of that via a `PolLock` mutex). For example:
POL has been default multi-threaded since 2016, and has supported _only_ multi-threaded since 2019. However, the underlying C++ objects in the game themselves do not support multi-threads (eg. changing a Character's name is not thread-safe and cannot be done in two threads). We have thread synchronization to take care of that via a `PolLock` mutex). For example:
- The single "Scripts Thread" is responsible for stepping through all pending scripts to run. Since scripts modify game objects, their execution is done in a PolLock.
- Each client connection gets its own thread. On receiving a data packet, since this can modify the game world (eg. a 'move item' packet), the packet handler execution is done in a PolLock.
Re: [INFO\CONFIRM] POL100 X64 - multithread
Hi Kevin,
thank's for the answer.
Taking about you information i can deduce that an optimal processor to maximize pol performance, would be:
1- high cpu clock for single thread escript performace (such as npc AI and complex world script)
2- medium core numbers (8/16) for core threading support (ecompile, core, client connection, etc...)
Question:
it can be any correlation between high number of npc spawn (such as 100/120 npc within an area of 10*10 tiles) and high burst of cpu usage that will persist for 1 or more minutes?
that's right?
Best Regards
Scripter Debug
thank's for the answer.
Taking about you information i can deduce that an optimal processor to maximize pol performance, would be:
1- high cpu clock for single thread escript performace (such as npc AI and complex world script)
2- medium core numbers (8/16) for core threading support (ecompile, core, client connection, etc...)
Question:
it can be any correlation between high number of npc spawn (such as 100/120 npc within an area of 10*10 tiles) and high burst of cpu usage that will persist for 1 or more minutes?
that's right?
Best Regards
Scripter Debug
Re: [INFO\CONFIRM] POL100 X64 - multithread
Yes, optimize for single-threaded performance and a few cores. At the moment POL can't effectively use that many cores because the architecture requires a global lock in many common operations. So it doesn't hurt to have more cores, but POL won't use all of them.
Re: [INFO\CONFIRM] POL100 X64 - multithread
hi all,
thanks a lot for your answers, now i've a more clean situation.
Best Regards,
Scripter Debug
thanks a lot for your answers, now i've a more clean situation.
Best Regards,
Scripter Debug