Server Lag

  • FTB will be shutting down this forum by the end of July. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Ipzen

New Member
Jul 29, 2019
16
0
0
And nope! server was out of memory again this morgning.. How the hell can it steal all my ram just like that..

If i use the normal run.bat then it doesn't take more than 1-2 gig ram, but instead the cpu jumps like hell and have high load..
 

Ryat

New Member
Jul 29, 2019
20
0
0
Could you guys help me config my bat file too please?

Chip: amd fx-6100 Zambezi 3.3ghz socket am3+
Mobo: asrock 970 pro3 am3+ amd970
Ram: 16gb ddr3 1333 (will be upgraded to 32gb in a couple days)
Graphics: old 128mb GeForce
Os: Ubuntu 12.04

java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

Using direwolf20 version 4. The server is the only thing running on the computer.

I have between 5-10 people on during the night. 15-25 through the day. It's not the Internet. I'm at 10% bandwidth, maybe, when I have that many people.

I have bukkitforge installed. -nogui in .bat already.

I'd like all 6 cores running for the server and the max I can allocate to the thing in every regard.

We get block lag around 15 people. Only I have access to Mystcraft and it does lag the server bad if I use it.

Portal gun has been removed.

Please help me max this .bat file

Thank you
 

glasspelican

New Member
Jul 29, 2019
187
0
0
@lpzen
in java there is something called the heap
when the program needs memory its taken from the heap
when a program is done with memory it is not released from the heap UNTIL the garbage collector runs
I had you turn on the incremental garbage collector, its the equivalent of grabbing the nearest candy wrapper and tossing it
the Parallel garbage collector runs only when you get to 90% of the max heap size, this one stops execution of the server and uses up to 4 threads to clean up, thats equivalent to ordering a dumpster for spring cleaning day
you can change the percent with this command
Code:
-XX:CMSInitiatingOccupancyFraction=90

@Ryat
I can help build a command later today but in the meantime you might want to look at this mod
http://forum.feed-the-beast.com/thr...le-entity-ticks-and-other-optimisations.6498/
also WOOOOOO UBUNTU
 

Ipzen

New Member
Jul 29, 2019
16
0
0
@lpzen
in java there is something called the heap
when the program needs memory its taken from the heap
when a program is done with memory it is not released from the heap UNTIL the garbage collector runs
I had you turn on the incremental garbage collector, its the equivalent of grabbing the nearest candy wrapper and tossing it
the Parallel garbage collector runs only when you get to 90% of the max heap size, this one stops execution of the server and uses up to 4 threads to clean up, thats equivalent to ordering a dumpster for spring cleaning day
you can change the percent with this command
Code:
-XX:CMSInitiatingOccupancyFraction=90

Thanks alot for your help! Ill be back with the result after some runtime =)
 

Ryat

New Member
Jul 29, 2019
20
0
0
@lpzen
in java there is something called the heap
when the program needs memory its taken from the heap
when a program is done with memory it is not released from the heap UNTIL the garbage collector runs
I had you turn on the incremental garbage collector, its the equivalent of grabbing the nearest candy wrapper and tossing it
the Parallel garbage collector runs only when you get to 90% of the max heap size, this one stops execution of the server and uses up to 4 threads to clean up, thats equivalent to ordering a dumpster for spring cleaning day
you can change the percent with this command
Code:
-XX:CMSInitiatingOccupancyFraction=90

@Ryat
I can help build a command later today but in the meantime you might want to look at this mod
http://forum.feed-the-beast.com/thr...le-entity-ticks-and-other-optimisations.6498/
also WOOOOOO UBUNTU
Thanks glass. Can't wait for the help.

I read that the other day. I didn't see anyone using bukkitforge with it though. I'll test it out on my personal first. Plugins "breaking" after a couple hours with bukkitforge and I couldn't get bukkit forge to play nice with fighus.

I'll test tick thread out tonight. Thanks again
 

glasspelican

New Member
Jul 29, 2019
187
0
0
this is spaced out so I could read it
Code:
java -server -Xincgc -Xmx8G -Xms2G -Xmn1G -XX:NewRatio=2
-XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048
-XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -Xnoclassgc
-oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=80
-XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection
-XX:ParallelGCThreads=4 -XX:+AggressiveOpts
-XX:+UseLargePages -XX:ReservedCodeCacheSize=1G
-cp your_jar_name_here.jar -jar your_jar_name_here.jar
 

Zach

New Member
Jul 29, 2019
40
0
0
Hi guys i was hoping i could get some help with speeding up my server too.
Model: HP Pavilion dv6 Notebook PC
Processor: AMD Turion(tm) II P520 Dual-Core Processor 2.3 GHz
Installed memory(ram): 4.00 GB(3.74 GB usable)
System type: 64bit Operating system
Java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04
java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
If you need any other information or if you can help it would be much aperciated.
Also i plan to run and play on this server with at most 5 other people, we will be running the dw20 mod pack, if theres something i need to upgarde or buy and add to help it run faster I would be interesed in doing that too if its not to expensive.

I added that mod to the server and used the java settings the recomened and it brought the tps up to 20 right away :) huge recomendation for people having trouble with lag on there server.

Glass I was wondering if you had any ideas for what I could change in the .bat file that would better suit my computer. As the ones that TT gave me were just for general use and I was hoping you could give me some ideas specifically for my comp. Also and update for the server spec's, I will be hoping to have around 10 atmost now as my server is getting more popular.
 

UncleGeorge

New Member
Jul 29, 2019
19
0
0
Are you guys wizards? :eek: How you figure what to change in the commands for a specific computer like that, magic I say! :p I wouldn't mind seeing some performance boost to my server also if that's possible!
Windows 7 64bits
Intel i7-3930K 3.2Ghz
8GB memory
GeForce GTX 670 4GB
Java 7 update 10 for 64bits
Hum, what else? We're like what, 6 top playing at once, on direwolf20 pack... Is the TickThreading the same as what you guys change to the command or if you can modify the command + using the TickThreading addon?
What I have right now after reading the TickThreading installation tips is:

Code:
java -server -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=12 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:+UseCompressedOops -XX:+AggressiveOpts -Xmx4096M -jar direwolf20.jar nogui


Thanks :D
 

Ipzen

New Member
Jul 29, 2019
16
0
0
Thanks alot for your help! Ill be back with the result after some runtime =)

Still the same...

When i run Feed the beast with orginal startfile my server gets lag and huge CPU spikes and server cpu runs on 80-90 % Runs a normal bukkitserver on same machine, that one takes 3 gig ram and jumps between 5-30 % of my CPU.
When i use my startcode it runs around 50-60 % of CPU but instead it steals all my memory..

Guess i shouldn't have a FTB server on this computer.. :p atleast not before i learned how to make it run smooth..
If someone have any clue what i can do then let me know.

here is my server status
Server specc:
OP: Windows Server 2008
Motherboard: MSI 970A.G46 SLI
CPU: AMD FX-4100 X4 4.2GHz
RAM: G.Skill 16GB CL11 2133Mhz (runs on 1600)
HDD: A-Data SSD Premier Pro SP900 128GB /(6gb/sec)
Connection: 100/100 Fiber

Code:
java -Xmx10G -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+CMSIncrementalPacing -Xincgc -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
 
PAUSE

Thanks alot for the help so far!
 

Ryat

New Member
Jul 29, 2019
20
0
0
this is spaced out so I could read it
Code:
java -server -Xincgc -Xmx8G -Xms2G -Xmn1G -XX:NewRatio=2
-XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048
-XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -Xnoclassgc
-oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=80
-XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection
-XX:ParallelGCThreads=4 -XX:+AggressiveOpts
-XX:+UseLargePages -XX:ReservedCodeCacheSize=1G
-cp your_jar_name_here.jar -jar your_jar_name_here.jar


Glass, i put in what you told me and it isnt launching the server.

Code:
java -server -Xincgc -Xmx8G -Xms2G -Xmn1G -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048-XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=4 -XX:+AggressiveOpts
-XX:+UseLargePages -XX:ReservedCodeCacheSize=1G -cp direwolf20.jar -direwolf20.jar

