SpaceCore WIKI
English
English
  • Personal Account and Registration
    • Account registration
    • «Customer» section
    • «Finance» section
    • Account Verification (KYC)
  • Customer service
    • How do I place an order?
    • How to contact support?
    • The Game Hosting panel
    • Setting Up BILLmanager 6 for Reselling
  • Communications
    • Notifications in Telegram
    • Web Hosting Notifications
    • Using a ping bot in Telegram
  • Information board
    • Blocked ports (VPS/VDS)
    • What is IOPS?
    • VAT for the EU and UK
  • VPS and Dedicated Servers
    • How to use VPS/VDS?
    • Changing the Password for VDS
  • OS and software configuration
    • Java [Linux]
    • Screen
    • Linux Password Recovery
    • Connecting via SSH keys
    • Disabling access to Linux using a password
    • Deploying MikroTik RouterOS on VDS
  • AI
    • Deploying DeepSeek on your server in just a few clicks
  • Windows
    • RDP connection
    • Configuring the RDP connection
    • Changing the password
    • Installation via QEMU
    • How to add an IPv4
    • Download files
    • Bruteforce Windows
  • Network Setup and Security
    • No interaction with private networks
    • Working with TCPDump
    • Change MTU Value
    • Configure IPTables
    • [DNS] Temporary failure resolving...
    • Network Speed Measurement [SpeedTest]
    • How do I buy a domain name?
    • How do I direct my domain to an IP address?
    • How to Protect Your Server? Basics of Cybersecurity
  • VPN and Privacy
    • WireGuard VPN [Easy]
    • OpenVPN [Easy]
    • Outline VPN Installation
    • Installing TorrServer
    • Installing 3X UI
    • Installing Marzban
    • Proxy for Specific Websites (V2RayN)
    • Use Nekoray
  • System monitoring
    • Traffic monitoring via VnStat
    • How to use the MTR tool
    • Getting Serial Numbers of Drives
  • Administration and Backups
    • Working with FTP Repository
    • Auto-shipment of backups
    • Installing an FTP Server
    • Mounting Linux Drives
  • Web development
    • Installing Apache2
    • Installing Nginx
    • Installing PHP
    • Installing MySQL
    • Installing PhpMyAdmin
    • Let's Encrypt SSL Generation
  • Minecraft
    • Installing Minecraft Java Server
    • Installing the Minecraft Bedrock/PE server
    • Installing the BungeeCord server
    • Installing Sponge Forge 1.12.2 Kernel
    • Configuring server.properties
    • Installing the icon on the server
    • Launch Options
    • Installing a resource pack on the server
  • Hetzner Servers
    • Control Panel
    • Password change via Rescue
    • Installing the operating system
  • 🇩🇪Contabo
    • The Control Panel
    • Disk space expansion
Powered by GitBook
On this page
  • Now about the parameters themselves
  • The main flags
  • Allocation of RAM
  • Collectors of various «garbage»

These are special settings that allow you to optimize the launch and operation of the server in the future.

Be sure to keep in mind that the arguments should be selected individually for the server hardware, as well as the Java version.

Let's start with a small example:

java -jar server.jar

This is the most common script for running the server kernel, which does not specify any additional arguments.

Now about the parameters themselves

-jar — this argument specifies the type of Java file to run.

name.jar — the name of the file to run.

nogui — it runs the server without a graphical interface, because we simply do not need it.

The main flags

-xincgc - activates the «‎garbage collector», which from time to time will unload unused RAM. The collector type is automatically selected depending on the Java version.

-server - activates the server version of Java, which by default includes support for experimental flags. It also speeds up class compilation, which increases performance but increases server start time (only 64-bit systems are supported).

Allocation of RAM

The arguments support both «M » for megabytes as well as «G» for gigabytes. For example, the Xms2G argument will start a server with 2 gigabytes of RAM.

-Xmx0000M — the amount of maximum allocated memory for the server.

-Xms0000M — the amount of minimum allocated memory for the server.

-Xmn0000M — the amount of memory allocated for temporary objects

-XX:MaxPermSize=0000M — the amount of memory for PermGen Space (does not work on Java 8).

-XX:SharedReadOnlySize=0000M — the amount of memory under read-only is the space in PermGen.

Collectors of various «garbage»

-XX:+UseSerialGC — enables the garbage collector, which runs on the 1st thread.

-XX:+UseConcMarkSweepGC —includes a garbage collector that uses the power of multiple processor cores.

-XX:ConcGCThreads=2 — the number of threads for the garbage collector.

-XX:+UseG1GC — activates a new garbage collector, which divides all memory into specific sections, and, thanks to the use of multiple cores, collects unused memory from all sections.

-XX:G1HeapRegionSize=32 — the amount of RAM allocated for each section.

-XX:AutoGCSelectPauseMillis=2500 — the amount of time in milliseconds between calling the automatically selected garbage collector.

-XX:MaxGCPauseMillis=1000 —the length of time in milliseconds between calling a specific the garbage collector. For G1, GC plays the role of the maximum set interval.

-XX:SurvivorRatio=8 — the number of radius for the existence of surviving objects (the smaller the number, the more space). A larger location allows newly generated objects to exist longer before garbage collection.

-XX:TargetSurvivorRatio=90 — the amount of space as a percentage for surviving objects, which will allow you to clean up more unused objects during garbage collection.

-XX:+UseBiasedLocking — acceleration of object synchronization on multi-core processors.

-XX:+UseFastAccessorMethods — using optimized versions of method calls.

-XX:+UseFastEmptyMethods — exclusion of empty methods from compilation.

XX:+UseCompressedOops — reducing the size of the pointer, headers, and shifts inside the created objects. Depending on the code, it will save 20-60% of RAM.

In general, we got a similar script to run the server:

java -Xincgc -Xms512M -Xmx4G -XX:MaxPermSize=128M -XX:SharedReadOnlySize=30M -XX:+UseConcMarkSweepGC -XX:+UseBiasedLocking -XX:+UseFastAccessorMethods -XX:+UseCompressedOops -jar server.jar nogui
PreviousInstalling the icon on the serverNextInstalling a resource pack on the server

Last updated 1 year ago