[Bug 1202197] New: 7zip is 30% slower than the original due to missing ASM in spec build (easy fix is included)
http://bugzilla.opensuse.org/show_bug.cgi?id=1202197 Bug ID: 1202197 Summary: 7zip is 30% slower than the original due to missing ASM in spec build (easy fix is included) Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: openSUSE Tumbleweed Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: screening-team-bugs@suse.de Reporter: c.j@tuta.io QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 860657 --> http://bugzilla.opensuse.org/attachment.cgi?id=860657&action=edit asmc-2.34.15-0.src.rpm + 7zip-22.01-1.2.src.rpm The Problem: ASM support is missing (it's included in the original from 7zip.org). The benchmark (7zz b) shows 30% slower decompression and slightly slower compression. How to fix: The README from the 7zip.org source says that the ASM build with asmc requires to build CPP/7zip/Bundles/Alone2/b/g_x64/7zz instead of CPP/7zip/Bundles/Alone2/b/g/7zz. The solution: 1. Install asmc I took this https://build.opensuse.org/package/show/home:enzokiel/asmc and updated it to the latest git version 2.34.15 (asmc-2.34.15-0.src.rpm is attached). 2. Edit the 7zip spec (corrected version 7zip-22.01-1.2.src.rpm is attached) as follows (this is according to the 7zip.org source README): BuildRequires: asmc #build without ASM #%make_build -f ../../cmpl_gcc.mak DISABLE_RAR_COMPRESS=1 #build with ASM %make_build -f ../../cmpl_gcc_x64.mak DISABLE_RAR_COMPRESS=1 #install version without ASM #install -Dt %{buildroot}%{_bindir} CPP/7zip/Bundles/Alone2/b/g/7zz #install version with ASM install -Dt %{buildroot}%{_bindir} CPP/7zip/Bundles/Alone2/b/g_x64/7zz Conclusion: The correctly build 7zip is now working at a speed comparable to the original from 7zip.org. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202197 C J <c.j@tuta.io> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://build.opensuse.org/ | |package/users/Archiving/7zi | |p CC| |danilo.spinella@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202197 C J <c.j@tuta.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202197 C J <c.j@tuta.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Found By|--- |Community User Target Milestone|--- |Current -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202197 Andreas Stieger <Andreas.Stieger@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 - Medium |P5 - None -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202197 http://bugzilla.opensuse.org/show_bug.cgi?id=1202197#c1 Andreas Stieger <Andreas.Stieger@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Andreas.Stieger@gmx.de Summary|7zip is 30% slower than the |7zip is 30% slower than the |original due to missing ASM |original due to missing ASM |in spec build (easy fix is |in spec build |included) | Severity|Normal |Enhancement --- Comment #1 from Andreas Stieger <Andreas.Stieger@gmx.de> --- Actually for a distribution package all dependencies need to be in the distribution. asmc is not in Tumbleweed (and needs some work) Second, avx2 specific instructions are not universally compatible with machines that do not support this instructions. Code may not have complete auto-detection support. Danilo, so you want to entertain this? asmc needs to be pushed up, and for 7zip this should only be enabled if there is reliable CPU feature detection. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202197 http://bugzilla.opensuse.org/show_bug.cgi?id=1202197#c2 --- Comment #2 from C J <c.j@tuta.io> --- enzokiel has made an even better SPEC, which automatically builds i586 (without ASM) and x86_64 (with ASM) (as set forth in the official README): https://build.opensuse.org/package/show/home:enzokiel/7zip He only builds for LEAP 15.4, so I have branched it for Tumbleweed and it builds perfectly without any modifications: https://build.opensuse.org/package/show/home:CJ/7zip https://build.opensuse.org/package/show/home:CJ/asmc (asmc 2.4.15) Regarding asmc: The 7zip author (Igor Pavlov) has been building the original with asmc for more than 1 year... so it should be fine? If you need more info (I don't know if uasm is better than asmc ?): Archlinux has been building it with uasm for 1 year: https://aur.archlinux.org/packages/7-zip-full https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=7-zip-full uasm: https://aur.archlinux.org/packages/uasm https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=uasm 30% faster decoding speed is a massive increase. And it's what the official 7zip does. I hope you can look into updating this. Many thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202197 http://bugzilla.opensuse.org/show_bug.cgi?id=1202197#c4 --- Comment #4 from C J <c.j@tuta.io> --- (In reply to Danilo Spinella from comment #3)
It seems to me that 7zip is searching for AVX2, SSSE3, SSSE41 features before using them. It looks like it's reliable. They are inside C/CpuArch.c source file.
Yes. My 2006 Thinkpad core2duo has been running the 7z ASM version perfectly for months. What are you guys waiting for ? Thanks.
What do you think Andreas?
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202197 http://bugzilla.opensuse.org/show_bug.cgi?id=1202197#c6 --- Comment #6 from C J <c.j@tuta.io> --- (In reply to Danilo Spinella from comment #5)
uasm seems to be just compiled from C code, so I think we can use it instead. I'll try it and report back.
Great ! I'm excited to use it as soon as you are ready. Many thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202197 http://bugzilla.opensuse.org/show_bug.cgi?id=1202197#c7 C J <c.j@tuta.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED --- Comment #7 from C J <c.j@tuta.io> --- Closing as the 7zip ASM version (and uasm) are now in TW. MANY THANKS Danilo. FYI: The 7zip benchmark (7z b) shows no significant performance difference between the asmc and the uasm versions. Very good. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com