Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use much faster D: drive for TEMP on Windows #13129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ichard26
Copy link
Member

@ichard26 ichard26 commented Dec 26, 2024

This is apparently an inherent limitation of Azure (which powers GHA) which uses a slow C: drive for the OS (read-optimized) and a fast D: drive for working space.

I first thought a Dev Drive would be even faster (#13123), after a lot of testing, it seems to be slower than simply moving TEMP to the D: drive. To prove this, I did a run where the entire test suite was run back to back three times:

  • First run: TEMP=D:/Temp
  • Second run: TEMP on ReFS/Dev Drive
  • Third run: TEMP=C:/Temp aka the status quo on main

image

This is apparently an inherent limitation of Azure (which powers GHA)
which uses a slow C: drive for the OS (read-optimized) and a fast D:
drive for working space.
@ichard26 ichard26 added the skip news Does not need a NEWS file entry (eg: trivial changes) label Dec 26, 2024
@ichard26
Copy link
Member Author

ichard26 commented Dec 26, 2024

For reference, here are the average CI runtimes for the last 100 successful runs on main:

[3.8 (1)] mean: 0:17:35 min: 0:16:38
[3.8 (2)] mean: 0:15:00 min: 0:13:46
[3.13 (1)] mean: 0:11:15 min: 0:09:57
[3.13 (2)] mean: 0:10:44 min: 0:09:22

image

@pfmoore
Copy link
Member

pfmoore commented Dec 26, 2024

The script tools/ci/devdrive.ps1 creates the dev drive at C:/pip_dev_drive.vhdx, which is the slow disk (and there's a message saying dev drives aren't supported, which might indicate C: is unsuitable in other ways as well). Is it faster if you have New-VHD -Path D:/pip_dev_drive.vhdx?

@ichard26
Copy link
Member Author

@pfmoore Sorry there's a lot of context I forgot to include. The Dev Drive PR is out of date. The final Dev Drive patch I tested is included on this branch: https://github.com/pypa/pip/tree/refs/heads/d-drive (specifically 483859b).

In that version, the VHDX is created on the D: drive as best for performance.

$OSVersion = [Environment]::OSVersion.Version
$Partition = New-VHD -Path D:/pip_dev_drive.vhdx -SizeBytes $size |

As well, it is true that Dev Drives aren't supported on the current Windows 2019 runners. I wrote in that check 🙂. However, I was talking to Steve Dower and he said that simply using a ReFS drive should get you 90% of the way there:

You might also be on an OS that doesn't have it yet and so it's disabled (ReFS on a separate drive should give you most of the benefits though - all Dev Drive really adds on top of that is reducing Windows Defender's impact, but that'll be turned off on GHA already).

If you look at the run I linked earlier (which is hard to read admittedly), you'll notice that last unit/integration test steps are done on the ReFS drive, while the first test steps are done on the D: drive. The D: drive beats the ReFS drive on D: handily.

@ichard26 ichard26 requested a review from pradyunsg December 27, 2024 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news Does not need a NEWS file entry (eg: trivial changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants