CreateVehicle and CPU
#4

Quote:
Originally Posted by SPAWN_METAL
Посмотреть сообщение
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 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 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?
Thanks for this thread you managed to reduce our CPU by about half
Reply


Messages In This Thread
[No subject] - by ][Noname][ - 15.04.2012, 04:48
[No subject] - by ][Noname][ - 11.05.2012, 20:30
Re: CreateVehicle and CPU - by MP2 - 11.05.2012, 20:33
Re: CreateVehicle and CPU - by new121 - 11.05.2012, 22:47
Re: CreateVehicle and CPU - by Kreyg - 11.05.2012, 22:49
Re: CreateVehicle and CPU - by leong124 - 12.05.2012, 09:33
Re: CreateVehicle and CPU - by ][Noname][ - 12.05.2012, 09:42
Re: CreateVehicle and CPU - by leong124 - 12.05.2012, 11:55
Re: CreateVehicle and CPU - by Kalcor - 15.05.2012, 06:53
Re: CreateVehicle and CPU - by SeoToX - 19.05.2012, 13:00

Forum Jump:


Users browsing this thread: 3 Guest(s)