Question
Is it effective to increase the number of CPU as a way to improve the speed of script processing?
Answer
For normal scripts, one script is executed by one thread, therefore increasing the number of CPU does not improve the script processing speed.
However, if a script is executed by multiple threads, increasing the number of CPU can be expected to improve the processing speed.
For example, the following methods are the case:
PSP scripts
In the case of PSP scripts, reads, conversions, and writes are executed in separate threads.
Thread component
The processes contained in the Thread component are executed in multiple thread.
Multi-Stream Converter
When using Merge, Aggregate, and Sort operations, which are functions of Multi-Stream Converter, the process is executed in parallel by the same number of threads as the number of CPU.
Supplementary information
When you increase the number of threads, "java.lang.OutOfMemoryError: unable to create new native thread" may occur due to the inability to allocate thread space.
Therefore, when increasing the number of threads, please consider increasing the number of threads within the range where the above error does not occur.
If the above error occurs, one way to deal with it is to disable PSP processing and reduce the number of threads created.
Comments
0 comments
Article is closed for comments.