Slow Cache Restoring Time - Request for Assistance

We are experiencing with our cache restoring times, specifically with the download speed, and to seek your help in improving this.

We have observed that restoring the cache takes an excessive amount of time. Below are the details from a recent build:

output of restore_cache step. This is already compressed as much as we can and don’t see another way to reduce the size of iOS derived data.

No cache is found for key: v5-derived-data-cache-AbpHGcgLb+kRsJGnwFEktk7uzpZOCcBY74+YBdrKVGs=
Found a cache from build 5625096 at v5-derived-data-cache
Size: 1.4 GiB
Cached paths:
  * /Users/distiller/project/ios/dd-tar-cache

Downloading cache archive...Download duration for cache file /var/folders/0n/_64ccd3s3ljg9lvt2dp0n7540000gn/T/cache4058528779: 1m19.87930675s

Unarchiving cache...
Extraction duration for v5-derived-data-cache: 4.124012291s

Similarly restoring swift package manager cache:

Found a cache from build 5625096 at ios--spm-deps-m1-v5-GoTB4x1pNkcGn5qFurrJwoZIT82tbAemMD5wILWRedE=
Size: 842 MiB
Cached paths:
  * /Users/distiller/project/ios/spm-tar-cache

Downloading cache archive...Download duration for cache file /var/folders/0n/_64ccd3s3ljg9lvt2dp0n7540000gn/T/cache3074329155: 41.743510417s

Unarchiving cache...
Extraction duration for ios--spm-deps-m1-v5-{{ checksum "../Folder/Package.resolved" }}: 1.84128625s

The download duration, in particular, appears to be extremely slow. This issue is consistent across different builds and is also observed the same wit attach_workspace step.

Here is the configuration of our executor:

ios:
  macos:
    xcode: 15.2.0
  resource_class: macos.m1.large.gen1

Could you please provide guidance or solutions to help us improve the cache restoring performance? Any insights into why the download speeds might be slow and potential optimizations we can apply would be greatly appreciated.

Thank you for your assistance.

1 Like