o3de / sig-build

Open 3D Foundation Build Special Interest Group (SIG) documents
Apache License 2.0
9 stars 6 forks source link

Enable Mac/iOS support in AR #32

Open galibzon opened 2 years ago

galibzon commented 2 years ago

I brought forward to the TSC, on the Discord meeting of 4/19/2022, the proposal to enable MacOS & iOS builds in AR. The TSC suggested to bring the proposal to SIG-Build.

Why?

A very important corporation is committing 1.5 engineers to help the development of the Metal RHI. We fear that if Mac/iOS is not validated in AR, then it will be constantly broken and it will be a frustrating experience for those willing to contribute to MacOS/iOS in O3DE.

What's the idea?

Procure enough "dedicated host" instances on EC2 to support AR runs for Mac/iOS.
Ideally the M1 chip based mac instances (now in 'Preview'): https://aws.amazon.com/ec2/instance-types/mac/

steps to enable in AR:

Cost per instance

Monthly cost for 1 instace of mac2.metal (The ones with M1 chip) M1 chip with 8 CPU cores, 8 GPU cores, 16 GiB of memory, 16 core Apple Neural Engine. 1TB of storage. $892.99 USD / month EC2 Dedicated Host cost (monthly) $790.59 USD / month Elastic Block Storage (EBS) pricing (monthly) 1TB $102.40 USD / month From AWS: "They deliver up to 60% better price performance over x86-based EC2 Mac instances for iOS and macOS application build workloads". "you can save up to 44% off On Demand pricing with a three-year commitment."

Challenges (Cost)

During peak hours the AR system may spawn 120 Windows-based EC2 instances in parallel. Unfortunately, We can not request Mac EC2 instances on demand, instead the only option is to have "dedicated hosts". For example reserving 30 Mac hosts would cost around $26,790 USD /month, before discounts. After the 44% discunt mentioned above it would be ~$15,000 USD / month.

brianherrera commented 2 years ago

Thanks for bringing this up to SIG-Build.

Our blockers to onboard Mac/iOS to the AR are the same points you highlighted here. The main one being able to auto-scale the mac nodes like we do with Linux and Windows. We will hit a bottleneck with queue times or costs depending on the number of nodes we provision. In your example the discounted cost for the 30 mac nodes would take up our entire monthly budget.

There have been previous efforts to investigate solutions to this problem, but these options have not been formally documented with the build SIG. I can help restart the effort to onboard Mac/iOS to the AR. I'm also in the process of migrating the nightly pipeline, which contains the mac/ios jobs, from our internal infrastructure to O3DE. This will require similar cost cutting efforts to migrate them over.

brianherrera commented 2 years ago

The plan to migrate the nightly pipeline to O3DE is here: https://github.com/o3de/sig-build/blob/main/rfcs/rfc-bld-20220504-1-nightly-pipeline.md

I also created a related task to investigate Mac/iOS blockers: https://github.com/o3de/o3de/issues/9428 While this is initially for the nightly pipeline this will bring us closer to supporting the platform in the main AR pipeline.