Limit processor for server

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

Juanitierno

New Member
Jul 29, 2019
579
0
0
Hello!

I would like to use my companie's server for hosting a FTB server for a couple friends.

Right now im using a virtual server under vmware on a different physical machine where im able to throttle the max CPU to a fraction of the physical CPU.

The thing is our new server is not virtualized, so i dont know of a way to prevent the FTB server from eating up all the processor.

Is there a command line option to set the max CPU % at a certain level?
 

Hydra

New Member
Jul 29, 2019
1,869
0
0
Why is it a problem that it's using 100% CPU? If two processes need CPU they will be sharing the available CPU.
 

Juanitierno

New Member
Jul 29, 2019
579
0
0
Because its a company server, where many processes run that are considered critial.

Unfortunately my FTb server is not one of them...

I tried lowering the process priority, but still has too much of an effect on the rest of the stuff running.
 

NightKev

New Member
Jul 29, 2019
127
0
0
Well, you shouldn't be running a video game server on a company machine anyway...

There are programs that can throttle the CPU usage of other programs (eg: Process Lasso), but afaik no JVM argument to do as such.
 

Juanitierno

New Member
Jul 29, 2019
579
0
0
Well, you shouldn't be running a video game server on a company machine anyway...

There are programs that can throttle the CPU usage of other programs (eg: Process Lasso), but afaik no JVM argument to do as such.

How about limiting the server to stick to a single processor? (the server is quad core).

Does it do that naturally for most of the stuff? Not sure how multithreaded MC is...
 

KirinDave

New Member
Jul 29, 2019
3,086
0
0
The UNIX command you're looking for is nice.

The usual way I start my minecraft server is to use a tool like GNU Screen or Tmux (I prefer the later) to launch the server. I usually give it -Xmx2G -Xms1G if it's going to be using 1-10 people (you'd use much more if you have more than 10 industrious players using chunkloaders), with a nice increment of 5ish.

Example: nice -n 5 java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
 

Juanitierno

New Member
Jul 29, 2019
579
0
0
Thank you, but the server is windows based.
Its cool to see theres an option to do it, at least for linux users
 

Sphinx2k

New Member
Jul 29, 2019
195
0
0
You can open the task manager find the right java process and set the processor affinity for this task, so you can use only one processor core for the server.
A long time ago i wrote myself a program to set the affinity automatic when starting Warcraft 3 i think..because i got funny if windows moved the process from one core to another.