moooonk commented on issue #2302:
URL: https://github.com/apache/fory/issues/2302#issuecomment-3095355646

   hi @fperez-RatedPower. Regarding this issue, I conducted numerous tests and 
can now share some insights. Firstly, based on the flame graph, we can see that 
creating the float array consumed the vast majority of the time during the 
test. Therefore, we have reason to believe that the concurrent performance is 
related to memory allocation.
   
   To simplify the test case, I reduced the deserialization call to simply 
creating a 10K-length float array, without performing any additional 
calculations. Even in such a simple test case, which is unrelated to Fory, we 
still observe similar experimental results: the throughput of creating arrays 
with multiple threads does not reach the theoretical value as the number of 
threads increases.
   
   By adjusting the size of the created array and the number of threads, we can 
readily observe that:
   1.  The smaller the allocated array and the fewer the threads, the closer 
the throughput gets to the theoretical value.
   2.  Once the array size exceeds a certain threshold, using multiple threads 
no longer provides additional throughput benefits.
   
   Additionally, if you decrease the value of the MAX_ARRAY variable in the 
original test case, you will notice that the output results trend closer to the 
theoretical value. This further supports my viewpoint.
   
   Consequently, I believe Fory's current multi-threaded performance is 
reasonable. There exists a theoretical upper limit to a program's memory 
allocation speed, and the speed of multi-threaded memory allocation will not 
exhibit a linear positive correlation with the number of threads.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to