Skip to content

Cache on windows runner takes a long time to load #495

Closed

Description

@nikpivkin

Description:
We run tests on runners with different OS using matrix. On ubuntu and macos the cache loads in an acceptable time (about 30 seconds), but on windows the cache loads for almost 12 minutes, which is very long. I didn't notice any windows related restrictions in the Readme.

Action version:
actions/setup-go@v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
'1.22'

Repro steps:
Action: https://github.com/aquasecurity/trivy-aws/actions/runs/10383103541/job/28747388089?pr=210

Expected behavior:
The cache loads quickly.

Actual behavior:
The cache takes a long time to load.

Activity

  1. added
    bug
    on Aug 14, 2024
  2. v-priyagupta108 commented on Aug 14, 2024

    @v-priyagupta108
    Contributor

    Hello @nikpivkin ! Thank you for reporting this!
    We will investigate the issue and get back to you as soon as we have updates.

  3. v-gowridurgad commented on Sep 2, 2024

    @v-gowridurgad

    Hi @nikpivkin, Here are few reasons why windows takes more time than ubuntu and macos:

    System Architecture: Windows has a different system architecture compared to Unix-based systems like Ubuntu and macOS, often resulting in higher overhead for tasks involving disk I/O operations.
    File System Differences: The NTFS file system used by Windows is generally slower for certain types of operations compared to ext4 (used by Ubuntu) and APFS (used by macOS).
    Disk I/O Handling: Windows tends to have more background processes and services that can interfere with disk I/O operations, leading to longer cache loading times.

    After analysing the issue, we concur that the current duration for both installation and cache reloading isn't ideal. The cache reloading process should indeed be optimized for enhanced speed. We appreciate your feedback and will contemplate this as a potential feature request for future improvements rather than a bug.

  4. added
    feature request
    and removed
    bug
    on Sep 2, 2024
  5. removed their assignment
    on Sep 2, 2024
  6. self-assigned this
    on May 22, 2025
  7. removed their assignment
    on Jul 3, 2025
  8. self-assigned this
    on Sep 16, 2025
  9. v-lmvysakh commented on Oct 9, 2025

    @v-lmvysakh

    Hello everyone,

    We wanted to update you that a potential fix for the slow cache restore issue on Windows has been implemented in PR #515. This pull request aims to address the performance concerns reported in this issue.

    Please note that this change introduces a breaking change. We encourage users to review the proposed modifications and share any feedback or concerns you may have. Your input is valuable to ensure the best possible outcome for all users. Thank you for your collaboration and continued support!

  10. v-lmvysakh commented on Oct 30, 2025

    @v-lmvysakh

    Hi @nikpivkin,

    We have conducted extensive testing of the cache restoration process using actions/setup-go v5 and v6 across Windows runners, as well as with various runner configurations. Also, the initial slow cache loading observed on Windows runners was also related to underlying image IO performance issues, as discussed in @actions/runner-images/issues/8755. This discrepancy between the C drive and D drive on Windows runners contributed to slower workflow runtimes and impacted cache restoration speeds. We have found that the cache restoration functionality is now working robustly, and we are no longer experiencing delays or issues from our end.

    For your reference, we have attached screenshots of recent workflow runs that demonstrate successful and timely cache restoration. We are also sharing workflow run link for your reference:


    Image

    Image

    Given that the cache restoration issue appears to be resolved, we will not be proceeding with the implementation of PR #515. Thank you for your support and collaboration. Please let us know if you require any further information or if you encounter any related issues in your environment.

  11. v-lmvysakh commented on Nov 20, 2025

    @v-lmvysakh

    Hello @nikpivkin,

    Just a gentle reminder! Could you please let us know if there are any updates from your side regarding this issue? Thank you!

  12. v-lmvysakh commented on Dec 2, 2025

    @v-lmvysakh

    Hello @nikpivkin,

    Just checking in to see if there are any updates regarding this issue. Thank you!

  13. v-lmvysakh commented on Dec 9, 2025

    @v-lmvysakh

    Hello @nikpivkin,

    Due to not receiving a response for a long time, we are going to close this issue for now. Please feel free to reach us in case of any concerns or further clarifications are required to reopen this issue or create a new one if necessary. Thank you!

  14. nikpivkin commented on Dec 9, 2025

    @nikpivkin
    Author

    Hi @lmvysakh !

    Sorry, I missed the comments. Yes, the fix solved the issue, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions