Jump to content

MC server lagging but server resources not being fully utilized.

Foxface918

Hi,

I'm trying to run a Minecraft server on my server but I keep having lag backs, block lag and chunks not loading. The resources that I allocated do not seem to be being used. I am running 2 Xeon x5650 32 GB of ram (only 15 GB is allocated to the sever but it is only using 5 GB) and a 300 Mbps up and down internet connection with 3 ping. The server is vanilla. 10 ish people play on the server but it lags with as little as 2 people on at a time.

This is the stat.bat script that I am using.

java -jar -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=7 -XX:+AggressiveOpts -Xms5G -Xmx15G -jar server.jar
pause

The notification that I get when it lags:

Can't keep up! Is the server overloaded? Running 4109ms or 82 ticks behind
and 
Boat (vehicle of <Player>) moved too quickly!

Timage.png.ff8a9fbc716a32db6066c3077f5a4474.png

image.png.7c31d170478be17afb2814dc97a6589f.png

Link to comment
Share on other sites

Link to post
Share on other sites

Try dropping XMS down to 512M or so. Too big causes issues, and realistically it'll allocate more ram as is needed.

Main: AMD Ryzen 7 5800X3D, Nvidia GTX 1080 Ti, 16 GB 4400 MHz DDR4 Fedora 38 x86_64

Secondary: AMD Ryzen 5 5600G, 16 GB 2667 MHz DDR4, Fedora 38 x86_64

Server: AMD Athlon PRO 3125GE, 32 GB 2667 MHz DDR4 ECC, TrueNAS Core 13.0-U5.1

Home Laptop: Intel Core i5-L16G7, 8 GB 4267 MHz LPDDR4x, Windows 11 Home 22H2 x86_64

Work Laptop: Intel Core i7-10510U, NVIDIA Quadro P520, 8 GB 2667 MHz DDR4, Windows 10 Pro 22H2 x86_64

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Foxface918 said:

I am running 2 Xeon x5650

of which all but the handling of network traffic is in one thread. (and maybe terrain gen, i'm not sure how much of that is split off too)

but essentially any world changes (breaking and placing blocks), all creatures' AI, redstone ticks, all movement, etc. is handled in a single thread.

having that said.. vanilla shouldnt be lagging to shreds, even on that processor... are you sure it's entirely vanilla? or is this bukkit with a bunch of plugins piled in?

Link to comment
Share on other sites

Link to post
Share on other sites

THat 4% cpu usage is basically the full usage of one thread. I think linux handles this a bit better, so maybe give linux a shot, but these are some old chips.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, manikyath said:

of which all but the handling of network traffic is in one thread. (and maybe terrain gen, i'm not sure how much of that is split off too)

but essentially any world changes (breaking and placing blocks), all creatures' AI, redstone ticks, all movement, etc. is handled in a single thread.

having that said.. vanilla shouldnt be lagging to shreds, even on that processor... are you sure it's entirely vanilla? or is this bukkit with a bunch of plugins piled in?

It is the new 21w06a. There should not be any thing else. I have the same issue with a 1.16.5 server too.

Link to comment
Share on other sites

Link to post
Share on other sites

Vanilla Java MC servers use 1, maybe 2, cores.

Having 2 CPUs won't help much.

Disabling all but 2-4 cores on each CPU, then overclocking the 2 CPUs would probably help the most. I certainly noticed a difference between 3.2 GHz and 3.95 GHz on my Phenom II X4 955.

elephants

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Foxface918 said:

It is the new 21w06a. There should not be any thing else. I have the same issue with a 1.16.5 server too.

what's the load like on a completely fresh, empty world?

 

also, for vanilla you're WAY overallocating your memory, i generally leave out -Xms all together, and for vanilla with a small player count i'd say 4GB will be plenty.

Link to comment
Share on other sites

Link to post
Share on other sites

No idea why you have so many flags in your start file, but I'll assume you have legitimate reasons for them.

 

 

MC servers only run on one thread so it's not surprising that 23 of your threads aren't being used. I would also switch to a Paper server instead of the official one.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, manikyath said:

what's the load like on a completely fresh, empty world?

 

also, for vanilla you're WAY overallocating your memory, i generally leave out -Xms all together, and for vanilla with a small player count i'd say 4GB will be plenty.

This is on a brand new world same issues. I just changed the -Xms 512M.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Foxface918 said:

This is on a brand new world same issues. I just changed the -Xms 512M.

what happens if you cut out all the command line arguments aside from -Xmx4G?

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, kelvinhall05 said:

No idea why you have so many flags in your start file, but I'll assume you have legitimate reasons for them.

 

 

MC servers only run on one thread so it's not surprising that 23 of your threads aren't being used. I would also switch to a Paper server instead of the official one.

The arguments are my attempt to spread the load across threads. 

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, manikyath said:

what happens if you cut out all the command line arguments aside from -Xmx4G?

It might be a little better but still laggy.

Link to comment
Share on other sites

Link to post
Share on other sites

16 minutes ago, Foxface918 said:

The arguments are my attempt to spread the load across threads. 

No offense but if multithreading an MC server was that simple then all the large ones with tens of thousands of players would be doing it...

 

 

Remove all but your min and max RAM limits, lower your minimum to 1024M/1G, and your server should run better. Then switch to Paper because the official server is trash, and it'll run even better.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, kelvinhall05 said:

No offense but if multithreading an MC server was that simple then all the large ones with tens of thousands of players would be doing it...

 

 

Remove all but your min and max RAM limits, lower your minimum to 1024M/1G, and your server should run better. Then switch to Paper because the official server is trash, and it'll run even better.

Yeah I know that didn't really work but it was worth a shot. I don't think there is a paper version for 21w06a yet.

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, kelvinhall05 said:

Then switch to Paper because the official server is trash, and it'll run even better.

a plain empty vanilla server shouldnt be filling an entire core, even of a very poor hardware pick like this one.. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, manikyath said:

a plain empty vanilla server shouldnt be filling an entire core, even of a very poor hardware pick like this one.. 

I have another system with a Phenom II X4 of some kind but only 8Gb of ram. Would that be better?

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×