Q: server memory/cpu usage & others
#1

Hi everyone,

I have a few questions to be asked.

1. Which one shall I host my server, Linux or Windows VPS? As far as I know there are many kinds of Linux and I am not sure which one is the most suitable/best one for running sa-mp server. And I heard that running the server on Linux require lesser resource(s) than on Windows.

2. What are the other factors of memory/cpu usage? According to https://sampwiki.blast.hk/wiki/SetTimer, the use of many timers will result in increased memory/cpu usage. Alright so other than that, what are the factors? And I was wondering, how many timers does RP server usually have?

3. Using more plugins means more cpu/memory usage?

4. I ran my samp server on my desktop PC (Windows) and according to Task Manager, it uses 30mb+. But how much memory it will use in Linux?
Reply
#2

Quote:
Originally Posted by Uberanwar
View Post
Hi everyone,
1. Which one shall I host my server, Linux or Windows VPS? As far as I know there are many kinds of Linux and I am not sure which one is the most suitable/best one for running sa-mp server. And I heard that running the server on Linux require lesser resource(s) than on Windows.
Linux wins when it comes to servers. Windows requires more resources, he has to load Windows Explorer, all it's services and etc, just like it happens in your usual Windows computer.

When you get a Linux VPS, you will be dealing with a command line. There's no "desktop" (unless you install it, but don't).

Seriously, the only reason to not use Linux is because someone doesn't want to learn, they want to use what they always used, "Windows".

Quote:

2. What are the other factors of memory/cpu usage? According to https://sampwiki.blast.hk/wiki/SetTimer, the use of many timers will result in increased memory/cpu usage. Alright so other than that, what are the factors? And I was wondering, how many timers does RP server usually have?

You might want to read this topic, and it's related topic(s):
https://sampforum.blast.hk/showthread.php?tid=588199

Quote:

3. Using more plugins means more cpu/memory usage?

Yes, but don't worry, normally they don't take "that much".

Quote:

4. I ran my samp server on my desktop PC (Windows) and according to Task Manager, it uses 30mb+. But how much memory it will use in Linux?

As the SA-MP server is written in C++, all memory allocations are done by the program itself. That being said, the memory usage will be similar in both operative systems. Please someone correct me if I'm wrong.
Reply
#3

Memory usage is hugely dependent on the gamemode. Large global arrays will inflate memory usage. Redefine MAX_PLAYERS if you don't intend to run a 1000-pop server. CPU usage is largely influenced by timers and OnPlayerUpdate. Yet I've never known a CPU spiking when running a SA-MP server, except in the case of an infinite loop so this shouldn't be something to worry about. A single core 256MB Linux VPS will easily run a small SA-MP server. Even with MySQL, provided it is properly configured for the system.
Reply
#4

As everyone already said, Linux is the way to go. I'm using Ubuntu 14 myself but you can choose a different one. And don't worry, its not hard to learn how to operate on Linux using PuTTy(SSH client). Just do a search on ****** .
Reply
#5

And I forgot to talk about Linux distros. The above guy said he uses Ubuntu 14, I personally use CentOS 6. The Linux kernel is the same, so you should choose the distro you like. When I was a beginner I didn't know what distro to use, so I just choosed Ubuntu as I heard it was the most famous Linux distro for desktops/laptops. Nowadays I prefer CentOS 6. As a CentOS fan I recommend you to try CentOS 6, but really, it's just a question of preference and I guess there's no "better distro", so choose whatever you want

Another distro that is worth mentioning is Debian, a very stable distro. Ubuntu is based on Debian btw, but it has customizations and branding by Canonical Ltd..
Reply
#6

Alright thanks for the responses guys, another question. Using the slowest command processor in scripts, such as strcmp, does it have any impact on the performance of the script? (such as lag or something)

I've hosted my sa-mp server on Linux but how can I measure the RAM/CPU usage?
Reply
#7

Here is some information on that. I think you'll find the "top" command to be the most useful for you, its like a Task Manager for windows.

http://www.binarytides.com/linux-com...-memory-usage/
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)