cpu usage - 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: cpu usage (
/showthread.php?tid=473677)
cpu usage -
ancezas - 03.11.2013
Hi, i need to find out who is using many cpu and who is not, like NPC, 3dlabels, pickups, cechpoints and anything else, whear can i find these parameters?
Re: cpu usage -
rappy93 - 03.11.2013
You can't find them in a specific place in your script. I'll tell you what caused my host's cpu to go crazy. An ingame object editing script. Adding and editing objects for all players ingame,without map editor. It caused the cpu to go 90-100% all the time.
Also,another thing that ran the cpu crazy was a script that when you crashed the car it would show a red screen and daze effect. I dont know why this second one caused it tho' .
If you have anything like this remove it
Re: cpu usage -
iJumbo - 03.11.2013
try to debug yourself.. i mean start the server with only the 3dlabels system see if high cpu come from there and so on with other systems ..
Re: cpu usage -
ancezas - 03.11.2013
i haven't these problems but i want to know what i should add much less in server, because i want to add like 30 NPC's and like 200 SetObjectMaterialText and checkpoints a lot
Re: cpu usage -
iJumbo - 03.11.2013
You need to know your server performance
Re: cpu usage -
DeStunter - 03.11.2013
Quote:
Originally Posted by ancezas
i haven't these problems but i want to know what i should add much less in server, because i want to add like 30 NPC's and like 200 SetObjectMaterialText and checkpoints a lot
|
It all really depends. It depends on the Server specs, weather its a shared host/vps/dedicated server. It also depends on how you code. If you use things like YCMD, ZCMD, and other things that use less cpu resources, timers, checks, a lot of stuff contributes to CPU usage.
If you want to know how much CPU usage is used, start a server add 2 NPC's watch your cpu usage. Add 2 more, watch it again, add 2 more, so forth. If the NPC's interact with players, test this as well with friends bugging the NPC's constantly, and monitor your CPU usage.
Re: cpu usage -
Pottus - 03.11.2013
Try this
https://sampforum.blast.hk/showthread.php?tid=271129