[DOCS-15268] Investigate changes in SERVER-56782: Reintroduce advanced microarchitecture targeting on macOS Created: 22/Apr/22  Updated: 22/Jan/24

Status: Backlog
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: backlog, request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-56782 Reintroduce advanced microarchitectur... Closed
Participants:
Days since reply: 1 year, 41 weeks, 5 days ago
Epic Link: DOCSP-22532

 Description   
Original Downstream Change Summary

We were unable to make this change before we had a native Apple Silicon build because Rosetta 2 could not handle the AVX instructions generated when targeting sandybridge or newer.

After this change, server binaries on macOS will require a haswell or newer CPU. Note that this is a more aggressive posture than the sandybridge requirement we already have on non-macOS (though not by much), so we will need to document it. The rationale for jumping to haswell is that Apple offers a known architecture "slice" type for this platform, and targeting it will hopefully provide a better user experience if an attempt is made to run the software on a platform which does not meet the hardware requirements.

$ clang++ ./hello_world.cpp -arch x86_64h
 
$ arch -x86_64h ./a.out
Hello, World!
 
$ arch -x86_64 ./a.out
arch: posix_spawnp: ./a.out: Bad CPU type in executable

That's better than just getting a SIGILL kill.

All apple systems introduced after 2013 are haswell or newer: https://en.wikipedia.org/wiki/List_of_Macintosh_models_grouped_by_CPU_type#Ivy_Bridge

Description of Linked Ticket

In SERVER-54407 we bumped the required x86_64 microarchitecture to sandybridge but we backed out of that on macOS in SERVER-56728 because Rosetta 2 doesn't support AVX instructions, among others. Once we have native Apple Silicon builds and no longer need to rely on Rosetta 2, we can reintroduce targeting. We may in fact be able to target more aggressively, and bump to -arch x86_64h, per the comments and links in SERVER-56728.


Generated at Thu Feb 08 08:12:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.