Skip to content
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

Optimizations on LCI parcelport: merge small messages; remove sender mutex lock. #6105

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

JiakunYan
Copy link
Contributor

@JiakunYan JiakunYan commented Dec 15, 2022

Changes

  • Adapt to LCI v1.7.2 CMakeList.txt changes: LCI_PM_BACKEND renamed to LCI_PM_BACKEND_DEFAULT; new object lci-ucx (the ucx registration cache) to install and export; renamed include directory.
  • Send header, data (non-zero-copy chunks), and transmission chunks in a single message if possible
  • Reduce the thread contention on the sender side: replace sync with completion queue: remove mutex lock on sender_connection.

@hkaiser
Copy link
Member

hkaiser commented Dec 16, 2022

@JiakunYan could you please take care of the inspect, clang-format and cmake-format complaints?

@JiakunYan
Copy link
Contributor Author

@hkaiser Done. I am looking at the failed tests. OpenMPI links to UCX and LCI also links to part of the UCX (the registration cache). It seems there are some conflicts. It is weird I didn't have this issue on my system.

@StellarBot
Copy link

Performance test report

HPX Performance

Comparison

BENCHMARKFORK_JOIN_EXECUTORPARALLEL_EXECUTORSCHEDULER_EXECUTOR
For Each(=)(=)(=)

Info

PropertyBeforeAfter
HPX Datetime2022-05-31T12:57:29+00:002022-12-17T23:16:20+00:00
HPX Commitd5655f81dc8f89
Envfile
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Hostnamenid01193nid01538
Datetime2022-05-31T15:13:01.357969+02:002022-12-18T00:37:29.848302+01:00
Clusternamedaintdaint

Comparison

BENCHMARKNO-EXECUTOR
Future Overhead - Create Thread Hierarchical - Latch++

Info

PropertyBeforeAfter
HPX Datetime2022-05-31T12:57:29+00:002022-12-17T23:16:20+00:00
HPX Commitd5655f81dc8f89
Envfile
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Hostnamenid01193nid01538
Datetime2022-05-31T15:13:18.026239+02:002022-12-18T00:37:45.681060+01:00
Clusternamedaintdaint

Comparison

BENCHMARKFORK_JOIN_EXECUTOR_DEFAULT_FORK_JOIN_POLICY_ALLOCATORPARALLEL_EXECUTOR_DEFAULT_PARALLEL_POLICY_ALLOCATORSCHEDULER_EXECUTOR_DEFAULT_SCHEDULER_EXECUTOR_ALLOCATOR
Stream Benchmark - Add(=)(=)(=)
Stream Benchmark - Scale(=)(=)(=)
Stream Benchmark - Triad-(=)(=)
Stream Benchmark - Copy(=)(=)(=)

Info

PropertyBeforeAfter
HPX Datetime2021-11-10T19:14:21+00:002022-12-17T23:16:20+00:00
HPX Commit71d8dbe1dc8f89
Envfile
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Hostnamenid00120nid01538
Datetime2021-11-10T20:28:18.266961+01:002022-12-18T00:38:01.178865+01:00
Clusternamedaintdaint

Explanation of Symbols

SymbolMEANING
=No performance change (confidence interval within ±1%)
(=)Probably no performance change (confidence interval within ±2%)
(+)/(-)Very small performance improvement/degradation (≤1%)
+/-Small performance improvement/degradation (≤5%)
++/--Large performance improvement/degradation (≤10%)
+++/---Very large performance improvement/degradation (>10%)
?Probably no change, but quite large uncertainty (confidence interval with ±5%)
??Unclear result, very large uncertainty (±10%)
???Something unexpected…

@JiakunYan
Copy link
Contributor Author

@hkaiser would it be better if I squash these commits into one?

@hkaiser
Copy link
Member

hkaiser commented Dec 20, 2022

@hkaiser would it be better if I squash these commits into one?

@JiakunYan please do as you prefer.

@JiakunYan
Copy link
Contributor Author

@hkaiser Done. I think this PR is ready to be merged.

@hkaiser
Copy link
Member

hkaiser commented Jan 5, 2023

@JiakunYan
Copy link
Contributor Author

@JiakunYan would you mind having a look at https://app.codacy.com/gh/STEllAR-GROUP/hpx/pullRequest?prid=10784819?

Fixed!

@StellarBot
Copy link

Performance test report

HPX Performance

Comparison

