OpenSearch/x-pack/qa
Armin Braun ba2d70d8eb
Serialize Outbound Messages on IO Threads (#56961) (#57080)
Almost every outbound message is serialized to buffers of 16k pagesize.
We were serializing these messages off the IO loop (and retaining the concrete message
instance as well) and would then enqueue it on the IO loop to be dealt with as soon as the
channel is ready.
1. This would cause buffers to be held onto for longer than necessary, causing less reuse on average.
2. If a channel was slow for some reason, not only would concrete message instances queue up for it, but also 16k of buffers would be reserved for each message until it would be written+flushed physically.

With this change, the serialization happens on the event loop which effectively limits the number of buffers that `N` IO-threads will ever use so long as messages are small and channels writable.
Also, this change dereferences the reference to the concrete outbound message as soon as it has been serialized to save some more on GC.

This reduces the GC time for a default PMC run by about 50% in experiments (3 nodes, 2G heap each, loopback ... obvious caveat is that GC isn't that heavy in the first place with recent changes but still a measurable gain).
I also expect it to be helpful for master node stability by causing less of a spike if master is e.g. hit by a large number of requests that are processed batched (e.g. shard snapshot status updates) and responded to in a short time frame all at once.

Obviously, the downside to this change is that it introduces more latency on the IO loop for the serialization. But since we read all of these messages on the IO loop as well I don't see it as much of a qualitative change really and the more predictable buffer use seems much more valuable relatively.
2020-06-02 16:15:18 +02:00
..
core-rest-tests-with-security Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
evil-tests Fixes for IntelliJ IDEA 2020.1 support (#55077) 2020-04-10 11:57:48 -07:00
full-cluster-restart Move bwcVersions extension property to BuildParams (back port) (#56381) 2020-05-11 09:39:13 +02:00
kerberos-tests Suppress Kerberos tests on JDK15 (#56767) 2020-05-15 07:41:04 +01:00
multi-cluster-search-security Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
multi-cluster-tests-with-security Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
multi-node Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
oidc-op-tests Encore consistent compile options across all projects (#54120) 2020-03-25 08:24:21 -07:00
openldap-tests Rename META_DATA to METADATA 2020-03-31 17:30:51 -04:00
password-protected-keystore Adjust reload keystore test to pass in FIPS (#57050) (#57133) 2020-05-26 11:21:50 +03:00
reindex-tests-with-security Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
rolling-upgrade [TEST] Fix more allowed warnings for composable template rename (#57398) 2020-05-31 18:14:48 +01:00
rolling-upgrade-basic Move bwcVersions extension property to BuildParams (back port) (#56381) 2020-05-11 09:39:13 +02:00
rolling-upgrade-multi-cluster Improvement usage of gradle task avoidance api (#56627) (#56981) 2020-05-25 09:37:33 +02:00
saml-idp-tests Encore consistent compile options across all projects (#54120) 2020-03-25 08:24:21 -07:00
security-client-tests Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
security-example-spi-extension Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
security-migrate-tests Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
security-setup-password-tests Backport: Deprecate the kibana reserved user (#54967) (#55822) 2020-04-28 10:30:25 -04:00
security-tools-tests Validate hashing algorithm in users tool (#55628) (#55734) 2020-04-27 12:23:41 +03:00
smoke-test-plugins [7.x] Lazy test cluster module and plugins (#54852) (#55087) 2020-04-13 10:53:35 -05:00
smoke-test-plugins-ssl Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
smoke-test-security-with-mustache Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
src/main/java/org/elasticsearch/xpack/test Add error_trace parameter to REST test helper (#54259) 2020-03-26 14:04:52 +00:00
third-party Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
transport-client-tests Serialize Outbound Messages on IO Threads (#56961) (#57080) 2020-06-02 16:15:18 +02:00
build.gradle [7.x] Smarter copying of the rest specs and tests (#52114) (#52798) 2020-02-26 08:13:41 -06:00