AmandeepSingh285 opened a new pull request, #3523:
URL: https://github.com/apache/celeborn/pull/3523

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     - Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX] 
Your PR title ...'.
     - Be sure to keep the PR description updated to reflect all changes.
     - Please write your PR title to summarize what this PR proposes.
     - If possible, provide a concise example to reproduce the issue for a 
faster review.
   -->
   
   ### What changes were proposed in this pull request?
   
   Updated celeborn load aware slot allocation algorithm. Current 
implementation does not take into account cases when less number of disks are 
present in a group and this results in higher number of slots allocated to 
those disks. 
   
   `int groupSizeSize = (int) Math.ceil(usableDisks.size() / (double) 
diskGroupCount);
   for (int i = 0; i < diskGroupCount; i++) {
         List<DiskInfo> diskList = new ArrayList<>();
         if (startIndex >= usableDisks.size()) {
           continue;
         }
         if (startIndex + groupSizeSize <= diskCount) {
           diskList.addAll(usableDisks.subList(startIndex, startIndex + 
groupSizeSize));
           startIndex += groupSizeSize;
         } else {
           diskList.addAll(usableDisks.subList(startIndex, usableDisks.size()));
           startIndex = usableDisks.size();
         }
         diskGroups.add(diskList);
       }`
   
   Due to the above disk placement strategy, it is possible that the number of 
disks in the slowest group is less than the number of disks in the faster 
groups. This could result in per disk more number of slots allocated to the 
slower disks compared to the faster disks. 
   
   ### Why are the changes needed?
   
   Improves allocation in load aware algorithm by taking into account number of 
disks per group. 
   Test - 
   Number of disk groups - 5
   Disk group gradient - 0.1
   Weight for average flush time - 1
   Weight for average fetch time - 1
   Number of celeborn workers in cluster - 9
   
   Current implementation:
   
   currentAllocationRatio = [0.2398, 0.2179, 0.1982, 0.1802, 0.1637]
   Job Output 5000 partitions
   SlotAllocation per group = [1199, 1090, 991, 901, 819]
   Number of workers per group = [2, 2, 2, 2, 1]
   
   Number of slots allocated per worker = [600, 545, 496, 451, 819]
   Highest number of slots allocated to the slowest worker
   
   Proposed implementation
   Setting celeborn.master.slot.assign.loadAware.diskCountWeight to 1
   
   currentAllocationRatio = [0.2612, 0.2373, 0.2159, 0.1963, 0.0891]
   Job Output 5000 partitions
   Slots allocated per group = [1306, 1187, 1079, 982, 446]
   Number of slots per worker = [653, 594, 540, 491, 446] 
   
   Least number of slots allocated to the slowest worker
   
   ### Does this PR resolve a correctness bug?
   
   <!-- Yes/No. (Note: If yes, committer will add `correctness` label to 
current pull request). -->
   
   ### Does this PR introduce _any_ user-facing change?
   
   No
   
   ### How was this patch tested?
   
   Tested in staging setup


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

Reply via email to