Skip to content

Commit 3923fa6

Browse files
committed
maintain ChangeLog
1 parent 5a3ecfe commit 3923fa6

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

ChangeLog

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,91 @@
11
----------------------------------------------------------------------------------------
22
Scheduled Release 8.2504.0 (aka 2025.04) 2025-04-??
3+
- 2025-03-01: imtcp: major multithreading and performance improvements
4+
This commit significantly enhances imtcp by introducing a fully
5+
functional worker thread pool, enabling true multi-threaded
6+
processing for better scalability under high loads. This is
7+
particularly beneficial when using TLS connections.
8+
9+
Notable changes:
10+
- Implemented a complete worker pool for imtcp.
11+
- Introduced the `workerthreads` config parameter for tuning
12+
concurrency.
13+
- Improved epoll efficiency by enabling edge-triggered mode.
14+
- Added starvation handling via `starvationProtection.maxReads`.
15+
- Refactored session accept logic and optimized network object
16+
handling.
17+
- Removed an obsolete network driver layer for event notification.
18+
- Fixed multiple issues related to message timing, EPOLLERR
19+
handling, and tests.
20+
- Improved performance in poll() mode by reducing redundant
21+
allocations.
22+
- Introduced new CI tests for imtcp without epoll.
23+
- Allowed disabling imtcp tests via a new configure switch.
24+
- Added new impstats counters for worker thread pool statistics.
25+
26+
Details:
27+
- The worker pool replaces an outdated experimental
28+
implementation.
29+
- If `workerthreads=1`, no worker pool is created to minimize
30+
context switches.
31+
- Moves worker pool variables inside `tcpsrv` instance to
32+
prevent conflicts.
33+
- Extracts session `accept()` logic into a dedicated function
34+
for clarity.
35+
- Fixes message ordering inconsistencies in multi-threaded
36+
scenarios.
37+
- Properly handles `EPOLLERR` notifications to improve error
38+
resilience.
39+
- Optimizes poll() mode by avoiding unnecessary reallocation
40+
of file descriptors.
41+
- Replaces the old network driver layer for event notification
42+
with a streamlined solution.
43+
- Now uses **conditional compilation** to select the best
44+
method (epoll or poll) at build time.
45+
- This significantly reduces code complexity, improves
46+
maintainability, and boosts performance.
47+
- The previous "thread pool" was a rough experiment that did
48+
not perform significantly better than single-threaded mode.
49+
- The **new implementation** allows multiple worker threads
50+
on platforms with `epoll`.
51+
- On non-epoll systems, an optimized **poll() based
52+
single-threaded approach** is used, which is expected to
53+
perform better than the old "thread pool."
54+
- Adds `pthread_setname_np` only when available to improve
55+
portability.
56+
- Fixes test cases that assumed strict message timing, which
57+
was unreliable.
58+
- Reduces test parallelism for TSAN CI runs to prevent
59+
resource exhaustion.
60+
- Moves a test case to `imdiag` to ensure stable execution.
61+
- Provides a new CI environment to verify `imtcp` behavior
62+
without epoll.
63+
- Introduces `--enable-imtcp-tests` configure switch for test
64+
flexibility.
65+
- Improves debug logging and adds better error handling for
66+
worker pool startup.
67+
68+
New configuration parameters:
69+
- `workerthreads`: Defines the number of worker threads for
70+
imtcp. If set to 1, no worker pool is created.
71+
- `starvationProtection.maxReads`: Defines the maximum number
72+
of consecutive reads a worker can perform before being
73+
interrupted to allow other sessions to be processed.
74+
75+
New impstats counters (emitted only when `workerthreads > 1`):
76+
- `runs`: Number of times the worker thread has been invoked.
77+
- `read`: Number of read calls performed by the worker.
78+
For TLS, this includes read/write calls.
79+
- `accept`: Number of `accept()` calls handled by the worker.
80+
- `starvation_protect`: Number of times a socket was sent
81+
back to the queue due to reaching the maximum number of
82+
consecutive requests, ensuring fair scheduling of sessions.
83+
84+
These changes significantly enhance rsyslog’s TCP handling
85+
performance and stability, particularly in high-volume
86+
environments.
87+
88+
Closes #5529, #5532, #5578, #5580.
389
- 2025-03-01: "fixed" clang static analyzer false positives
490
- 2025-03-01: fixed clang static analyzer detected very unlikely but possible bugs
591
----------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)