BENCHMARKFORK_JOIN_EXECUTORPARALLEL_EXECUTORSCHEDULER_EXECUTOR
For Each(=)+(=)

Info

PropertyBeforeAfter
HPX Datetime2022-05-31T12:57:29+00:002023-01-09T19:44:45+00:00
HPX Commitd5655f895fda35
Hostnamenid01193nid00025
Datetime2022-05-31T15:13:01.357969+02:002023-01-09T20:59:02.165290+01:00
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Envfile
Clusternamedaintdaint

Comparison

BENCHMARKNO-EXECUTOR
Future Overhead - Create Thread Hierarchical - Latch++

Info

PropertyBeforeAfter
HPX Datetime2022-05-31T12:57:29+00:002023-01-09T19:44:45+00:00
HPX Commitd5655f895fda35
Hostnamenid01193nid00025
Datetime2022-05-31T15:13:18.026239+02:002023-01-09T20:59:18.053538+01:00
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Envfile
Clusternamedaintdaint

Comparison

BENCHMARKFORK_JOIN_EXECUTOR_DEFAULT_FORK_JOIN_POLICY_ALLOCATORPARALLEL_EXECUTOR_DEFAULT_PARALLEL_POLICY_ALLOCATORSCHEDULER_EXECUTOR_DEFAULT_SCHEDULER_EXECUTOR_ALLOCATOR
Stream Benchmark - Add-+(=)
Stream Benchmark - Scale(=)+++(=)
Stream Benchmark - Triad(=)++-
Stream Benchmark - Copy(=)++(=)

Info

PropertyBeforeAfter
HPX Datetime2021-11-10T19:14:21+00:002023-01-09T19:44:45+00:00
HPX Commit71d8dbe95fda35
Hostnamenid00120nid00025
Datetime2021-11-10T20:28:18.266961+01:002023-01-09T20:59:33.010934+01:00
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Envfile
Clusternamedaintdaint

Explanation of Symbols

SymbolMEANING
=No performance change (confidence interval within ±1%)
(=)Probably no performance change (confidence interval within ±2%)
(+)/(-)Very small performance improvement/degradation (≤1%)
+/-Small performance improvement/degradation (≤5%)
++/--Large performance improvement/degradation (≤10%)
+++/---Very large performance improvement/degradation (>10%)
?Probably no change, but quite large uncertainty (confidence interval with ±5%)
??Unclear result, very large uncertainty (±10%)
???Something unexpected…

hkaiser
hkaiser previously approved these changes Jan 10, 2023
Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@hkaiser
Copy link
Member

hkaiser commented Jan 10, 2023

This PR contains the changes from #6057, where I have requested changes. Once that has been merged, this PR needs to be rebased.

@StellarBot
Copy link

Performance test report

HPX Performance

Comparison

BENCHMARKFORK_JOIN_EXECUTORPARALLEL_EXECUTORSCHEDULER_EXECUTOR
For Each(=)(=)(=)

Info

PropertyBeforeAfter
HPX Commitd48272381247c2
HPX Datetime2023-01-12T14:41:15+00:002023-01-23T06:23:31+00:00
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Hostnamenid00267nid01351
Datetime2023-01-12T16:07:32.649261+01:002023-01-23T07:37:44.796591+01:00
Clusternamedaintdaint
Envfile

Comparison

BENCHMARKNO-EXECUTOR
Future Overhead - Create Thread Hierarchical - Latch---

Info

PropertyBeforeAfter
HPX Commitda01e7881247c2
HPX Datetime2023-01-18T08:41:20+00:002023-01-23T06:23:31+00:00
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Hostnamenid00005nid01351
Datetime2023-01-18T09:57:57.669847+01:002023-01-23T07:38:05.440110+01:00
Clusternamedaintdaint
Envfile

Comparison

BENCHMARKFORK_JOIN_EXECUTOR_DEFAULT_FORK_JOIN_POLICY_ALLOCATORPARALLEL_EXECUTOR_DEFAULT_PARALLEL_POLICY_ALLOCATORSCHEDULER_EXECUTOR_DEFAULT_SCHEDULER_EXECUTOR_ALLOCATOR
Stream Benchmark - Add+(=)(=)
Stream Benchmark - Scale(=)(=)(=)
Stream Benchmark - Triad(=)(=)(=)
Stream Benchmark - Copy(=)(=)(=)

Info

