-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[mono][aot] .aotdata
files size increase compared to _legacy_ mono
#57689
Comments
Looking at numbers being collected against the HelloWorld iOS Sample against main (https://github.com/dotnet/runtime/tree/main/src/mono/sample/iOS), and being reported here https://msit.powerbi.com/groups/me/apps/54e0e83f-07bc-45bf-87b7-a7677ff3af2a/reports/161e76f5-dad3-4b78-b4d2-56db2da6bdc4/ReportSection85643634814afcbdba99 there seems to be some difference in numbers between the ones collected above and ones from the automation in the lab. |
Different AOT flags perhaps? |
@rolfbjarne fyi for above difference in aotdata size-- we should try to narrow down any differences in flags used |
I was running the (work in progress) numbers for RC1 and got
[1] RC1 assembly size is not stripped of IL, while Legacy is. |
I checked, and the only difference is that legacy passes
so I tried adding |
@rolfbjarne - @steveisok figured out that the Sample HelloWorld iOS app is using an additional flag "mattr=+crc" which seems to be different than your runs. Is it possible to try adding that to see what kind of data you get. The size ratio difference between the runs is a concern and maybe key to identifying what is causing the large aotdata files. |
@SamMonoRT I might be mis-reading https://msit.powerbi.com/groups/me/apps/54e0e83f-07bc-45bf-87b7-a7677ff3af2a/reports/161e76f5-dad3-4b78-b4d2-56db2da6bdc4/ReportSection85643634814afcbdba99 but it seems that it does not run ILLink on the app so the numbers (of files and their sizes) is not helpful to compare anything with what we're producing
Not running the linker means nothing is removed from There's value in monitoring the original (input) size of the files across the runtime builds. However those numbers have little relation to what will end up inside the customer applications. At the very least they should not be compared to each other. |
@billwert - Is it possible to run the perf automation with linker enabled by uncommenting out lines in runtime/src/mono/sample/iOS/Program.csproj Lines 13 to 17 in d033e1a
|
@SamMonoRT Sure I'll do a quick test run and see if it works. |
That makes sense. @lambdageek is taking a look at this issue and mentioned the same to me. |
Just uncommenting those lines seems to have broken running LLVM, investigating.. |
A dummy assembly with 10,000 functions of the form |
The effect I observed in my previous comment is not actually relevant. I'm not actually sure that aotdata sizes have increased since legacy Mono. Here's the output of |
That makes sense and I think you just nailed it :-) LLVM was not usable (and blocked from being used) in legacy for debug builds. IOW the legacy sample would not have those extraneous debug data.
It probably did not. Earlier previews did not use LLVM (not available) so the numbers were even more skewed (when the ratio was found to be widely off expectations). P7 and RC1 numbers both shows a decrease for Note that this was not visible on So, unless there are some things you wish to diagnose further, I think that issue can be closed. Huge thanks for your help and analysis! |
This has been discussed a few times, in chats and meetings, but not filed (as far as I know).
It's been noted since the early net6 previews [1] that the
.aotdata
files are much larger in net6. Even if the overall app size is larger the ratio for.aotdata
is also higher.Example
full data: https://gist.github.com/spouliot/5de7b503f4b398d388a793e0d608ccce
Xamarin.iOS.dll
Here the linked [2]
Xamarin.dll
is smaller for dotnet than legacy. Their content is not 100% identical but quite close (I doubt it could explain the difference). Even if the assembly is smaller (7.2% smaller) the.aotdata
size for dotnet is quite larger (32.3%).mscorlib.dll and System.Private.CoreLib.dll
This same pattern seems to apply to other assemblies - but their internal differences makes it harder to compare.
The assembly [2] size for corelib for dotnet (464,384) and legacy (407,552) are comparable, but the
.aotdata
more than twice the size for dotnet.Questions
.aotdata
files have become larger ?[1] dotnet/macios#10249
[2] the assemblies size are all stripped of IL (both legacy and dotnet)
The text was updated successfully, but these errors were encountered: