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

Optimize disk access during install #904

Open
brson opened this Issue Jan 6, 2017 · 5 comments

Comments

5 participants
@brson
Copy link
Contributor

brson commented Jan 6, 2017

Installation is noticeably slow. I believe there is redundant disk work during installation, associated with the transaction machinery.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented May 12, 2017

I don't specifically know what is inefficient here, but somebody could do some stracing on Linux and see if there's anything obvious.

@brson brson added the help wanted label May 12, 2017

@brson brson changed the title Optimize disk usage during install Optimize disk access during install May 12, 2017

@iamthad

This comment has been minimized.

Copy link

iamthad commented Mar 2, 2019

stat appears to get called 3 times for each file in set_file_perms:

This could probably be reduced to just one stat call.

@kinnison

This comment has been minimized.

Copy link
Collaborator

kinnison commented Mar 3, 2019

Given that the majority of filesystem operations which Rustup performs are reading and writing large (10s of MBs) datasets, I think the stat() inefficiency is by no means the most important thing to consider for speed.

I do, however, think that we should look at consider if there's anything we can do to improve install performance on Windows.

@mati865

This comment has been minimized.

Copy link
Contributor

mati865 commented Mar 3, 2019

Installation on Linux filesystems is fast even on HDD so measuring performance there won't help much for Windows but still it'd be nice to make it even faster.

I don't know which one is more limiting NTFS or AV software but shipping less files would be the way to go here.
Nightly on my Linux machine consists of 17957 files, 16617 of them docs. It'd be significant improvement for Windows if they could be fused together into few bigger files.

@iamthad

This comment has been minimized.

Copy link

iamthad commented Mar 3, 2019

If I understand correctly, the set_file_perms function walks the entire tree of files after they have been extracted to ensure their permissions are correct. This is especially costly in the docs, since there are a tremendous number of files there as @mati865 points out. I would expect tens of thousands of fewer system calls in an installation operation to be noticeable, especially e.g. on NFS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.