Server Lag

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

glasspelican

New Member
Jul 29, 2019
187
0
0
death could you run these commands in a terminal and post the output
Code:
sudo lshw -class cpu -class memory -sanitize
java -version
 

deathdragonaw

New Member
Jul 29, 2019
21
0
0
1: "sudo: lshw: command not found"
2: "java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~10.04.2)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)"
 

glasspelican

New Member
Jul 29, 2019
187
0
0
is java1.6 the latest version for ubuntu 10.04?
Im running ubuntu 12.04
java version "1.7.0_09"
OpenJDK Runtime Environment (IcedTea7 2.3.3) (7u9-2.3.3-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)

so if red power uses any of the new features from java 1.7 that might be your crash OR ... I need your cpu model information, specificity the supported sse instruction set versions
if you install lshw and run the above command it will give you that info
Code:
sudo apt-get install lshw
 

deathdragonaw

New Member
Jul 29, 2019
21
0
0
problem solved, i created a new map with fresh server files and replaced it with my old one and the player files. The cause was somewhere in the files created from one of the mods, i guess redpower
 

glasspelican

New Member
Jul 29, 2019
187
0
0
jojo please post your system specks, ram cpu etc.
then open the terminal or command prompt and run
Code:
java -version
also post the error message.
 

deathdragonaw

New Member
Jul 29, 2019
21
0
0
My lags are still there and they get bigger and bigger, we even get kicked from the server now sometimes. I deactivated two other gameservers (minecraft with bukkit and BF2142) although they didn't use much CPU nor RAM and started the FTB server with the following line

Code:
java -Xmx2048M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=1 -jar direwolf20.jar nogui

The only change is a huge cpu usage but the lags keep existing.

CPU info:
*-memory
description: System memory
physical id: 0
size: 8GiB
*-cpu
product: Intel(R) Xeon(R) CPU E5645 @ 2.40GHz
vendor: Intel Corp.
physical id: 1
bus info: cpu@0
width: 64 bits
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat tpr_shadow vnmi flexpriority ept vpid
 

glasspelican

New Member
Jul 29, 2019
187
0
0
I recommend adding
Code:
-server
-XX:+AggressiveOpts
-XX:UseSSE=4 
-XX:+UseFastAccessorMethods
I have seen -server reduce cpu usage by 20% on some systems
sse is a data parallel instruction set, it can give a Huge speed boost if there is code that can use it, your cpu supports SSE4.2 so we tell it to use the sse4 family

then set up the parallel garbage collection
Code:
-XX:CMSFullGCsBeforeCompaction=1
-XX:+CMSParallelRemarkEnabled
-XX:+UseCMSCompactAtFullCollection
disable the old garbage collection system
Code:
-XX:+UseParNewGC -XX:+DisableExplicitGC
now even with parallel GC happening java will still stop execution of the server to do a full GC and compaction, you want that to happen as fast as possible so give it several threads, if you only give it 1 then there was no point in turning on parallel GC at all
Code:
-XX:ParallelGCThreads=4
 

deathdragonaw

New Member
Jul 29, 2019
21
0
0
Code:
java -Xmx2048M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=1 -jar direwolf20.jar nogui -server -XX:+AggressiveOpts -XX:UseSSE=4 -XX:+UseFastAccessorMethods -XX:CMSFullGCsBeforeCompaction=1 -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:ParallelGCThreads=4

started server with this, i'll test if it changed something
 

Oreo

New Member
Jul 29, 2019
3
0
0
My server lags and IDK how to fix it my specs are

Intel Pentium B950 Dual Core
4GB of RAM
Intel Graphics 2000 (Intergrated)
Only want to run a server with me and my friend.
 

glasspelican

New Member
Jul 29, 2019
187
0
0
Oreo are you running the server and client on the same computer, because that machine is going to struggle?
if its just the server then you should be fine
 

Oreo

New Member
Jul 29, 2019
3
0
0
im running it on the same comp so i play on the same comp and the server is on the same comp to..[DOUBLEPOST=1357503660][/DOUBLEPOST]Is there any possible way to do that?? like one of those java thing up there
 

glasspelican

New Member
Jul 29, 2019
187
0
0
I looked it up and your cpu supports sse4, so you should be able to use the above commands,
since your computer is a dual core you will want to change
Code:
-XX:ParallelGCThreads=4
to
Code:
-XX:ParallelGCThreads=2
the nice thing about this is you have nothing to loose by trying
 

glasspelican

New Member
Jul 29, 2019
187
0
0
you will want to do something like this
Code:
java -server -Xincgc -Xmx2G -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -cp your_jar_name_here.jar -jar your_jar_name_here.jar

you will need to change both of the "your_jar_name_here.jar" to the name of your .jar file
 

deathdragonaw

New Member
Jul 29, 2019
21
0
0
the server is kicking people again, its used to be several times during a short period. You said:

how may users are on your server? you may need to dedicate more ram
I recommend ~500M per user

then i could try allocating more RAM, cause we are 8 users but usually not only all together. The Problem is getting really annoying and killing the fun...

EDIT: First it seemed to run better, but the lags returned and the players get kicked off the server again :/