-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
build system cleanup #696
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
build system cleanup #696
Conversation
|
on lzo vs gzip: from my past experience, gzip is the best compromise between runtime decompression speed and compression ratio. thats why I competely removed other squashfs compression methods in my fork. lzo will make your final images ~ 5% smaller, with noticeable drop in decompression speed on arm. you will most likely not see any difference on x86 (with SYSTEM loaded into ram) you can do a quick read test and check the speeds: |
|
I'll build this for RPi/RPi2/Generic and get some timings later this afternoon (unless anyone beats me to it) |
|
Previous attempts to change the squashfs compression algorithm have suggested |
|
some of your kernels wont support that. I dont think it's worth the trouble backporting huge patches. but that's just me ;) |
|
Just saying it should be discussed/considered, I don't want to have to revisit this again any time soon! |
|
Ran some tests on RPi3 with First, the file sizes: RESULT: WINNER: Now the timings (using seo's method, comment 2): lz4:lzo:gzip:RESULT: No significant difference between WINNER: ConclusionNice file size saving from On platforms such as ARM, As far as this PR is concerned, continuing to use |
|
For reference this is a Generic project built with |
|
Hmm, ok well I can put the squashfs compression back to be project specific. I didn't think it would be that much of a difference. |
|
you got 100MB/s + on rpi and sdcard ? EDIT: you should also check overal boot time (systemd-analyze) |
It is an 8GB NOOBS card (Samsung, from RPi Foundation). Overclocked with I guess when the data is compressed the actual read rate is even better. |
|
This is on imx6 cuboxi using sandisk extreme pro sd card 15% SYSTEM size increase with lz4 over gzip. |
|
RPi1 results are now in... they're a little different to the RPi2! File sizes: Same as before: lz4:lzo:gzip:Conclusion: |
|
One other consideration - if Given this, and the fact that |
|
now, you really need to check boot speed. and decide if supporting anything than gzip for LE (50-200MB root.sqfs) is is worth the effort. I would bet, on low memory / slow cpu devices gzip wins, on high end hardware - it doesn't matter too much for a small squashfs root that's loaded and cached once. |
|
For imx6 with 3.14 kernel I need to add small lz4 squashfs patch. |
|
Boot speeds (based on time to start Kodi) show slightly different results to the simple tests from earlier... RPi1:
RPi2:
|
|
cool. so I guess lzo wins with newer (mainline, there are some nice squashfs optimizations not present in older kernels) kernels and bigger squashfs root. EDIT: with slower sdcards result may be slightly different :) |
|
So what's the verdict? do we leave squashfs for individual projects as is or do we move all projects to a single squashfs compression? |
|
maybe even use gzip for rpi 2/3 - at slow sd cards it could even outperform lzo |
|
Yes, I would continue to allow individual projects to choose the squashfs compression method.
Based on the results above I'd suggest Or put it another way, |
|
Updated to leave squashfs compression to be project specific |
As discussed in #644 This removes OPTIMIZATION=normal (02)
also this moves some default options from projects to the distro options.
This should be tested as it will default all projects to use lzo compression instead of gzip, not sure how big of an impact this will make.