-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 file allocation size where it's beneficial #51116
Comments
Tagging subscribers to this area: @carlossanlop Issue Details
Since #51111 has not been merged yet, please use it for measurements.
|
For places where we receive text instead of bytes, e.g: |
Do we need support this for Memory-Mapped Files? Dup of this comment. |
Can you please try benchmarking #51298 again with the preallocation changes but adding For *Async methods please try using WriteAllBytes is a sequential operation but dotnet doesn't use correct flags in these cases... The cache manager is likely trying to prefetch data from the file and potentially degrading the performance when preallocation was used which is not what you want when using functions like WriteAllBytes which are sequential. See also: |
Why should async IO use |
Just to compare the benchmark results with the other benchmarks. @jozkee reported a |
I am closing the issue as it's pointless with the regression that has been recently introduced and backported to 6.0 (#59705) |
File.WriteAll*
.File.Copy
etc.FileStream
ctor that allows for specifyingallocationSize
and specify the exact value (or estimation as OS is smart enough to shrink the file (when it's closed) if it was too much).Since #51111 has not been merged yet, please use it for measurements.
The text was updated successfully, but these errors were encountered: