bulky-portugal-95315
01/13/2023, 9:07 PMancient-application-36103
01/13/2023, 9:26 PMancient-application-36103
01/13/2023, 9:26 PMbulky-portugal-95315
01/13/2023, 9:27 PMbulky-portugal-95315
01/13/2023, 9:28 PMancient-application-36103
01/13/2023, 9:29 PMbulky-portugal-95315
01/13/2023, 9:30 PMbulky-portugal-95315
01/13/2023, 9:32 PMbulky-portugal-95315
01/13/2023, 9:53 PMcurved-island-17262
01/14/2023, 1:51 AMlocals {
instance_classes = {
staging = {
GENERAL_PURPOSE = ["m6a.large", "m6a.xlarge", "m6a.2xlarge", "m6a.4xlarge"]
CPU_OPTIMIZED = ["c6a.large", "c6a.xlarge", "c6a.2xlarge", "c6a.4xlarge"]
MEM_OPTIMIZED = ["r6a.large", "r6a.xlarge", "r6a.2xlarge", "r6a.4xlarge"]
GPU_OPTIMIZED = ["p3.2xlarge"]
}
production = {
GENERAL_PURPOSE = ["m6a.large", "m6a.xlarge", "m6a.2xlarge", "m6a.4xlarge"]
CPU_OPTIMIZED = ["c6a.large", "c6a.xlarge", "c6a.2xlarge", "c6a.4xlarge"]
MEM_OPTIMIZED = ["r6a.large", "r6a.xlarge", "r6a.2xlarge", "r6a.4xlarge"]
GPU_OPTIMIZED = ["p3.2xlarge"]
}
}
}
For most of my ML workflows, we just need the MEM_OPTIMIZED instance classes(we barely use GPUs’s so the instance above may not be the best to use), the biggest instance class here allows for 128GB RAM if I am not mistaken.
With these instances, you also need to ensure that the workflows utilize an optimal ratio of MEMORY/COMPUTE for optimal performance. For example, with the MEMORY_OPTIMIZED instances you should maintain a ratio of 8.
In terms of structuring the type of optimized instance classes, I would recommend you have an optimized instance class per AWS Batch Job Queue, i.e., for the MEMORY_OPTIMIZED instance classes they should run on a single AWS Batch Job Queue. If you mix MEMORY_OPTIMIZED and GPU_OPTIMIZED in the same AWS Batch Job Queue it could be the case where for non-GPU tasks it would result in the usage of GPU_OPTIMIZED(special thanks to @fresh-laptop-72652 for telling me about this issue).bulky-portugal-95315
01/14/2023, 11:35 PMcurved-island-17262
01/15/2023, 12:23 AMcurved-island-17262
01/15/2023, 12:30 AMuser
01/16/2023, 5:10 AMcalm-smartphone-49719
01/16/2023, 5:24 AMplain-baker-2104
01/16/2023, 2:50 PMresources decorator can be fed with a function call)plain-baker-2104
01/16/2023, 2:55 PMbulky-portugal-95315
01/17/2023, 3:24 PMBEST_FIT_PROGRESSIVE, so will look deeper into optimizing that strategy on batch to best select instance types as we were thinking of switching to BEST_FIT to see how it changes the instance selection
@calm-smartphone-49719: thanks for the insight on how you guys dissected the problem. great insights