Hey, I plan to do an upgrade to host multiple servers on the same machine within a couple of hours, and need a question answered fast!
I host Garry's Mod servers, and plan to open another 2 on a VDS.
Would I need to set the affinity of each game server, or is there no difference leaving as-is (performance loss)? If yes, then how would I do it so when I run a .sh script, it automatically assigns this server to core 1, this server to core 2, etc instead of starting the servers, checking the PID's, and typing the commands to assign the servers to the cores.
Thanks!
Multiple Servers
-
- A regular
- Posts: 33
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Sat Mar 29, 2014 6:15 pm
Re: Multiple Servers
You don't need to do this and I don't recommend doing so, letting the OS handle it is normally the best option.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
Re: Multiple Servers
The VDS is running Debian 7.
I will let the servers run without affinity set for now, and monitor to see if there is somewhat extra performance I can gain if I set affinity's.
Thank you!
I will let the servers run without affinity set for now, and monitor to see if there is somewhat extra performance I can gain if I set affinity's.
Thank you!
Re: Multiple Servers
I left the servers running without taskset set on them, and it was bad.
There was major performance loss on both servers. As one of the CPU's was 100%, it jumped to the second CPU. With this happening 66 times a second on each server, the tickrate was jumping up and down continuously, thus causing mini lag spikes.
I set taskset on each server so it has its own core to run on, and I gained a lot more performance. But I had to do this by manually typing the command in a SSH window after the server started up.
My issue here is if there is a way I can automatically assign this server to start up to its affinity set to this core. I am not here 24/7, so I can't manually do it. And when the server crashes, the PID changes and it automatically assigns itself to all cores. Is there some kind of script or cronjob I can use to automatically assign this server to core 1, and the other to core 2, and so on anytime it starts up?
Really need help with this fast!
There was major performance loss on both servers. As one of the CPU's was 100%, it jumped to the second CPU. With this happening 66 times a second on each server, the tickrate was jumping up and down continuously, thus causing mini lag spikes.
I set taskset on each server so it has its own core to run on, and I gained a lot more performance. But I had to do this by manually typing the command in a SSH window after the server started up.
My issue here is if there is a way I can automatically assign this server to start up to its affinity set to this core. I am not here 24/7, so I can't manually do it. And when the server crashes, the PID changes and it automatically assigns itself to all cores. Is there some kind of script or cronjob I can use to automatically assign this server to core 1, and the other to core 2, and so on anytime it starts up?
Really need help with this fast!
Re: Multiple Servers
I found two forum posts that are related to the problem I am having, and seem like good solutions. But I am having difficulty setting this up.
Posts:
http://www.linux-noob.com/forums/index. ... c-cpu-smp/
http://www.linux-noob.com/forums/index. ... processes/
So for the second post, I created the .sh file and put it in the directories of each server. For the first post, I then tried to do: part, and it failed. It kept spitting out "No such file or directory" or sometimes "Permission denied."
This is what I used:
but it keeps spitting out "No such file or directory."
So then I did:
and it spat out "Permission denied."
I don't know how to set the location of the .sh file for this command. Please help!
Posts:
http://www.linux-noob.com/forums/index. ... c-cpu-smp/
http://www.linux-noob.com/forums/index. ... processes/
So for the second post, I created the .sh file and put it in the directories of each server. For the first post, I then tried to do:
Code: Select all
screen -m -d -s -- taskset -c 3 ./server1.sh
This is what I used:
Code: Select all
taskset -c 0 /home/steam/servers/server_test/autorestart.sh
So then I did:
Code: Select all
taskset -c 0 /home/steam/servers/ ./autorestart.sh
I don't know how to set the location of the .sh file for this command. Please help!