a1vin-tian commented on pull request #7153:
URL: https://github.com/apache/skywalking/pull/7153#issuecomment-866574790


   1. The worst case of this change is that the executed `prepare requests` 
concurrently and then call `batchDAO.synchronous.` But it is also faster than 
before because prepare requests are executed concurrently.
               2. The reason for accumulating a batch of requests is because of 
the following reasons:
                   1. There will be no small fragments requesting to write to 
the storage, reducing the pressure of the storage and improving the write 
performance
                   2. In ES, call each `batchDAO.synchronous` takes at least 10 
seconds to cause even if one piece of data is submitted, what will wait 10 
seconds. Therefore, it is important to increase the number of each request and 
reduce the number of requests, Can reduce all time.
               
               For example: 
               At `batchDAO.synchronous` stage. 
               `maxSyncoperationNum` = 50000
   
               Suppose there are 210100 requests.
                       waited:
                       thread 1: [50000,50000,5050] 3time
                       thread 2: [50000,50000,5050] 3time
               
                       not waited:
                       thread 1: [1000,50000,50000,4050] 4 times
                       thread 2: [1000,50000,50000,4050] 4 times
               
               Suppose there are 45000 requests.
                       waited:
                       thread 1: [45000] 1 time
                       thread 2: [45000] 1 time
               
                       not wait:
                       thread 1: [1000,44000] 2 times
                       thread 2: [1000,44000] 2 times


-- 
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.

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


Reply via email to