Uploads to Amazon S3 on a machine virtualized within an Apple Silicon host machine running macOS 12.6.1 are slow

Originator:liam.nichols.LN
Number:rdar://FB11858528 Date Originated:2022-12-07
Status:Open Resolved:
Product:Virtualization Framework Product Version:
Classification:Incorrect/Unexpected Behavior Reproducible:
 
On an Apple Silicon Mac running macOS 12.6.1 (21G217), when using the Virtualization Framework to run a macOS VM running, uploads to AWS S3 using either the awscli or aws-ruby-sdk become 10-50x slower than they are when run on the host machine itself. 

Please refer to the detailed bug reports in their respective repositories:

- https://github.com/aws/aws-sdk-ruby/issues/2803
- https://github.com/aws/aws-cli/issues/7481

——

The issue can be reproduced by following the steps below:

1. Download VirtualBuddy version 1.2.2 (https://github.com/insidegui/VirtualBuddy/releases/tag/1.2.2)
2. Setup a VM using an image of macOS 13.0.1
3. Once the OS is installed, using terminal install Homebrew (https://brew.sh/)
4. Follow the instructions to setup Homebrew in Terminal
5. Install rbenv with brew install rbenv
6. Follow the instructions to setup rbenv
7. Install Ruby 3.0.3 using rbenv install 3.0.3
8. Set Ruby 3.0.3 as the global version using rbenv global 3.0.3
9. Download and extract the contents of Sample.zip into a directory (https://github.com/aws/aws-sdk-ruby/files/10170646/Sample.zip)
10. Modify the key and region variables in aws-debug.rb
11. Ensure that the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables are set
12. In terminal, cd into the directory
13. Run sh script.sh
13. Observe the output and compare the statistics printed by time by running steps 3-13 on the host machine as well

Host Machine: 0m 11.101s
VM: 5m 51.659s

Comments

Some great investigation from the teams working on the AWS tools:

https://github.com/aws/aws-sdk/issues/469#issuecomment-1447842544

By liam.nichols.LN at Feb. 28, 2023, 9:52 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!