Skip to content

IoUring: Submit after completion queue was processed#14696

Merged
normanmaurer merged 1 commit into
4.2from
submit_after_run
Jan 18, 2025
Merged

IoUring: Submit after completion queue was processed#14696
normanmaurer merged 1 commit into
4.2from
submit_after_run

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Motivation:

We should try to submit one more time after we did run all completions. Otherwise we might introduce latency that will hurt performance.

Modifications:

Add one more submit call.

Result:

Better troughput.

Before the change:

Destination: [127.0.0.1]:8088
Interface lo address [127.0.0.1]:0
Using interface lo to connect to [127.0.0.1]:8088
Ramped up to 1 connections.
Total data sent:     134066.2 MiB (140578586624 bytes)
Total data received: 134066.1 MiB (140578537472 bytes)
Bandwidth per channel: 74755.196⇅ Mbps (9344399.5 kBps)
Aggregate bandwidth: 37377.591↓, 37377.605↑ Mbps
Packet rate estimate: 3424327.9↓, 3208145.5↑ (12↓, 45↑ TCP MSS/op)
Test duration: 30.0883 s.

After this change:

Destination: [127.0.0.1]:8088
Interface lo address [127.0.0.1]:0
Using interface lo to connect to [127.0.0.1]:8088
Ramped up to 1 connections.
Total data sent:     250820.2 MiB (263004028928 bytes)
Total data received: 250812.7 MiB (262996131840 bytes)
Bandwidth per channel: 139956.971⇅ Mbps (17494621.4 kBps)
Aggregate bandwidth: 69977.435↓, 69979.536↑ Mbps
Packet rate estimate: 6406626.3↓, 6006391.8↑ (12↓, 45↑ TCP MSS/op)
Test duration: 30.0664 s.

Motivation:

We should try to submit one more time after we did run all completions. Otherwise we might introduce latency that will hurt performance.

Modifications:

Add one more submit call.

Result:

Better troughput.

Before the change:
```
Destination: [127.0.0.1]:8088
Interface lo address [127.0.0.1]:0
Using interface lo to connect to [127.0.0.1]:8088
Ramped up to 1 connections.
Total data sent:     134066.2 MiB (140578586624 bytes)
Total data received: 134066.1 MiB (140578537472 bytes)
Bandwidth per channel: 74755.196⇅ Mbps (9344399.5 kBps)
Aggregate bandwidth: 37377.591↓, 37377.605↑ Mbps
Packet rate estimate: 3424327.9↓, 3208145.5↑ (12↓, 45↑ TCP MSS/op)
Test duration: 30.0883 s.
```

After this change:
```
Destination: [127.0.0.1]:8088
Interface lo address [127.0.0.1]:0
Using interface lo to connect to [127.0.0.1]:8088
Ramped up to 1 connections.
Total data sent:     250820.2 MiB (263004028928 bytes)
Total data received: 250812.7 MiB (262996131840 bytes)
Bandwidth per channel: 139956.971⇅ Mbps (17494621.4 kBps)
Aggregate bandwidth: 69977.435↓, 69979.536↑ Mbps
Packet rate estimate: 6406626.3↓, 6006391.8↑ (12↓, 45↑ TCP MSS/op)
Test duration: 30.0664 s.
```
@franz1981
Copy link
Copy Markdown
Contributor

I like it, and makes sense

@franz1981
Copy link
Copy Markdown
Contributor

The same could happen after we drain completion on writability changed

@normanmaurer
Copy link
Copy Markdown
Member Author

The same could happen after we drain completion on writability changed

Yeah but these will be handled by this submit as well... we also don't want to call submit too often as it's a syscall

Copy link
Copy Markdown
Contributor

@franz1981 franz1981 left a comment

Choose a reason for hiding this comment

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

Looks great 😃 you're rocking here - let's make this fly

@chrisvest
Copy link
Copy Markdown
Member

How's it looking compared to NIO and epoll now, in this test?

@normanmaurer
Copy link
Copy Markdown
Member Author

How's it looking compared to NIO and epoll now, in this test?

4-5% slower... almost there ;)

@normanmaurer normanmaurer merged commit 595a07d into 4.2 Jan 18, 2025
@normanmaurer normanmaurer deleted the submit_after_run branch January 18, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants