You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2024/03/25 22:57:00 UTC

[jira] [Commented] (IMPALA-12807) Add option to use the 'mold' linker

    [ https://issues.apache.org/jira/browse/IMPALA-12807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17830724#comment-17830724 ] 

ASF subversion and git services commented on IMPALA-12807:
----------------------------------------------------------

Commit 88dcdfd4662d0ec4a6e0d81d643d207f6e5ed900 in impala's branch refs/heads/master from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=88dcdfd46 ]

IMPALA-12807: Add support for mold linker

This adds support for using the mold linker. It changes
the existing USE_GOLD_LINKER environment variable to
IMPALA_LINKER, which accepts ld, gold, or mold as
values. It defaults to 'gold' to match current behavior.
Developers can override it in bin/impala-config-local.sh.

Clang does not implement -gz properly until version 12.
It does not enable compressed debuginfo in the final
binary. IMPALA_LINKER=mold doesn't work with
IMPALA_COMPRESSED_DEBUG_INFO=true on Clang due to this.
This detects Clang <12 and skips -gz as it is ineffective.

Mold follows similar to behavior to LLD and requires
--exclude-libs to use the full library name (i.e.
liblz4.a rather than liblz4). Gold will happily
accept the full library name, so this changes to use
the full library name.

Mold is much faster for incremental builds on my system:
(e.g. touch be/src/scheduling/scheduler.cc && make -j8 impalad)
gold: 15.8s
mold: 2.6s

Testing:
 - Ran builds with IMPALA_LINKER=mold on Centos 7, Redhat 8,
   and Ubuntu 20.

Change-Id: Ia9e9accd06b6ecd182d200d81afaae09a885c241
Reviewed-on: http://gerrit.cloudera.org:8080/21121
Reviewed-by: Michael Smith <mi...@cloudera.com>
Reviewed-by: Andrew Sherman <as...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Add option to use the 'mold' linker
> -----------------------------------
>
>                 Key: IMPALA-12807
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12807
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>    Affects Versions: Impala 4.3.0
>            Reporter: Joe McDonnell
>            Assignee: Joe McDonnell
>            Priority: Major
>
> Mold is a new linker that says it is faster than lld and gold. See [https://github.com/rui314/mold]
> Hand testing it on my machine, it makes a big difference in speed of iteration:
> {noformat}
> # Test case:
> #  - Start with fully built impalad
> #  - touch be/src/scheduling/scheduler.cc 
> #  - time make -j12 impalad
> With Gold (current default):
> real    0m15.843s
> user    0m15.478s
> sys     0m2.127s
> real    0m15.820s
> user    0m15.302s
> sys     0m2.157s
> real    0m16.136s
> user    0m15.799s
> sys     0m2.098s
> With Mold:
> real    0m2.479s
> user    0m2.169s
> sys     0m0.958s
> real    0m2.674s
> user    0m2.218s
> sys     0m1.086s
> real    0m2.524s
> user    0m2.136s
> sys     0m1.042s{noformat}
> This seems like something we should investigate further.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org