Did I do something wrong?

Thanks
 

Nessiroj

New Member
Jul 29, 2019
855
0
1
Not sure if there is more wrong but you atleast forgot a space here:
Code:
-XX:SoftRefLRUPolicyMSPerMB=2048-XX:+CMSParallelRemarkEnabled
;)
 

glasspelican

New Member
Jul 29, 2019
187
0
0
could you post the error your getting?
if the window is closing on you add pause on a new line after java ...
 

Ipzen

New Member
Jul 29, 2019
16
0
0
I found my problem!

Dynmap for Forge.... Uninstalled that one and now the server works perfect.
 

UncleGeorge

New Member
Jul 29, 2019
19
0
0
Welllll! I tried the TickThreading mod, for a while everything worked fine and then it made my server crash randomly and Windows kept trying to close JAVA, things got weird so I removed everything and went with my backup, so I'm back here hoping someone can help me with the command line trick as I have no clue what any of it means XD
Windows 7 64bits
Intel i7-3930K 3.2Ghz
8GB memory
GeForce GTX 670 4GB
Java 7 update 10 for 64bits
Running Direwolf20 and there is about 6 of us playing at once at most!
 

Sp0nge

New Member
Jul 29, 2019
230
0
0
If you get errors with TT please post the errorlogs in that thread so it can be fixed :)
 

Ipzen

New Member
Jul 29, 2019
16
0
0
I found my problem!

Dynmap for Forge.... Uninstalled that one and now the server works perfect.

Hmm nope.. it helped a bit to take away dynmap but it wasn't the only thing stealing my memory.. It still steals all my ram, but not so fast as before
 

CrazylikE

New Member
Jul 29, 2019
55
0
0
I would love to get one of those custom-made bat files aswell, as im currently using a bat file tailored to someone else and it might do more bad than good. We are struggling with stop lag atm, very easily notable when fightning monsters because they completly stop for a second and during that time you can still move and do whatever, but you cant hurt them, and after the second passes they speed up to catch up.. let me just say, dealing with minotaurs in labyrinth is not pleasant.

Specs:
Intel Core 2 Quad Q6600 2.4GHz
4GB RAM
Windows 7 64bit
150GB Raptor Disk 10000RPM

Thank you very much in advance!
 

glasspelican

New Member
Jul 29, 2019
187
0
0
You guys that are using computers with i7 or a quad core cpu that is less then 2 years old, with 8G or more ram,
I have tested this with a first gen mobile i5 HT dual core
Please give it a try
Code:
java -server -Xincgc -Xmx5G -Xms2G -Xmn1G -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -XX:ReservedCodeCacheSize=1G -cp your_jar_name_here.jar -jar your_jar_name_here.jar
Im sorry that I cant be more helpful at this time
 

Eoin@ClanSlots

New Member
Jul 29, 2019
2
0
0
this is spaced out so I could read it
Code:
java -server -Xincgc -Xmx8G -Xms2G -Xmn1G -XX:NewRatio=2
-XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048
-XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -Xnoclassgc
-oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=80
-XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection
-XX:ParallelGCThreads=4 -XX:+AggressiveOpts
-XX:+UseLargePages -XX:ReservedCodeCacheSize=1G
-cp your_jar_name_here.jar -jar your_jar_name_here.jar

Most of the Command lines here are very wrong and will actually negatively impact performance, this is a perfect example of one.
I am sorry, but Xnoclassgc will KILL ANY MINECRAFT SERVER.
This essentially means that nothing will ever be unloaded from ram, so it'll eventially fill up and die. This is neglecting other things like USESSE4 or Xincgc that are totally useless or ReservedCodeCacheSize where you have given the JVM a cache that is millions of times larger than needed. Next time you want to tune your server, don't read a list of random variables and think 'oh this will help'.
Use an accurate profiler, find your bottleknecks, tune, make changes, save, monitor the difference, start again.
And then you'll notice that that :
java -server -Xmx8G -jar your_jar_name.jar

Will do the same thing a lot more efficiently.