15.04.2012, 04:48
(
Последний раз редактировалось ][Noname][; 12.05.2012 в 09:44.
)
Run this clear script as gamemode and test CPU usage of server
If you run it on win system CPU will be 0%
If you run it on linux system CPU will be 5%-9%.
If you set respawn delay to 0 on linux CPU will be 0%-1%.
If I set in server.cfg sleep = 100 (mean 10 proccess tick's in second) CPU = 0%-1%
If I set in server.cfg sleep = 1 (up to 1000 proccess tick's) CPU = ~20%
It's check for vehicle's respawn delay every proccess tick => ~170 ticks for every vehicles in second with standart sleep 5 => 170 * 2000 = 340000 checks only for vehicles in 1 second?
Why there is vehicle's check every proccess tick? May be need check every 100 ms or 200 ms or 400ms? And why on win there is no CPU usage from vehicles?
Код:
#include <a_samp> main(){} public OnGameModeInit() { for(new i=0;i<2000;i++) CreateVehicle(411,random(6000)-3000,random(6000)-3000,random(6000)-3000,0,0,0,1); }
If you run it on linux system CPU will be 5%-9%.
If you set respawn delay to 0 on linux CPU will be 0%-1%.
If I set in server.cfg sleep = 100 (mean 10 proccess tick's in second) CPU = 0%-1%
If I set in server.cfg sleep = 1 (up to 1000 proccess tick's) CPU = ~20%
It's check for vehicle's respawn delay every proccess tick => ~170 ticks for every vehicles in second with standart sleep 5 => 170 * 2000 = 340000 checks only for vehicles in 1 second?
Why there is vehicle's check every proccess tick? May be need check every 100 ms or 200 ms or 400ms? And why on win there is no CPU usage from vehicles?