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
Windows: Use sequential file access #30139
Conversation
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.
LGTM
// and writing, and returns the resulting *os.File. | ||
// If dir is the empty string, TempFile uses the default directory | ||
// for temporary files (see os.TempDir). | ||
// Multiple programs calling TempFile simultaneously |
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.
TempFileSequential
?
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.
Was deliberate - that's the original comment from golang. I put "TempFileSequential" right at the top of the comment
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.
Yeah, I knew it was copied. It seems slightly confusing here, but no big deal.
// TempFileSequential is a wrapper around golang ioutil.TempFile which | ||
// uses file access sequential. | ||
// | ||
// TempFile creates a new temporary file in the directory dir |
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.
TempFileSequential
?
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.
Same as above
cc @aaronlehmann PTAL |
} | ||
|
||
// TempFileSequential is a wrapper around golang ioutil.TempFile which | ||
// uses file access sequential. |
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.
In this case it's not a wrapper - it's a modified version. Can you clarify this in the comment - I think this will explain a few things that otherwise seem weird, like the use of a hand-rolled PRNG.
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.
@aaronlehmann Comment updated.
SGTM |
Signed-off-by: John Howard <jhoward@microsoft.com>
e0d93ec
to
c98e77c
Compare
LGTM |
Windows: Use sequential file access
Signed-off-by: John Howard jhoward@microsoft.com
This is a follow-on to #28272 and uses sequential file access in two additional locations. The perf team here have verified this change (and the positive impact). Quoting from an internal mail: "Excellent! The traces look great as well! All the changes and repurposing during export\import happen to low-pri standby, and high priority standby stays intact. In addition to AA improvement, looks like the change further improved commit as well."
Fixes Internal VSO Bug #9900466 @johnstep FYI