Skip to content
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

Invalid options with newer JDKs #37

Open
rakoo opened this issue Oct 6, 2023 · 1 comment
Open

Invalid options with newer JDKs #37

rakoo opened this issue Oct 6, 2023 · 1 comment

Comments

@rakoo
Copy link

rakoo commented Oct 6, 2023

Hey there, first of all thanks a lot for all you do around Bittorrent and for this project ! I've been using another one to crawl locally but as you said on the orange website it's not good if nodes are not behaving properly, so I trust your project to be much better.

I tried to run it but some of the options are so old that they were not only deprecated but removed. I'm talking about the Concurrent Mark and Sweep Garbage Collector, which has been removed in JRE 14 (see https://openjdk.org/jeps/363). There are other options as well.

Here's a diff of the options I currently use with JRE 21:

diff --git a/bin/mldht-daemon b/bin/mldht-daemon
index d8f807d..baa5ec5 100755
--- a/bin/mldht-daemon
+++ b/bin/mldht-daemon
@@ -7,14 +7,12 @@ UNLOCK="-XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions"
 # PROFILER="-agentpath:$DIR/../lib/libjprofilerti.so=port=10040,address=127.0.0.1,nowait"
 # PROFILER="-agentpath:$DIR/../lib/libyjpagent.so=listen=127.0.0.1:10040,telemetryperiod=100"
 
-GC="-Xms300m -Xmx1500M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:MaxGCPauseMillis=15 -XX:GCTimeRatio=19 -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly"
+GC="-Xms300m -Xmx1500M -XX:+UseZGC"
 
-LOG=(-Xloggc:logs/gc.log -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+HeapDumpBeforeFullGC -XX:+HeapDumpOnOutOfMemoryError "-XX:OnOutOfMemoryError=kill -9 %p")
+LOG=("-XX:OnOutOfMemoryError=kill -9 %p")
 
 DEBUG="-Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:10044,server=y,suspend=n"
 
-OPTO="-XX:+AggressiveOpts -XX:MaxInlineLevel=12 -XX:+TrustFinalNonStaticFields -XX:+AggressiveUnboxing"
-
 PERF_EVENTS="-XX:+PreserveFramePointer"
 
  • ZGC is supposed to be the newest, flashiest
  • PrntGCDateStamps doesn't exist, I removed all gc logging because I'm not going to develop on it
@the8472
Copy link
Owner

the8472 commented Oct 6, 2023

Those settings were optimized for a machine with lots of addresses and like 20k packets per second anyway. If you're running something smaller then they're not necessary and G1GC would probably work fine too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants