From f228e264fc265a2d59250cd09ce45b4a8a8ca513 Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Tue, 14 Dec 2021 18:40:40 +0100 Subject: [PATCH] Convert ScheduledTask to a struct (#2010) ### Motivation: In my previous PR https://github.com/apple/swift-nio/pull/2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially. ### Modifications: This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute` ### Result: `scheduleTask` and `execute` require one less allocation --- Sources/NIOEmbedded/Embedded.swift | 18 ++++++++----- .../MultiThreadedEventLoopGroup.swift | 9 ++++--- Sources/NIOPosix/SelectableEventLoop.swift | 9 ++++--- Sources/_NIODataStructures/Heap.swift | 15 ++++++++++- .../_NIODataStructures/PriorityQueue.swift | 5 ++++ docker/docker-compose.1604.53.yaml | 24 +++++++++--------- docker/docker-compose.1804.52.yaml | 24 +++++++++--------- docker/docker-compose.2004.54.yaml | 24 +++++++++--------- docker/docker-compose.2004.55.yaml | 25 ++++++++++--------- docker/docker-compose.2004.main.yaml | 22 ++++++++-------- 10 files changed, 103 insertions(+), 72 deletions(-) diff --git a/Sources/NIOEmbedded/Embedded.swift b/Sources/NIOEmbedded/Embedded.swift index 9b4eb885b..d5781e058 100644 --- a/Sources/NIOEmbedded/Embedded.swift +++ b/Sources/NIOEmbedded/Embedded.swift @@ -16,12 +16,15 @@ import Dispatch import _NIODataStructures import NIOCore -private final class EmbeddedScheduledTask { + +private struct EmbeddedScheduledTask { + let id: UInt64 let task: () -> Void let readyTime: NIODeadline let insertOrder: UInt64 - init(readyTime: NIODeadline, insertOrder: UInt64, task: @escaping () -> Void) { + init(id: UInt64, readyTime: NIODeadline, insertOrder: UInt64, task: @escaping () -> Void) { + self.id = id self.readyTime = readyTime self.insertOrder = insertOrder self.task = task @@ -38,7 +41,7 @@ extension EmbeddedScheduledTask: Comparable { } static func == (lhs: EmbeddedScheduledTask, rhs: EmbeddedScheduledTask) -> Bool { - return lhs === rhs + return lhs.id == rhs.id } } @@ -63,6 +66,7 @@ public final class EmbeddedEventLoop: EventLoop { /// The current "time" for this event loop. This is an amount in nanoseconds. /* private but tests */ internal var _now: NIODeadline = .uptimeNanoseconds(0) + private var scheduledTaskCounter: UInt64 = 0 private var scheduledTasks = PriorityQueue() /// Keep track of where promises are allocated to ensure we can identify their source if they leak. @@ -92,16 +96,18 @@ public final class EmbeddedEventLoop: EventLoop { @discardableResult public func scheduleTask(deadline: NIODeadline, _ task: @escaping () throws -> T) -> Scheduled { let promise: EventLoopPromise = makePromise() - let task = EmbeddedScheduledTask(readyTime: deadline, insertOrder: self.nextTaskNumber()) { + self.scheduledTaskCounter += 1 + let task = EmbeddedScheduledTask(id: self.scheduledTaskCounter, readyTime: deadline, insertOrder: self.nextTaskNumber(), task: { do { promise.succeed(try task()) } catch let err { promise.fail(err) } - } + }) + let taskId = task.id let scheduled = Scheduled(promise: promise, cancellationTask: { - self.scheduledTasks.remove(task) + self.scheduledTasks.removeFirst { $0.id == taskId } }) scheduledTasks.push(task) return scheduled diff --git a/Sources/NIOPosix/MultiThreadedEventLoopGroup.swift b/Sources/NIOPosix/MultiThreadedEventLoopGroup.swift index f38b9ca54..7ec29197b 100644 --- a/Sources/NIOPosix/MultiThreadedEventLoopGroup.swift +++ b/Sources/NIOPosix/MultiThreadedEventLoopGroup.swift @@ -338,14 +338,17 @@ extension MultiThreadedEventLoopGroup: CustomStringConvertible { } @usableFromInline -internal final class ScheduledTask { +internal struct ScheduledTask { + @usableFromInline + let id: UInt64 let task: () -> Void private let failFn: (Error) ->() @usableFromInline internal let _readyTime: NIODeadline @usableFromInline - init(_ task: @escaping () -> Void, _ failFn: @escaping (Error) -> Void, _ time: NIODeadline) { + init(id: UInt64, _ task: @escaping () -> Void, _ failFn: @escaping (Error) -> Void, _ time: NIODeadline) { + self.id = id self.task = task self.failFn = failFn self._readyTime = time @@ -378,6 +381,6 @@ extension ScheduledTask: Comparable { @usableFromInline static func == (lhs: ScheduledTask, rhs: ScheduledTask) -> Bool { - return lhs === rhs + return lhs.id == rhs.id } } diff --git a/Sources/NIOPosix/SelectableEventLoop.swift b/Sources/NIOPosix/SelectableEventLoop.swift index 9700d4dbb..57c46a4aa 100644 --- a/Sources/NIOPosix/SelectableEventLoop.swift +++ b/Sources/NIOPosix/SelectableEventLoop.swift @@ -63,6 +63,8 @@ internal final class SelectableEventLoop: EventLoop { // This may only be read/written while holding the _tasksLock. internal var _pendingTaskPop = false @usableFromInline + internal var scheduledTaskCounter = NIOAtomic.makeAtomic(value: UInt64(0)) + @usableFromInline internal var _scheduledTasks = PriorityQueue() private var tasksCopy = ContiguousArray<() -> Void>() @usableFromInline @@ -261,7 +263,7 @@ Further information: @inlinable internal func scheduleTask(deadline: NIODeadline, _ task: @escaping () throws -> T) -> Scheduled { let promise: EventLoopPromise = self.makePromise() - let task = ScheduledTask({ + let task = ScheduledTask(id: self.scheduledTaskCounter.add(1), { do { promise.succeed(try task()) } catch let err { @@ -271,9 +273,10 @@ Further information: promise.fail(error) }, deadline) + let taskId = task.id let scheduled = Scheduled(promise: promise, cancellationTask: { self._tasksLock.withLockVoid { - self._scheduledTasks.remove(task) + self._scheduledTasks.removeFirst(where: { $0.id == taskId }) } // We don't need to wake up the selector here, the scheduled task will never be picked up. Waking up the // selector would mean that we may be able to recalculate the shutdown to a later date. The cost of not @@ -301,7 +304,7 @@ Further information: @inlinable internal func execute(_ task: @escaping () -> Void) { // nothing we can do if we fail enqueuing here. - try? self._schedule0(ScheduledTask(task, { error in + try? self._schedule0(ScheduledTask(id: self.scheduledTaskCounter.add(1), task, { error in // do nothing }, .now())) } diff --git a/Sources/_NIODataStructures/Heap.swift b/Sources/_NIODataStructures/Heap.swift index e44c13f2e..05fd41b7f 100644 --- a/Sources/_NIODataStructures/Heap.swift +++ b/Sources/_NIODataStructures/Heap.swift @@ -20,7 +20,7 @@ import Glibc @usableFromInline internal struct Heap { @usableFromInline - internal private(set) var storage: ContiguousArray + internal private(set) var storage: Array @inlinable internal init() { @@ -115,6 +115,19 @@ internal struct Heap { return false } } + + @inlinable + internal mutating func removeFirst(where shouldBeRemoved: (Element) throws -> Bool) rethrows { + guard self.storage.count > 0 else { + return + } + + guard let index = try self.storage.firstIndex(where: shouldBeRemoved) else { + return + } + + self._remove(index: index) + } @discardableResult /* private but */ @inlinable diff --git a/Sources/_NIODataStructures/PriorityQueue.swift b/Sources/_NIODataStructures/PriorityQueue.swift index b40486c1d..0f1a05874 100644 --- a/Sources/_NIODataStructures/PriorityQueue.swift +++ b/Sources/_NIODataStructures/PriorityQueue.swift @@ -25,6 +25,11 @@ public struct PriorityQueue { public mutating func remove(_ key: Element) { self._heap.remove(value: key) } + + @inlinable + public mutating func removeFirst(where shouldBeRemoved: (Element) throws -> Bool) rethrows { + try self._heap.removeFirst(where: shouldBeRemoved) + } @inlinable public mutating func push(_ key: Element) { diff --git a/docker/docker-compose.1604.53.yaml b/docker/docker-compose.1604.53.yaml index aa909fa15..2062e2b70 100644 --- a/docker/docker-compose.1604.53.yaml +++ b/docker/docker-compose.1604.53.yaml @@ -18,22 +18,22 @@ services: test: image: swift-nio:16.04-5.3 environment: - - MAX_ALLOCS_ALLOWED_1000_addHandlers=47050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=40050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers=46050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=39050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=9050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=9050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=9050 - - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=29050 + - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=25050 - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet_sync=0 - MAX_ALLOCS_ALLOWED_1000_getHandlers=9050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=37 - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=30450 + - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=36 - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=4050 - - MAX_ALLOCS_ALLOWED_1000_tcpconnections=170050 - MAX_ALLOCS_ALLOWED_1000_udp_reqs=12050 + - MAX_ALLOCS_ALLOWED_1000_tcpconnections=163050 - MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050 - - MAX_ALLOCS_ALLOWED_1000_udpconnections=95050 - - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=450050 + - MAX_ALLOCS_ALLOWED_1000_udpconnections=89500 + - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=428000 - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050 - MAX_ALLOCS_ALLOWED_creating_10000_headers=0 - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050 @@ -50,12 +50,12 @@ services: - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=2050 - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=4400 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=190050 - - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=90150 - - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=100050 - - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=20150 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=180050 + - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=80150 + - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=90050 + - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=10150 - MAX_ALLOCS_ALLOWED_udp_1000_reqs_1_conn=12200 - - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=188050 + - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=177050 - SANITIZER_ARG=--sanitize=thread performance-test: diff --git a/docker/docker-compose.1804.52.yaml b/docker/docker-compose.1804.52.yaml index 75aa21f9c..931b44f36 100644 --- a/docker/docker-compose.1804.52.yaml +++ b/docker/docker-compose.1804.52.yaml @@ -18,22 +18,22 @@ services: test: image: swift-nio:18.04-5.2 environment: - - MAX_ALLOCS_ALLOWED_1000_addHandlers=47050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=40050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers=46050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=39050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=9050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=9050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=9050 - - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=32050 + - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=28050 - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet_sync=0 - MAX_ALLOCS_ALLOWED_1000_getHandlers=9050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=37 + - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=36 - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=30450 - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=4050 - - MAX_ALLOCS_ALLOWED_1000_tcpconnections=171050 - MAX_ALLOCS_ALLOWED_1000_udp_reqs=12050 + - MAX_ALLOCS_ALLOWED_1000_tcpconnections=164050 - MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050 - - MAX_ALLOCS_ALLOWED_1000_udpconnections=96050 - - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=455000 + - MAX_ALLOCS_ALLOWED_1000_udpconnections=90500 + - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=433000 - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050 - MAX_ALLOCS_ALLOWED_creating_10000_headers=0 - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050 @@ -50,12 +50,12 @@ services: - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=2050 - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=4400 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=200050 - - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=90150 - - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=100050 - - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=20150 - MAX_ALLOCS_ALLOWED_udp_1000_reqs_1_conn=12200 - - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=188050 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=190050 + - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=80150 + - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=90050 + - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=10150 + - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=177050 # - SANITIZER_ARG=--sanitize=thread broken on 18.04 - INTEGRATION_TESTS_ARG=-f tests_0[013-9] diff --git a/docker/docker-compose.2004.54.yaml b/docker/docker-compose.2004.54.yaml index 85b92f284..51fc8e8f6 100644 --- a/docker/docker-compose.2004.54.yaml +++ b/docker/docker-compose.2004.54.yaml @@ -18,22 +18,22 @@ services: test: image: swift-nio:20.04-5.4 environment: - - MAX_ALLOCS_ALLOWED_1000_addHandlers=47050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=40050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers=46050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=39050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=9050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=9050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=9050 - - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=29050 + - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=25050 - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet_sync=0 - MAX_ALLOCS_ALLOWED_1000_getHandlers=9050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=37 + - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=36 - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=30450 - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=4050 - - MAX_ALLOCS_ALLOWED_1000_tcpconnections=172050 # regression from 5.3 which was 170050 - MAX_ALLOCS_ALLOWED_1000_udp_reqs=12050 + - MAX_ALLOCS_ALLOWED_1000_tcpconnections=165050 # regression from 5.3 which was 163050 - MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050 - - MAX_ALLOCS_ALLOWED_1000_udpconnections=96050 - - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=453050 # regression from 5.3 which was 450050 + - MAX_ALLOCS_ALLOWED_1000_udpconnections=90500 + - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=431000 # regression from 5.3 which was 428000 - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050 - MAX_ALLOCS_ALLOWED_creating_10000_headers=0 - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050 @@ -50,12 +50,12 @@ services: - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=2050 - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=4400 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=190050 - - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=90150 - - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=100050 - - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=20150 - MAX_ALLOCS_ALLOWED_udp_1000_reqs_1_conn=12200 - - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=190050 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=180050 + - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=80150 + - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=90050 + - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=10150 + - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=179050 # - SANITIZER_ARG=--sanitize=thread # TSan broken still performance-test: diff --git a/docker/docker-compose.2004.55.yaml b/docker/docker-compose.2004.55.yaml index 46d975bc1..29aac3e5b 100644 --- a/docker/docker-compose.2004.55.yaml +++ b/docker/docker-compose.2004.55.yaml @@ -18,22 +18,22 @@ services: test: image: swift-nio:20.04-5.5 environment: - - MAX_ALLOCS_ALLOWED_1000_addHandlers=47050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=40050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers=46050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=39050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=9050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=9050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=9050 - - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=29050 + - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=25050 - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet_sync=0 - MAX_ALLOCS_ALLOWED_1000_getHandlers=9050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=37 + - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=36 - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=30450 - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=4050 - - MAX_ALLOCS_ALLOWED_1000_tcpconnections=172050 + - MAX_ALLOCS_ALLOWED_1000_tcpconnections=165050 - MAX_ALLOCS_ALLOWED_1000_udp_reqs=12050 - MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050 - - MAX_ALLOCS_ALLOWED_1000_udpconnections=96050 - - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=453000 + - MAX_ALLOCS_ALLOWED_1000_udpconnections=90500 + - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=431000 - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050 - MAX_ALLOCS_ALLOWED_creating_10000_headers=0 - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050 @@ -41,6 +41,7 @@ services: - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer_with_space=3 - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer=3050 - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer_with_space=3050 + - MAX_ALLOCS_ALLOWED_future_erase_result=4050 - MAX_ALLOCS_ALLOWED_future_lots_of_callbacks=60050 - MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form=700050 - MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form_trimming_whitespace=700050 @@ -49,12 +50,12 @@ services: - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=2050 - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=4400 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=190050 - - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=90150 - - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=100050 - - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=20150 - MAX_ALLOCS_ALLOWED_udp_1000_reqs_1_conn=12200 - - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=190050 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=180050 + - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=80150 + - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=90050 + - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=10150 + - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=179050 # - SANITIZER_ARG=--sanitize=thread # TSan broken still performance-test: diff --git a/docker/docker-compose.2004.main.yaml b/docker/docker-compose.2004.main.yaml index 0ea1e337f..6679baad3 100644 --- a/docker/docker-compose.2004.main.yaml +++ b/docker/docker-compose.2004.main.yaml @@ -18,22 +18,22 @@ services: test: image: swift-nio:20.04-main environment: - - MAX_ALLOCS_ALLOWED_1000_addHandlers=47050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=40050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers=46050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=39050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=9050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=9050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=9050 - - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=28050 + - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=24050 - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet_sync=0 - MAX_ALLOCS_ALLOWED_1000_getHandlers=9050 - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=37 - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=30450 - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=4050 - - MAX_ALLOCS_ALLOWED_1000_tcpconnections=168050 + - MAX_ALLOCS_ALLOWED_1000_tcpconnections=161050 - MAX_ALLOCS_ALLOWED_1000_udp_reqs=12050 - MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050 - - MAX_ALLOCS_ALLOWED_1000_udpconnections=93050 - - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=450050 + - MAX_ALLOCS_ALLOWED_1000_udpconnections=87050 + - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=428050 - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050 - MAX_ALLOCS_ALLOWED_creating_10000_headers=0 - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050 @@ -50,12 +50,12 @@ services: - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=2050 - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=4400 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=160050 - - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=90150 - - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=100050 - - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=20150 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=150050 + - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=80150 + - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=90050 + - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=10150 - MAX_ALLOCS_ALLOWED_udp_1000_reqs_1_conn=12200 - - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=188050 + - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=177050 # - SANITIZER_ARG=--sanitize=thread # TSan broken still performance-test: