11.05.2012, 22:47
Quote:
Run this clear script as gamemode and test CPU usage of server
Код:
#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 for every vehicles in second with standart sleep 5 => 170 * 2000 = 340000 checks only for vehicles? Why there is vehicle checking every procces tick? May be need every 100 ms or 200 ms or 400ms? And why on win there is no CPU usage from vehicles? |