-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate Java 21 and Jruby compatibility #15342
Comments
As reported in jruby/jruby#8061 (comment) JDK 21 |
As reported in jruby/jruby#8061 (comment) the fix will be included in JRuby java.util.LinkedHashSet.remove_method(:map) rescue nil in rspec bootstrap script: logstash/lib/bootstrap/rspec.rb Line 18 in 4e98aa8
|
Analysis of removal of Preventive GC flag on LogstashDefinition of which problem preventive GC was intended to resolveJDK 17 introduced the flag Elasticsearch use caseElasticsearch data node load a lot of 4MB byte[] chuncks of data to be passed down to ML node(but happens also in other case, not limited only to ML case). This generate a lot of humogous allocations (humongous objects are object with size >= 1/2 of region size), in general a spike in allocations would generate an OOM error in the JVM, but ES is able to protect against it with a circuit breaker, and exactly that showed up with a lot circuit breaker exceptions with the memory stying high insted of getting freed and kept lower thanks to the How ES solved the issue Logstash use caseLogstash has some peculiarities:
Queue full case So from this perspective having or not preventive GCs doesn't provide any improvement. Queue empty and fast consumers Also in this case having or not preventive GCs doesn't provide improvements. ConsiderationsGiven the discussion above, preventive GCs doesn't play an important role for Logstash memory management. How I've done some testsUsed the following pipeline, which is pretty fast and keeps the queue mostly empty:
Created a file of 4MB single line of text. wrk.method = "POST"
local f = io.open("input_sample.txt", "r")
wrk.body = f:read("*all") wrk --threads 4 --connections 12 -d10m -s wrk_send_file.lua --latency http://localhost:8080 |
Reopen because inadvertently closed by #15719 |
Closing this issue since now Logstash will support JDK 21. The discussion to decide whether we make it default its followed on a different thread. |
Java 21 is now available and we would like to make it the default for Logstash. However, we need to investigate whether it is possible provided Jruby supports it.
Deprecation list: https://docs.oracle.com/en/java/javase/21/docs/api/deprecated-list.html
Dependant tasks:
enumerable.map
raise wrong number of arguments only when Ruby script is executed from Gradle using JDK 21 jruby/jruby#8061Depending tasks:
Other Tasks
getId
been deprecated in JDK 19 and replaced bythreadId()
starting from JDK 21The text was updated successfully, but these errors were encountered: