All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
running css servers on a vps
Hey,
I would like to host two little counter-strike sources servers as I didn't find a server running these two game mods. The servers have 16 slots each, although there won't be more than 8 players normally as the servers are quite new and unknown. I already ran one server on a VPS with 2 Core (800Mhz capped) and 256MB ram. This worked fine. Now I switched over to a VPS with the following specs:
1 core (2100Mhz)
384MB Memory
192MB Swap
Running both gameservers (without players) + debian needs about 175MB ram, which is fine. I don't expect that more players need more than 210MB ram. But I noticed that the VPS is switching the css servers from ram to vswap after some time. I assume that happens because the css servers are empty, anyway I think that the VPS doesn't switch them back to ram if there are players. My question is now, would it make sense to ask my provider to disable my vSwap so it always runs in ram? Futhermore, do you have any suggestions regarding hosting css servers on a VPS?
Thanks
Comments
Ideally for gameservers you would want faster cores, plus with that little ram I doubt it could handle two full source servers running which is probably why its swapping.
I once read about "swappiness" or so, which apparently lets you define how quickly swap is used (?).
I ran a CS:GO server once and it never appeared in the server list.
create a script and do a mapchange or restart it if the server is emtpy every 20-30 minutes.
@catalystium
Yeah I don't expect the VPS to handle 2x16 slots fully used. But that won't happen.
@4n0nx
Thanks. This sounds great, but I read that this has something to do with the kernel and I assume it won't work on my OpenVZ VPS.
@Infinity580
Do you have a script like that?
@trexos https://github.com/Austinb/GameQ there are a lot of examples to get details such as which map, how many players are on the Server. Just run a bash script on your Server which reads the PHP output.
I am using it, to detect from outside if a Gameserver crashed, it works pretty well.
Wait. You are talking about vswap not swap, right?
Vswap is not just a swap space.
I mean the Swap which I see with htop or free -m. I assume I can't say if this is normal Swap (on HDDs) or vSwap (in ram)?
The sum of physpages.limit and swappages.limit limits the maximum amount of memory which can be used by a container. When physpages limit is reached, memory pages belonging to the container are pushed out to so called virtual swap (vswap). The difference between normal swap and vswap is that with vswap no actual disk I/O usually occurs. Instead, a container is artificially slowed down, to emulate the effect of the real swapping. Actual swap out occurs only if there is a global memory shortage on the system. 1
So if you are using OpenVZ I guess the vswap is still running inside RAM. Since only (almost) useless things will be put in vswap, the overall performance impact should not be very large. Unless the host server memory is heavily oversold.
OpenVZ or KVM?
104.224.145.204:27015 , BWH, NL, 128MB and swapped 36MB full no issues. I would say it dosent matter.
@itgods
Ok so with OpenVZ I always have vSwap, which should still run in RAM (but slowed down) and only when there is no RAM it runs on the HDD?
Is it true to say that with KVM I always have Swap (running on a HDD)?
OpenVZ
Thanks, but I think my server uses more ressources as I'm running a few plugins.
Really you want more ram and cpu then that.
In my opinion you need at least 1 GB ram and 2 core's to run 2 css servers, if you have problems now without any players think what will happen when the servers will be full..
As well as you want a little extra for disk cache and other things.
The graph you post means:
total 57+33MB in use. 57MB are in full speed and 33MB is a little bit slower. Linux swap out some memory pages that are not in use at that moment, and free some physical memory to cache your hard drive files and improve overall performance.
These servers won't be full too soon, as they are quite new and unknown. I don't want to invest that much money probably for nothing. If the average player number increases I'll upgrade this VPS for sure, but at the moment I don't see a reason to do so.
This isn't my graph, it's from @Infinity580. Mine looks like this:
do you think a online.net kidechire server would be better to host these two gameservers?
Kidechire has a weak CPU. Idk if it's enough for CSS servers with multiple players and lots of action.
I think it'll do fine (looking @ benchmarks)
@trexos Depends, N2800 can keep 18-22 Slots TF/CSS per Core (x2), so Kidereche should hold i think 12-16 Slots but thats it. From what i tested it.
But its dedicated, so you should have no laggs. Still cheap for 2,40EUR for 12/16 Slots.
>
>
Oops I misread that.
IMHO your server is in perfect condition for the moment.
And no unless that's cheaper than this. Don't upgrade if current server is running well.