Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 4.1.0
-
None
-
ghx-label-6
Description
Currently, Impala debug builds use no optimizations. Some optimizations can interfere with debuggability, and the debug builds prioritize debuggability. However, running without optimizations means the binary is much slower.
GCC has a debug-friendly optimization level -Og, which enables optimizations that do not interfere with debugging. This may provide a way to get the debuggability needed while having faster runtimes. See https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
In testing this, the binaries are definitely faster. Core test runtimes are reduced by about 25 minutes. Exhaustive test runtimes are reduced by over an hour.
The extra optimization enables compiler passes that produce more debugging information. This means that the binaries have more debug info, which make them larger. This extra information is likely related to variable tracking (i.e. fvar-tracking-assignments), which is recommended for maximum debuggability (but may not be strictly necessary for how we use it). See https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html
Binary size for impalad (unstripped) Without -Og: 519345880 With -Og: 709527368 Binary size for impalad (stripped) Without -Og: 164500024 With -Og: 105873184
Attachments
Issue Links
- breaks
-
IMPALA-11242 Impala cluster doesn't start when building with debug_noopt
- Resolved