PropertyBeforeAfter
HPX Commit52952d881247c2
HPX Datetime2023-01-17T08:25:42+00:002023-01-23T06:23:31+00:00
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Hostnamenid00005nid01351
Datetime2023-01-17T09:44:28.090718+01:002023-01-23T07:38:20.921552+01:00
Clusternamedaintdaint
Envfile

Explanation of Symbols

SymbolMEANING
=No performance change (confidence interval within ±1%)
(=)Probably no performance change (confidence interval within ±2%)
(+)/(-)Very small performance improvement/degradation (≤1%)
+/-Small performance improvement/degradation (≤5%)
++/--Large performance improvement/degradation (≤10%)
+++/---Very large performance improvement/degradation (>10%)
?Probably no change, but quite large uncertainty (confidence interval with ±5%)
??Unclear result, very large uncertainty (±10%)
???Something unexpected…

…mutex lock

- send header, data, tchunk in a single message if possible
- replace sync with completion queue: remove lock on sender_connection
- adapt to LCI v1.7.2 cmake change
- Use unique_ptr for prg_thread_p
@StellarBot
Copy link

Performance test report

HPX Performance

Comparison

BENCHMARKFORK_JOIN_EXECUTORPARALLEL_EXECUTORSCHEDULER_EXECUTOR
For Each=(=)(=)

Info

PropertyBeforeAfter
HPX Commitd482723633bf61
HPX Datetime2023-01-12T14:41:15+00:002023-01-29T20:33:09+00:00
Datetime2023-01-12T16:07:32.649261+01:002023-01-29T22:23:19.701536+01:00
Hostnamenid00267nid00446
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Clusternamedaintdaint
Envfile

Comparison

BENCHMARKNO-EXECUTOR
Future Overhead - Create Thread Hierarchical - Latch--

Info

PropertyBeforeAfter
HPX Commitda01e78633bf61
HPX Datetime2023-01-18T08:41:20+00:002023-01-29T20:33:09+00:00
Datetime2023-01-18T09:57:57.669847+01:002023-01-29T22:23:39.771520+01:00
Hostnamenid00005nid00446
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Clusternamedaintdaint
Envfile

Comparison

BENCHMARKFORK_JOIN_EXECUTOR_DEFAULT_FORK_JOIN_POLICY_ALLOCATORPARALLEL_EXECUTOR_DEFAULT_PARALLEL_POLICY_ALLOCATORSCHEDULER_EXECUTOR_DEFAULT_SCHEDULER_EXECUTOR_ALLOCATOR
Stream Benchmark - Add(=)(=)(=)
Stream Benchmark - Scale(=)(=)(=)
Stream Benchmark - Triad(=)(=)(=)
Stream Benchmark - Copy(=)(=)=

Info

PropertyBeforeAfter
HPX Commit52952d8633bf61
HPX Datetime2023-01-17T08:25:42+00:002023-01-29T20:33:09+00:00
Datetime2023-01-17T09:44:28.090718+01:002023-01-29T22:23:55.014954+01:00
Hostnamenid00005nid00446
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0
Clusternamedaintdaint
Envfile

Explanation of Symbols

SymbolMEANING
=No performance change (confidence interval within ±1%)
(=)Probably no performance change (confidence interval within ±2%)
(+)/(-)Very small performance improvement/degradation (≤1%)
+/-Small performance improvement/degradation (≤5%)
++/--Large performance improvement/degradation (≤10%)
+++/---Very large performance improvement/degradation (>10%)
?Probably no change, but quite large uncertainty (confidence interval with ±5%)
??Unclear result, very large uncertainty (±10%)
???Something unexpected…

@StellarBot
Copy link

Performance test report

HPX Performance

Comparison

BENCHMARKFORK_JOIN_EXECUTORPARALLEL_EXECUTORSCHEDULER_EXECUTOR
For Each(=)(=)(=)

Info

PropertyBeforeAfter
HPX Datetime2023-01-12T14:41:15+00:002023-01-30T23:04:43+00:00
HPX Commitd4827236f8c7b6
Hostnamenid00267nid00025
Clusternamedaintdaint
Envfile
Datetime2023-01-12T16:07:32.649261+01:002023-01-31T00:15:38.520013+01:00
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0

Comparison

BENCHMARKNO-EXECUTOR
Future Overhead - Create Thread Hierarchical - Latch??

Info

PropertyBeforeAfter
HPX Datetime2023-01-18T08:41:20+00:002023-01-30T23:04:43+00:00
HPX Commitda01e786f8c7b6
Hostnamenid00005nid00025
Clusternamedaintdaint
Envfile
Datetime2023-01-18T09:57:57.669847+01:002023-01-31T00:15:59.154271+01:00
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0

