-
Notifications
You must be signed in to change notification settings - Fork 86
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
Use block-based size for filecache entry size #6376
Conversation
24c7157
to
0e8e27d
Compare
a9c77a3
to
e1ea841
Compare
e1ea841
to
ea9cf47
Compare
} | ||
// Stat always returns number of 512 byte blocks, regardless of the FS | ||
// settings. | ||
sizeOnDisk = info.Sys().(*syscall.Stat_t).Blocks * 512 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this doesn't work on Windows. I'm not sure what the status of Windows executors are, but we may need to special case this calculation for this to compile on Windows @sluongng
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated so that we continue to use the content size on windows for now until we can figure out something more accurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows executor should be functional on HEAD. If you guys need to test something, please ping me on Slack.
7fb14a5
to
3563570
Compare
0c579e2
to
69ff563
Compare
When calling
AddFile
, stat the file to get the number of blocks consumed by the file, and compute the size based on the number of blocks consumed, rather than the content stored in the blocks. The extrastat()
syscall does not significantly affect performance according to benchmarks:A future improvement could be to also account for the file metadata, not just the file contents. But just computing the block-based size should be good enough for now.
Related issues: