Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FileStream optimizations#49975

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
adamsitnik merged 12 commits intodotnet:mainfromjozkee:fs_perf
Mar 23, 2021
Merged

FileStream optimizations#49975

adamsitnik merged 12 commits intodotnet:mainfromjozkee:fs_perf
Mar 23, 2021

Conversation

@jozkee
Copy link
Member

@jozkeejozkee commentedMar 22, 2021
edited
Loading

This PR just merges optimizations made in#49145 and#49638 and rebases them in top of the latest changes recently introduced by@adamsitnik in#48813.

Fixes#49541.

I had to do one adjustment (64e5174) in order to satisfy the tests added by#49754 but otherwise, everything else remains as it was in the old PRs.

Perf results:
There is an allocation increase of 16 B I suspect is caused by the newly added fields_share and_length.

BenchmarkDotNet=v0.12.1.1521-nightly,OS=Windows 10.0.19042.868 (20H2/October2020Update)Intel Core i7-9750H CPU 2.60GHz, 1 CPU, 12 logical and 6 physical cores.NETSDK=6.0.100-preview.2.21153.28  [Host]     : .NET 6.0.0 (6.0.21.12307), X64 RyuJIT  Job-IRUTZB : .NET 6.0.0 (42.42.42.42424), X64 RyuJIT  Job-LEWZXC : .NET 6.0.0 (42.42.42.42424), X64 RyuJITPowerPlanMode=00000000-0000-0000-0000-000000000000Arguments=/p:DebugType=portableIterationTime=250.0000 msMaxIterationCount=20MinIterationCount=15WarmupCount=1
MethodToolchainfileSizeuserBufferSizeoptionsMeanErrorStdDevMedianMinMaxRatioAllocated
Readbase10241024None42.15 μs0.409 μs0.342 μs42.05 μs41.67 μs42.89 μs1.004,328 B
Readfeature10241024None43.11 μs0.918 μs1.057 μs43.01 μs41.61 μs45.08 μs1.014,344 B
Writebase10241024None1,034.05 μs21.974 μs22.565 μs1,038.34 μs976.98 μs1,073.31 μs1.004,328 B
Writefeature10241024None1,042.44 μs39.041 μs44.960 μs1,045.14 μs965.48 μs1,130.16 μs1.014,344 B
ReadAsyncbase10241024None86.86 μs2.158 μs2.485 μs86.53 μs83.21 μs92.46 μs1.005,072 B
ReadAsyncfeature10241024None86.38 μs1.321 μs1.236 μs85.92 μs84.78 μs88.24 μs0.995,088 B
WriteAsyncbase10241024None1,062.25 μs44.082 μs50.765 μs1,068.88 μs987.20 μs1,143.93 μs1.004,416 B
WriteAsyncfeature10241024None1,038.11 μs21.939 μs25.265 μs1,042.38 μs996.82 μs1,093.33 μs0.984,432 B
ReadAsyncbase10241024Asynchronous108.90 μs2.082 μs2.045 μs108.18 μs106.64 μs113.34 μs1.005,240 B
ReadAsyncfeature10241024Asynchronous102.23 μs1.785 μs1.670 μs101.36 μs100.33 μs105.17 μs0.945,256 B
WriteAsyncbase10241024Asynchronous1,173.33 μs44.106 μs49.024 μs1,158.02 μs1,111.86 μs1,297.30 μs1.004,826 B
WriteAsyncfeature10241024Asynchronous1,120.89 μs32.816 μs36.475 μs1,114.59 μs1,056.56 μs1,177.69 μs0.964,838 B
OpenClosebase1024?None35.24 μs0.641 μs0.569 μs35.30 μs33.88 μs36.25 μs1.00208 B
OpenClosefeature1024?None33.30 μs0.582 μs0.516 μs33.18 μs32.78 μs34.36 μs0.94224 B
LockUnlockbase1024?None47.73 μs1.236 μs1.374 μs48.01 μs45.64 μs50.13 μs1.00208 B
LockUnlockfeature1024?None46.02 μs0.694 μs0.649 μs46.05 μs44.95 μs47.27 μs0.96224 B
SeekForwardbase1024?None679.71 μs12.643 μs11.826 μs677.27 μs663.22 μs699.84 μs1.00208 B
SeekForwardfeature1024?None43.52 μs0.798 μs0.746 μs43.33 μs42.57 μs44.90 μs0.06224 B
SeekBackwardbase1024?None2,409.29 μs34.724 μs30.782 μs2,413.36 μs2,364.14 μs2,463.39 μs1.00208 B
SeekBackwardfeature1024?None1,837.29 μs33.029 μs30.895 μs1,826.06 μs1,801.63 μs1,891.95 μs0.76224 B
ReadBytebase1024?None43.99 μs0.570 μs0.505 μs43.83 μs43.33 μs45.06 μs1.004,328 B
ReadBytefeature1024?None44.32 μs0.822 μs0.729 μs44.12 μs43.43 μs45.92 μs1.014,344 B
WriteBytebase1024?None1,107.18 μs27.937 μs29.892 μs1,116.16 μs1,051.06 μs1,141.02 μs1.004,328 B
WriteBytefeature1024?None1,147.78 μs50.184 μs57.792 μs1,134.50 μs1,058.34 μs1,282.50 μs1.044,344 B
Flushbase1024?None4,671.56 μs268.251 μs308.919 μs4,777.24 μs4,159.09 μs5,111.56 μs1.004,329 B
Flushfeature1024?None4,739.84 μs299.293 μs344.666 μs4,916.42 μs4,233.60 μs5,190.47 μs1.024,345 B
FlushAsyncbase1024?None6,215.18 μs323.164 μs372.156 μs6,392.51 μs5,676.52 μs6,679.63 μs1.00275,049 B
FlushAsyncfeature1024?None6,268.75 μs355.372 μs409.247 μs6,446.29 μs5,754.60 μs6,804.16 μs1.01275,065 B
CopyToFilebase1024?None1,106.93 μs39.110 μs43.471 μs1,107.62 μs1,047.41 μs1,196.00 μs1.004,538 B
CopyToFilefeature1024?None1,150.55 μs34.885 μs38.775 μs1,156.79 μs1,088.84 μs1,213.33 μs1.044,569 B
CopyToFileAsyncbase1024?None1,267.53 μs45.676 μs52.601 μs1,266.82 μs1,192.55 μs1,349.69 μs1.005,562 B
CopyToFileAsyncfeature1024?None1,262.80 μs39.062 μs41.796 μs1,269.05 μs1,188.39 μs1,347.70 μs1.005,596 B
OpenClosebase1024?Asynchronous34.54 μs0.473 μs0.419 μs34.43 μs33.91 μs35.57 μs1.00256 B
OpenClosefeature1024?Asynchronous34.97 μs0.652 μs0.610 μs34.79 μs34.12 μs35.99 μs1.01272 B
LockUnlockbase1024?Asynchronous49.49 μs0.932 μs0.915 μs49.15 μs48.32 μs51.42 μs1.00256 B
LockUnlockfeature1024?Asynchronous50.07 μs0.985 μs0.873 μs49.91 μs49.18 μs51.92 μs1.01272 B
SeekForwardbase1024?Asynchronous2,621.18 μs33.964 μs31.770 μs2,631.60 μs2,576.36 μs2,670.52 μs1.00256 B
SeekForwardfeature1024?Asynchronous44.94 μs0.763 μs0.714 μs44.62 μs44.00 μs46.49 μs0.02272 B
SeekBackwardbase1024?Asynchronous5,290.45 μs91.791 μs85.861 μs5,277.68 μs5,169.49 μs5,421.50 μs1.00257 B
SeekBackwardfeature1024?Asynchronous2,678.27 μs46.203 μs43.218 μs2,659.78 μs2,621.72 μs2,748.75 μs0.51272 B
ReadBytebase1024?Asynchronous67.08 μs1.265 μs1.406 μs66.66 μs65.48 μs69.48 μs1.004,698 B
ReadBytefeature1024?Asynchronous61.55 μs1.344 μs1.547 μs61.35 μs59.63 μs64.36 μs0.924,715 B
WriteBytebase1024?Asynchronous1,232.27 μs34.232 μs39.421 μs1,229.81 μs1,177.33 μs1,311.58 μs1.004,727 B
WriteBytefeature1024?Asynchronous1,199.37 μs43.552 μs50.155 μs1,195.56 μs1,127.21 μs1,292.33 μs0.974,755 B
Flushbase1024?Asynchronous47,875.35 μs2,339.326 μs2,693.971 μs47,131.61 μs44,045.60 μs53,199.18 μs1.00155,908 B
Flushfeature1024?Asynchronous14,945.85 μs494.672 μs569.665 μs14,670.86 μs14,347.10 μs16,130.53 μs0.31152,444 B
FlushAsyncbase1024?Asynchronous65,640.53 μs3,328.732 μs3,699.877 μs66,847.73 μs57,764.97 μs69,690.27 μs1.00307,926 B
FlushAsyncfeature1024?Asynchronous17,211.85 μs575.562 μs662.818 μs17,156.76 μs16,383.39 μs18,551.23 μs0.26307,947 B
CopyToFileAsyncbase1024?Asynchronous1,444.81 μs48.168 μs55.470 μs1,452.91 μs1,310.17 μs1,533.31 μs1.006,219 B
CopyToFileAsyncfeature1024?Asynchronous1,838.93 μs251.001 μs278.987 μs1,855.54 μs1,358.64 μs2,233.14 μs1.276,191 B
Readbase1048576512None1,054.38 μs137.667 μs158.537 μs984.19 μs896.97 μs1,362.93 μs1.004,328 B
Readfeature1048576512None821.17 μs16.453 μs18.287 μs816.62 μs796.64 μs864.23 μs0.794,344 B
Writebase1048576512None6,409.50 μs261.978 μs280.314 μs6,381.70 μs6,035.65 μs7,055.64 μs1.004,329 B
Writefeature1048576512None6,052.51 μs206.714 μs238.052 μs6,025.02 μs5,631.29 μs6,402.86 μs0.944,345 B
ReadAsyncbase1048576512None1,660.33 μs103.631 μs119.342 μs1,696.76 μs1,479.36 μs1,877.67 μs1.0086,671 B
ReadAsyncfeature1048576512None1,493.91 μs33.582 μs38.673 μs1,480.58 μs1,439.02 μs1,580.41 μs0.9086,686 B
WriteAsyncbase1048576512None8,570.25 μs503.775 μs580.147 μs8,503.81 μs7,755.54 μs9,810.12 μs1.0078,194 B
WriteAsyncfeature1048576512None7,507.00 μs271.475 μs312.631 μs7,496.33 μs7,008.36 μs8,183.34 μs0.8878,313 B
ReadAsyncbase1048576512Asynchronous7,345.60 μs298.758 μs344.050 μs7,448.88 μs6,638.23 μs7,753.77 μs1.0094,982 B
ReadAsyncfeature1048576512Asynchronous4,035.77 μs104.221 μs120.022 μs4,043.89 μs3,822.51 μs4,289.82 μs0.5595,010 B
WriteAsyncbase1048576512Asynchronous21,952.38 μs931.408 μs996.596 μs21,620.60 μs20,673.96 μs24,621.32 μs1.0086,598 B
WriteAsyncfeature1048576512Asynchronous11,898.93 μs409.308 μs471.360 μs11,744.84 μs11,238.01 μs12,783.82 μs0.5486,691 B
Readbase10485764096None779.65 μs11.151 μs10.431 μs778.89 μs764.15 μs795.34 μs1.00208 B
Readfeature10485764096None769.84 μs13.442 μs12.574 μs763.42 μs757.29 μs789.30 μs0.99224 B
Writebase10485764096None6,123.14 μs182.392 μs202.728 μs6,067.18 μs5,808.37 μs6,607.42 μs1.00209 B
Writefeature10485764096None6,263.92 μs334.956 μs372.302 μs6,149.22 μs5,788.45 μs7,113.08 μs1.02225 B
ReadAsyncbase10485764096None1,199.60 μs21.477 μs20.090 μs1,201.32 μs1,170.83 μs1,245.46 μs1.0029,304 B
ReadAsyncfeature10485764096None1,249.15 μs23.808 μs22.270 μs1,254.30 μs1,208.98 μs1,280.63 μs1.0429,320 B
WriteAsyncbase10485764096None7,255.20 μs260.501 μs299.993 μs7,161.12 μs6,891.52 μs7,986.36 μs1.0055,975 B
WriteAsyncfeature10485764096None7,308.10 μs239.714 μs266.442 μs7,328.21 μs6,883.72 μs7,776.77 μs1.0155,993 B
ReadAsyncbase10485764096Asynchronous7,090.25 μs147.726 μs170.122 μs7,053.45 μs6,865.73 μs7,429.79 μs1.0080,509 B
ReadAsyncfeature10485764096Asynchronous3,594.29 μs62.789 μs58.733 μs3,591.26 μs3,510.61 μs3,689.29 μs0.5180,481 B
WriteAsyncbase10485764096Asynchronous22,194.85 μs1,208.960 μs1,343.756 μs22,192.11 μs20,459.74 μs25,899.69 μs1.0085,789 B
WriteAsyncfeature10485764096Asynchronous11,185.35 μs364.893 μs390.431 μs11,060.87 μs10,781.64 μs12,278.44 μs0.5085,880 B
Read_NoBufferingbase104857616384None250.69 μs4.669 μs4.368 μs248.68 μs245.63 μs257.51 μs1.00144 B
Read_NoBufferingfeature104857616384None249.80 μs3.842 μs4.270 μs247.96 μs245.10 μs257.09 μs1.00160 B
Write_NoBufferingbase104857616384None23,490.05 μs445.841 μs417.040 μs23,318.99 μs23,041.92 μs24,362.22 μs1.00149 B
Write_NoBufferingfeature104857616384None23,552.72 μs390.004 μs364.810 μs23,326.66 μs23,137.19 μs24,126.65 μs1.00394 B
ReadAsync_NoBufferingbase104857616384None460.01 μs4.112 μs3.645 μs460.09 μs454.56 μs467.22 μs1.007,648 B
ReadAsync_NoBufferingfeature104857616384None451.71 μs3.358 μs2.977 μs451.50 μs445.98 μs456.70 μs0.987,664 B
WriteAsync_NoBufferingbase104857616384None24,472.46 μs310.763 μs290.688 μs24,480.76 μs24,053.21 μs25,004.18 μs1.007,738 B
WriteAsync_NoBufferingfeature104857616384None24,494.74 μs407.382 μs381.065 μs24,415.37 μs23,963.72 μs25,341.92 μs1.008,206 B
ReadAsync_NoBufferingbase104857616384Asynchronous1,864.75 μs36.850 μs40.959 μs1,859.62 μs1,803.44 μs1,947.62 μs1.0020,408 B
ReadAsync_NoBufferingfeature104857616384Asynchronous1,085.50 μs26.299 μs29.232 μs1,089.04 μs1,017.47 μs1,131.86 μs0.5820,424 B
WriteAsync_NoBufferingbase104857616384Asynchronous29,825.94 μs564.912 μs580.123 μs29,780.46 μs28,886.20 μs31,051.36 μs1.0020,426 B
WriteAsync_NoBufferingfeature104857616384Asynchronous26,490.92 μs524.760 μs490.861 μs26,350.99 μs25,964.88 μs27,401.54 μs0.8920,429 B
CopyToFilebase1048576?None5,078.46 μs123.656 μs142.403 μs5,054.93 μs4,830.58 μs5,308.51 μs1.00423 B
CopyToFilefeature1048576?None5,106.71 μs121.515 μs139.937 μs5,112.16 μs4,889.01 μs5,405.29 μs1.01455 B
CopyToFileAsyncbase1048576?None5,499.19 μs101.362 μs99.551 μs5,493.06 μs5,361.38 μs5,695.96 μs1.003,217 B
CopyToFileAsyncfeature1048576?None5,472.62 μs87.302 μs77.391 μs5,464.24 μs5,362.25 μs5,589.45 μs0.993,259 B
CopyToFileAsyncbase1048576?Asynchronous7,040.58 μs137.673 μs153.023 μs7,057.62 μs6,797.71 μs7,368.77 μs1.004,238 B
CopyToFileAsyncfeature1048576?Asynchronous6,715.75 μs130.221 μs127.895 μs6,702.73 μs6,519.45 μs6,932.49 μs0.954,256 B
Readbase1048576004096None92,104.99 μs1,296.098 μs1,212.370 μs91,663.05 μs90,452.25 μs94,162.40 μs1.00220 B
Readfeature1048576004096None91,536.81 μs1,149.948 μs1,019.399 μs91,276.55 μs90,328.73 μs93,809.38 μs0.99236 B
Writebase1048576004096None141,539.82 μs3,725.871 μs3,986.640 μs140,613.80 μs135,893.60 μs149,638.80 μs1.00256 B
Writefeature1048576004096None142,984.74 μs2,718.416 μs2,542.808 μs142,343.80 μs140,064.00 μs149,534.30 μs1.01272 B
ReadAsyncbase1048576004096None126,035.11 μs2,331.713 μs2,181.086 μs126,048.35 μs122,238.45 μs128,763.55 μs1.002,869,000 B
ReadAsyncfeature1048576004096None124,737.77 μs2,624.516 μs3,022.397 μs124,263.02 μs120,696.70 μs131,166.20 μs0.992,869,104 B
WriteAsyncbase1048576004096None245,432.67 μs20,305.908 μs21,727.094 μs235,492.40 μs222,986.10 μs291,460.00 μs1.005,126,400 B
WriteAsyncfeature1048576004096None212,691.08 μs5,451.753 μs5,833.315 μs211,909.40 μs203,383.80 μs225,193.70 μs0.875,124,816 B
ReadAsyncbase1048576004096Asynchronous705,778.75 μs13,299.438 μs11,789.605 μs702,970.95 μs691,019.90 μs733,272.60 μs1.007,988,656 B
ReadAsyncfeature1048576004096Asynchronous365,151.64 μs5,520.016 μs5,163.426 μs365,748.10 μs356,890.40 μs376,450.80 μs0.527,988,592 B
WriteAsyncbase1048576004096Asynchronous2,421,993.96 μs228,717.280 μs254,218.651 μs2,369,430.40 μs2,111,048.40 μs2,937,009.00 μs1.008,094,752 B
WriteAsyncfeature1048576004096Asynchronous498,878.68 μs12,640.036 μs12,980.387 μs497,878.40 μs482,248.80 μs527,246.50 μs0.218,096,136 B
Read_NoBufferingbase10485760016384None36,768.47 μs958.519 μs1,103.832 μs36,831.48 μs34,881.78 μs38,585.25 μs1.00152 B
Read_NoBufferingfeature10485760016384None35,123.74 μs697.593 μs716.377 μs34,966.59 μs33,963.21 μs36,597.23 μs0.95167 B
Write_NoBufferingbase10485760016384None60,559.25 μs1,765.154 μs1,888.695 μs59,959.00 μs57,659.65 μs64,166.00 μs1.00728 B
Write_NoBufferingfeature10485760016384None62,577.38 μs3,531.058 μs4,066.372 μs61,590.12 μs57,044.93 μs68,937.48 μs1.03744 B
ReadAsync_NoBufferingbase10485760016384None48,480.72 μs1,039.224 μs1,196.772 μs48,352.14 μs45,839.95 μs50,579.90 μs1.00717,292 B
ReadAsync_NoBufferingfeature10485760016384None48,983.83 μs453.513 μs424.216 μs49,049.00 μs48,355.55 μs49,586.40 μs1.01717,308 B
WriteAsync_NoBufferingbase10485760016384None69,978.50 μs2,263.067 μs2,421.457 μs69,716.90 μs66,493.05 μs74,234.95 μs1.00717,866 B
WriteAsync_NoBufferingfeature10485760016384None72,189.72 μs2,454.820 μs2,626.630 μs72,206.40 μs68,511.23 μs78,521.40 μs1.03717,882 B
ReadAsync_NoBufferingbase10485760016384Asynchronous195,393.84 μs5,908.521 μs6,567.306 μs193,028.80 μs187,306.60 μs210,169.60 μs1.001,997,288 B
ReadAsync_NoBufferingfeature10485760016384Asynchronous106,702.51 μs2,112.871 μs2,169.763 μs106,223.95 μs103,839.30 μs110,466.70 μs0.551,997,952 B
WriteAsync_NoBufferingbase10485760016384Asynchronous583,151.32 μs79,464.383 μs81,604.071 μs563,621.40 μs495,295.70 μs779,063.40 μs1.001,998,896 B
WriteAsync_NoBufferingfeature10485760016384Asynchronous152,822.71 μs5,842.803 μs6,251.734 μs150,639.35 μs145,130.50 μs166,902.10 μs0.271,997,304 B
CopyToFilebase104857600?None57,322.51 μs1,303.006 μs1,448.288 μs56,689.82 μs55,256.95 μs60,040.78 μs1.001,072 B
CopyToFilefeature104857600?None57,167.15 μs810.539 μs718.521 μs56,955.45 μs56,365.05 μs58,591.82 μs0.99994 B
CopyToFileAsyncbase104857600?None65,886.27 μs1,733.748 μs1,996.587 μs65,805.48 μs62,745.60 μs70,337.43 μs1.00181,298 B
CopyToFileAsyncfeature104857600?None65,663.41 μs1,048.440 μs1,076.671 μs65,624.70 μs63,740.40 μs68,090.98 μs1.00181,168 B
CopyToFileAsyncbase104857600?Asynchronous151,415.33 μs9,692.878 μs11,162.333 μs151,676.40 μs136,253.30 μs171,368.00 μs1.00251,656 B
CopyToFileAsyncfeature104857600?Asynchronous103,349.35 μs2,303.080 μs2,559.867 μs103,683.20 μs99,412.30 μs109,105.25 μs0.68251,512 B

adamsitnik reacted with heart emoji
@jozkeejozkee added this to the6.0.0 milestoneMar 22, 2021
@jozkeejozkee self-assigned thisMar 22, 2021
@adamsitnikadamsitnik added the tenet-performancePerformance related issue labelMar 22, 2021
Copy link
Member

@adamsitnikadamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Overall looks good to me, but I've found few minor things that should be improved before we merge the PR.

@jozkee could you please provide the benchmark numbers including the newNoBuffering benchmarks from#1724 ?

jozkeeand others added2 commitsMarch 22, 2021 15:06
@jozkeejozkee requested a review fromadamsitnikMarch 23, 2021 03:44
Copy link
Member

@adamsitnikadamsitnik left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@jozkee the perf results look amazing <3 (up to two times fasterReadAsync and up to five times fasterWriteAsync!!)

Could you please re-run the following benchmarks:

Faster Read and Write sync - I am surprised that we have gained something here as we have more or less not touched the sync code path besides using a different set of parameters forReadFile andWriteFile? (it's great to have the gain, but it would be good to understand it)

MethodToolchainfileSizeuserBufferSizeoptionsMeanErrorStdDevMedianMinMaxRatioAllocated
Readbase1048576512None1,054.38 μs137.667 μs158.537 μs984.19 μs896.97 μs1,362.93 μs1.004,328 B
Readfeature1048576512None821.17 μs16.453 μs18.287 μs816.62 μs796.64 μs864.23 μs0.794,344 B
Writebase1048576512None6,409.50 μs261.978 μs280.314 μs6,381.70 μs6,035.65 μs7,055.64 μs1.004,329 B
Writefeature1048576512None6,052.51 μs206.714 μs238.052 μs6,025.02 μs5,631.29 μs6,402.86 μs0.944,345 B

Why copying small files have regressed?

MethodToolchainfileSizeuserBufferSizeoptionsMeanErrorStdDevMedianMinMaxRatioAllocated
CopyToFileAsyncbase1024?Asynchronous1,444.81 μs48.168 μs55.470 μs1,452.91 μs1,310.17 μs1,533.31 μs1.006,219 B
CopyToFileAsyncfeature1024?Asynchronous1,838.93 μs251.001 μs278.987 μs1,855.54 μs1,358.64 μs2,233.14 μs1.276,191 B

Since most of the results look great and we have just one tiny regression that can be an outlier I am going to squash it right now (the sooner we do that the sooner we can test other repos if our changes have broken something)

@jozkee
Copy link
MemberAuthor

Could you please re-run the following benchmarks:

@adamsitnik I ran the suggested benchmarks again and the results show no regression nor improvement vs base (main), it seems to me that the benchmarks are a bit unstable.

Read/Write sync:

| Method |           Toolchain | fileSize | userBufferSize | options |       Mean |     Error |    StdDev |     Median |        Min |        Max | Ratio | Allocated ||------- |-------------------- |--------- |--------------- |-------- |-----------:|----------:|----------:|-----------:|-----------:|-----------:|------:|----------:||   Read |   \base\CoreRun.exe |  1048576 |            512 |    None |   841.1 us |   7.18 us |   6.00 us |   840.9 us |   833.2 us |   854.1 us |  1.00 |      4 KB ||   Read |\feature\CoreRun.exe |  1048576 |            512 |    None |   842.1 us |   8.90 us |   8.32 us |   843.6 us |   826.5 us |   857.3 us |  1.00 |      4 KB ||        |                     |          |                |         |            |           |           |            |            |            |       |           ||  Write |   \base\CoreRun.exe |  1048576 |            512 |    None | 6,825.0 us | 350.07 us | 403.15 us | 6,736.7 us | 6,310.4 us | 7,601.0 us |  1.00 |      4 KB ||  Write |\feature\CoreRun.exe |  1048576 |            512 |    None | 6,834.6 us | 203.73 us | 226.44 us | 6,827.1 us | 6,507.2 us | 7,296.0 us |  1.01 |      4 KB |

CopyToFileAsync 1024 file size:

|          Method |           Toolchain |  fileSize |      options |       Mean |      Error |     StdDev |     Median |        Min |        Max | Ratio | Allocated ||---------------- |-------------------- |---------- |------------- |-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|------:|----------:|| CopyToFileAsync |   \base\CoreRun.exe |      1024 |         None |   1.561 ms |  0.0748 ms |  0.0861 ms |   1.543 ms |   1.427 ms |   1.742 ms |  1.00 |      5 KB || CopyToFileAsync |\feature\CoreRun.exe |      1024 |         None |   1.586 ms |  0.0464 ms |  0.0534 ms |   1.576 ms |   1.486 ms |   1.696 ms |  1.02 |      5 KB ||                 |                     |           |              |            |            |            |            |            |            |       |           || CopyToFileAsync |   \base\CoreRun.exe |      1024 | Asynchronous |   1.847 ms |  0.1436 ms |  0.1596 ms |   1.853 ms |   1.597 ms |   2.099 ms |  1.00 |      6 KB || CopyToFileAsync |\feature\CoreRun.exe |      1024 | Asynchronous |   1.747 ms |  0.0747 ms |  0.0831 ms |   1.768 ms |   1.626 ms |   1.951 ms |  0.95 |      6 KB |
adamsitnik reacted with thumbs up emoji

@jozkeejozkee deleted the fs_perf branchMarch 24, 2021 19:29
@adamsitnikadamsitnik added the breaking-changeIssue or PR that represents a breaking API or functional change over a previous release. labelApr 7, 2021
@ghostghost added the needs-breaking-change-doc-createdBreaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet labelApr 7, 2021
@ghostghost locked asresolvedand limited conversation to collaboratorsMay 7, 2021
@jozkee
Copy link
MemberAuthor

Breaking change doc created indotnet/docs#24060.

@jozkeejozkee removed the needs-breaking-change-doc-createdBreaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet labelOct 15, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@adamsitnikadamsitnikadamsitnik approved these changes

@carlossanlopcarlossanlopAwaiting requested review from carlossanlop

@stephentoubstephentoubAwaiting requested review from stephentoub

Assignees

@jozkeejozkee

Labels

area-System.IObreaking-changeIssue or PR that represents a breaking API or functional change over a previous release.tenet-performancePerformance related issue

Projects

None yet

Milestone

6.0.0

Development

Successfully merging this pull request may close these issues.

Avoid expensive GetFileInformationByHandleEx syscall if possible

2 participants

@jozkee@adamsitnik

[8]ページ先頭

©2009-2025 Movatter.jp