-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a ring buffer to bulk pass tasks around, and also support creating a twin worker thread for every reactor thread. Before: ``` test iterations median mad min max allocs tasks inst thread_worker_test.1 3354 216.749us 47.062ns 216.590us 216.951us 5.000 4.000 1610844.2 thread_worker_test.10 460 2.088ms 870.335ns 2.087ms 2.089ms 70.000 58.000 25391981.4 thread_worker_test.100 61 16.465ms 1.733us 16.461ms 16.469ms 700.000 598.000 208106393.1 thread_worker_test.1000 50 19.925ms 6.187us 19.919ms 19.937ms 7007.000 5998.000 214776807.2 ``` After: ``` test iterations median mad min max allocs tasks inst thread_worker_test.1 1855 216.515us 77.552ns 216.330us 216.593us 4.000 4.000 1549639.0 thread_worker_test.10 413 2.085ms 394.971ns 2.084ms 2.086ms 40.000 40.000 24921287.6 thread_worker_test.100 113 8.518ms 3.891us 8.513ms 8.524ms 400.000 400.000 106121583.5 thread_worker_test.1000 93 10.424ms 605.968ns 10.423ms 10.426ms 4880.000 5744.000 127114775.7 ``` Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
- Loading branch information
Showing
10 changed files
with
205 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,6 @@ | |
|
||
namespace ssx { | ||
|
||
class thread_worker; | ||
class singleton_thread_worker; | ||
|
||
} // namespace ssx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.