21
21
"colab_type" : " text"
22
22
},
23
23
"source" : [
24
- " <a href=\" https://colab.research.google.com/github/thecoder-001/MineColab/blob/master /MineColab.ipynb\" target=\" _parent\" ><img src=\" https://colab.research.google.com/assets/colab-badge.svg\" alt=\" Open In Colab\" /></a>"
24
+ " <a href=\" https://colab.research.google.com/github/thecoder-001/MineColab/blob/jvm-args-cleanup /MineColab.ipynb\" target=\" _parent\" ><img src=\" https://colab.research.google.com/assets/colab-badge.svg\" alt=\" Open In Colab\" /></a>"
25
25
]
26
26
},
27
27
{
87
87
" jar_list = {'paper': 'server.jar', 'fabric': 'fabric-server-launch.jar', 'generic': 'server.jar'}\n " ,
88
88
" jar_name = jar_list[colabconfig[\" server_type\" ]]\n " ,
89
89
" \n " ,
90
+ " # Java arguments.\n " ,
91
+ " if colabconfig[\" server_type\" ] == \" paper\" :\n " ,
92
+ " server_flags = \" -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true\"\n " ,
93
+ " else:\n " ,
94
+ " server_flags = \"\" # aiker's flags might negatively impact performance on non-paper servers.\n " ,
95
+ " memory_allocation = \" -Xmx6144M -Xms6144M\"\n " ,
96
+ " \n " ,
90
97
" # Chose the tunnle service you want to use\n " ,
91
98
" # Available options: ngrok, argo\n " ,
92
99
" tunnel_service = \" argo\"\n " ,
110
117
" print('Your server address is ' + ((str(url).split('\" ')[1::2])[0]).replace('tcp://', ''))\n " ,
111
118
" \n " ,
112
119
" print('Starting server...')\n " ,
113
- " !java -Xmx6144M -Xms6144M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar $jar_name nogui\n " ,
120
+ " !java $memory_allocation $server_flags -jar $jar_name nogui\n " ,
114
121
" \n " ,
115
122
" else:\n " ,
116
123
" # Download & make argo executable\n " ,
117
124
" !wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64\n " ,
118
125
" !chmod +x cloudflared-linux-amd64\n " ,
119
126
" print('Starting server...')\n " ,
120
- " !./cloudflared-linux-amd64 tunnel --url tcp://127.0.0.1:25565 | java -Xmx6144M -Xms6144M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar $jar_name nogui\n "
127
+ " !./cloudflared-linux-amd64 tunnel --url tcp://127.0.0.1:25565 | java $memory_allocation $server_flags -jar $jar_name nogui\n "
121
128
],
122
129
"execution_count" : null ,
123
130
"outputs" : []
314
321
"outputs" : []
315
322
}
316
323
]
317
- }
324
+ }
0 commit comments