SA-MP Forums Archive
Will my computer run a SA:MP server smoothly? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Will my computer run a SA:MP server smoothly? (/showthread.php?tid=425451)



Will my computer run a SA:MP server smoothly? - vvhy - 25.03.2013

I have been running my cops and robbers server off of Volt-host for a while now and will run out of hosting time before I can pay for an extension. I was wondering if you guys think a 20k line gamemode script would run decently on a computer like this?

I have a
HP Pavilion Desktop PC
Windows 7 Home Premium 64-bit OS
AMD Phenom™ II X4 840T Processor 2.90 GHz
Installed memory: 8.00 GB
N-Alvorix-RS880-uATX (Alvorix) Motherboard
And a LAN internet connection.

I know you cant fully know without knowing how efficient my gamemode is plus plugins ect... but, would a average 20k line gamemode run well on my machine?


Re: Will my computer run a SA:MP server smoothly? - Vince - 25.03.2013

I ran a SA-MP server under Debian on a Pentium D with 1GB RAM. The biggest culprit is your Internet speed. You should take into account that a player uses 40 Kbps of upstream.


Re: Will my computer run a SA:MP server smoothly? - Dubya - 25.03.2013

Yeah. So, if you have a Upload Speed of 1 mbps, you'll have a good 25 players without lag.


Re: Will my computer run a SA:MP server smoothly? - Mando - 25.03.2013

Quote:
Originally Posted by Dubya
Посмотреть сообщение
Yeah. So, if you have a Upload Speed of 1 mbps, you'll have a good 25 players without lag.
Just like that!


Re: Will my computer run a SA:MP server smoothly? - vvhy - 25.03.2013

Thank you all for your insight.


Re: Will my computer run a SA:MP server smoothly? - Babul - 25.03.2013

omg, not this question again ><
ANY good scripter should be able to make a 1-liner causing the server to lag>hang>/crash.
therefore, i suspect your gamemode contains some parts which will cause serious CPU-usage issues at a playercount >250 (active players using other players' distances for example causes 250^2=62500 calculations/second...), but anyways:
look "inside" your script, analyze the algorithms.
one estimate for dense CPU usage is to count all "MAX_PLAYERS" loops in your script, regardless if you're using foreach or not.
is your script using recursive functions, like a callbck calling/getting called (by) itself?
are you using the profiler plugin, and if so, did you compare the amounts of function calls? how much CPU-time they take in average?