Comparison

BENCHMARKFORK_JOIN_EXECUTOR_DEFAULT_FORK_JOIN_POLICY_ALLOCATORPARALLEL_EXECUTOR_DEFAULT_PARALLEL_POLICY_ALLOCATORSCHEDULER_EXECUTOR_DEFAULT_SCHEDULER_EXECUTOR_ALLOCATOR
Stream Benchmark - Add(=)(=)(=)
Stream Benchmark - Scale(=)(=)(=)
Stream Benchmark - Triad(=)(=)(=)
Stream Benchmark - Copy(=)(=)(=)

Info

PropertyBeforeAfter
HPX Datetime2023-01-17T08:25:42+00:002023-01-30T23:04:43+00:00
HPX Commit52952d86f8c7b6
Hostnamenid00005nid00025
Clusternamedaintdaint
Envfile
Datetime2023-01-17T09:44:28.090718+01:002023-01-31T00:16:14.356514+01:00
Compiler/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0/apps/daint/SSL/HPX/packages/llvm-11.0.0/bin/clang++ 11.0.0

Explanation of Symbols

SymbolMEANING
=No performance change (confidence interval within ±1%)
(=)Probably no performance change (confidence interval within ±2%)
(+)/(-)Very small performance improvement/degradation (≤1%)
+/-Small performance improvement/degradation (≤5%)
++/--Large performance improvement/degradation (≤10%)
+++/---Very large performance improvement/degradation (>10%)
?Probably no change, but quite large uncertainty (confidence interval with ±5%)
??Unclear result, very large uncertainty (±10%)
???Something unexpected…

@JiakunYan
Copy link
Contributor Author

@hkaiser This test failed: tests.unit.modules.runtime_components.distributed.tcp.migrate_polymorphic_component in 6105-clang-11-debug

Do you think it is related to this PR?

@hkaiser
Copy link
Member

hkaiser commented Feb 2, 2023

@hkaiser This test failed: tests.unit.modules.runtime_components.distributed.tcp.migrate_polymorphic_component in 6105-clang-11-debug

Do you think it is related to this PR?

No, this is a known issue and unrelated to your work.

@JiakunYan
Copy link
Contributor Author

No, this is a known issue and unrelated to your work.

Then I think this PR is ready to merge.

@JiakunYan
Copy link
Contributor Author

@hkaiser Is there anything else I should do before we merge this PR?

Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@hkaiser
Copy link
Member

hkaiser commented Feb 9, 2023

bors merge

bors bot pushed a commit that referenced this pull request Feb 9, 2023
6105: Optimizations on LCI parcelport: merge small messages; remove sender mutex lock. r=hkaiser a=JiakunYan

## Changes
  - Adapt to LCI v1.7.2 CMakeList.txt changes: LCI_PM_BACKEND renamed to LCI_PM_BACKEND_DEFAULT; new object lci-ucx (the ucx registration cache) to install and export; renamed include directory.
  - Send header, data (non-zero-copy chunks), and transmission chunks in a single message if possible
  - Reduce the thread contention on the sender side: replace sync with completion queue: remove mutex lock on sender_connection.

Co-authored-by: Jiakun Yan <jiakunyan1998@gmail.com>
@bors
Copy link

bors bot commented Feb 9, 2023

This PR was included in a batch that successfully built, but then failed to merge into master (it was a non-fast-forward update). It will be automatically retried.

bors bot pushed a commit that referenced this pull request Feb 9, 2023
6105: Optimizations on LCI parcelport: merge small messages; remove sender mutex lock. r=hkaiser a=JiakunYan

## Changes
  - Adapt to LCI v1.7.2 CMakeList.txt changes: LCI_PM_BACKEND renamed to LCI_PM_BACKEND_DEFAULT; new object lci-ucx (the ucx registration cache) to install and export; renamed include directory.
  - Send header, data (non-zero-copy chunks), and transmission chunks in a single message if possible
  - Reduce the thread contention on the sender side: replace sync with completion queue: remove mutex lock on sender_connection.

Co-authored-by: Jiakun Yan <jiakunyan1998@gmail.com>
@bors
Copy link

bors bot commented Feb 9, 2023

Timed out.

@hkaiser hkaiser merged commit f11a351 into STEllAR-GROUP:master Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants