I switched a number of years ago from Windows to Linux, and from a truly "dedicated server" to a "virtual-private server" (VPS), and also later from CentOS flavor of Linux to Debian flavor. Some observations that might help are outlined below. I am sure there are plenty of other Linux admins with even more experience than me on these distribution lists. So caveat that what follows is based on my own experiences (limited or otherwise).
Part-1: Regarding Windows-to-Linux transition:
------
1a) I have to say over-all, Linux dedicated servers are way, way, way more
stable than equivalent under Windows. I still restart my game servers
regularly (HLDS/SCRDS that is - not the OS) - but largely out of
force-of-habit or known/buggy plug-ins (like bots). However, I rarely ever
have to reboot the OS - that's more precautionary after doing a bunch of
patches.
1b) Definitely a lot of learning curve for admins' not familiar with Linux.
It's just a completely different way of doing things. Learn the hard-way
- name every file possible in lower case!
1c) "Headless" installation - no GUI. No "desktop short-cuts" to start
stuff, no VNC, etc. Connect via SSH using "PuTTY" or similar client.
1d) I learned to use the "screen" utility (Google it) to run everything as
disconnected background processes that I can re-connect to at will from any
SSH connection. So, for new Linux game-server admins - that's like #1
friend.
1e) "Webmin" (Google it) is key for basic Linux administration for admins
transitioning without Linux experience. So, that's like #2 friend for
transitioning admins. It also has a mobile-friendly "theme" that can be
used to access it from mobile browsers, etc. Just be sure to put some SSL
cert on the site (it might do that by default now in latest versions).
Also, if you are new to Linux host-based firewalling ("iptables") Webmin
is a HUGE help!
1f) "bash" scripts for everything. Think of it like using Windows .CMD
files. No "desktop shortcuts". Scripts to start each game-server, scripts
to "screen" each game-server, scripts to stop each "screen'd" game-server,
etc
.
1g) Put all those scripts into "Webmin", in it's "Custom Commands" section.
That way you can invoke them from the web-interface. This is incredibly
handy for updating game-servers (like TF2) right after the updates are
released. I don't have to be in-game, I can do it from my phone from
wherever I am without a computer.
1h) "nice" (Google it) is your friend. Use it to de-prioritize backup
scripts, update scripts, etc. I use this to ensure that when I am updating
one game-server, the others are not effected. I also "nice" game-servers
themselves - but typically do a single-digit value (5-9). I use "nice" to
force update and back scripts to be higher nice value (15-19) - meaning
de-prioritize those.
Part-2: Transition to Virtual Private Server (VPS)
------
2a) Not all VPS providers are created equal. Most really only geared
toward serving web-sites - not "applications". Many just suck frankly.
Some only offer 1 or 2 standard plans (i.e. they suck). While some others
allow you to select customized plans - with different levels of storage,
memory and processing (cores).
2b) Do NOT pay for a 1-year subscription up-front! Start-out paying
month-to-month. Why? So you can try it out for SEVERAL MONTHS (not just 30
days BS) to see if it's really going to work for you. After it is meeting
your performance needs for several months, then look to explore getting a
break on pricing by committing to something more long-term (1-year pre-pay,
etc.).
2c) Virtualization platforms do matter. I did a side-by-side with two
providers using different platforms. I expected "KVM" VPS with "dedicated"
resources to perform better. It definitely did NOT. I found "Virtuozzo"
and/or "OpenVN" VPS's to perform way better than KVM - given the other
caveat's below, etc. If you can get a VMware plan, that might be good too
- but all those I saw were WAY more expensive.
2d) Get some idea how much memory you need. VPS providers like to
advertise "peak" or "burst" memory usage - don't believe it. Base sizing
on "guaranteed" or "minimum" ram in the VPS rental plan. This is really
important if you run multiple game-servers, or also host databases (for
WordPress, HLStatsX:CE, etc.).
2e) Multiple "cores" (or "virtual cores") are key. At least two - even if
you are only hosting 1 game. If you are hosting 1 game plus some databases
and web-site, 2 definitely. You don't necessarily need 1 core for every
game - but that depends on how busy they get. The more cores the better
generally. In particular, I noticed that some apps (cough, some "stats"
applications, cough) seem to have really inefficient database designs (lack
of primary keys, indexes, etc) that causes MySQL CPU utilization to be high
when processing, etc. Also, if you have "backup" scripts that kick-off on
a automated basis that use things like 7-zip, beware not to have them all
running at once, and use "nice".
2f) 7-zip builds on some systems tend to DEFAULT to multi-threading being
enabled - resulting in one script using 7-zip using all-8 cores! So, be
sure to take that into consideration in your scripts (i.e. command-line
option for 7-zip to NOT use multi-threading).
2g) Regarding network traffic, some providers care about how much traffic
you generate and actually measure it - while others have a limit in their
plan but don't really monitor it. I have definitely had issues with a
service-provider thinking my game-servers were exploited, because they were
generating "a lot of UDP traffic" (duh, nearly all HLDS/SRCDS traffic is
"UDP").
2h) Regarding firewalling, different VPS providers may or may not allow you
the ability to run your own host-based firewall ("iptables") inside your
VPS. It just depends on the underlying virtualization platform. Some
platforms allow it (although if that is the case it doesn't mean the
provider has configured that platform to permit it actually work you).
With some providers, instead of allowing you to run a firewall directly
inside your VPS ("container") will provide their own web-interface for
managing filtering to/from your VPS. So, ask about that up-front!
Obviously, some offer more advanced "DDoS" protection. But, I do not have
any experience with that myself. So, maybe somebody else can chime-in with
that. It seem to recall it discussed here recently).
Part-3: Linux flavors (transition from CentOS to Debian, Ubuntu etc.)
------
3a) I was originally on CentOS. I had chosen that originally because its
what I was familiar with from work - where the "red-hat" family (Fedora,
RHEL & CentOS) has previously just like "owned" the Enterprise Linux
market. It worked reasonably well, but from time to time I would hit the
need for some library that CentOS was way behind on updating. This is
because CentOS is a strict down-stream from RHEL - and RHEL (being
Enterprise oriented) is very conservative on updates (compared to other
flavors). CentOS being a free equivalent of RHEL is extremely popular with
web-hosting providers and hence VPS providers. To be fair, this was CentOS
5.x at that time, CentOS 6.x was still very new.
3b) Due to hitting issues with CentOS and various library requirements,
etc. I checked with Valve (on here I think actually) and ask what they use.
I knew they were releasing Steam on Linux on Ubuntu first, but wasn't sure
what they used for servers, etc. The response I got was something like
they did the development on Ubuntu (client and server), but pre-release
testing of server builds on Debian. Debian (being kind-of-sort-of the
up-steam of Ubuntu) made sense. At the time, I couldn't find any decent
VPS providers allowing Ubuntu - but I did find some running Debian. So, I
went Debian. Since then, I have seen quite a lot more offering Ubuntu now.
3c) To be fair, I Debian is not as aggressive as Ubuntu on library updates,
etc. So, for Debian (to run Source SDK 2013 game-servers) I had to upgrade
to 8.x (the "unstable" or "testing" distribution). On Ubuntu, I think the
current "long-term support" (LTS) release (12.04?) is sufficient. However,
Ubuntu is about to upgrade their "LTS" very soon (if not already) - so it
might be a while for VPS providers to catch-up with that.
3d) If I was looking for a new VPS provider right now, I would probably be
looking for Ubuntu LTS instead of Debian. From an admin perspective (using
Webmin and/or SSH) Ubuntu and Debian are effectively identical. So, that's
a "no-brainer" for me.
Anyway, hope this helps somebody. If not, it all just goes into the giant
digital recycle-bit anyway!
- Weasel
PS: Any Win-to-Linux transitioning admins have any other questions for me,
I am more than happy to help. I have gotten lots of help on these lists
over the years (as well as elsewhere).. So, more than happy to pay it
forward.
On Sun, Apr 6, 2014 at 1:19 PM, pilger <[email protected]> wrote:
> Hey guys,
>
>
> We recently migrated to a Linux environment and we're experiencing some
> sort of "rubberband effect" or "server hiccups" in which the server hangs
> for a little moment and then everything comes back to normal. It is
> affecting all players when it happens.
>
> It's a TF2 server running on a Debian 7. The CPU is at 20% and the
> connection shows no loss or signs of high latency peaks. It must be
> something related to the SO or the srcds itself. It happens with any number
> of players and with sourcemod/metamod turned off as well.
>
> Here's a video of the problem:
> https://www.youtube.com/watch?v=Nw0xL4l9Swg&feature=youtu.be
>
> Here's a shot of the netgraph at the moment of the hang:
> [image: Inline images 1]
> Notice the interruption of the blue band on the bottom and the peak at the
> upper side. We had 6 people on the server at the moment this screenshot was
> made.
>
> Does anyone have *any* idea of what could be going on? I've ran out of
> possibilities...
>
> _pilger
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds
>
>
<<inline: SRCDS_TF2_rubberband_effect_2014.04.06.jpg>>
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds

