cpu usage
#1

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?
Reply
#2

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
Reply
#3

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 ..
Reply
#4

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
Reply
#5

You need to know your server performance
Reply
#6

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.
Reply
#7

Try this https://sampforum.blast.hk/showthread.php?tid=271129
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)