#1

Delay (lag) and high CPU utilization (15-20% with 30 players). What is this should, may have something to do timers?

I have these:
SetTimer ("RefreshHat", 180000, true);
SetTimer ("UpgradeOther", 300000, true);
SetTimer ("WeatherRotator" 2400000, true);
SetTimer ("OneMinuteTimer", 60000, true);
SetTimer ("TimerOfASecond", 1000, true);
SetTimer ("Timer45M" 2700000, true);
SetTimer ("TimerHalfASecond", 500, true);


The longest code (in terms of lines) timers is "TimerOfASecond." If necessary, I can go.

Help please, the lag is unbearable.
Reply
#2

If you have a very laggy code that runs every 1 second then that'll quickly lag your server.
Try to tone it down as much as possible, or increase the timer time.
Or just get higher specs.

Could also be your TimerHalfASecond if there's a lot of stuff in there.
Reply
#3

Thanks for answering. "TimerHalfASecond" only has the speedometer and updating of vehicles carrying gasoline. If you want, you can spend Timer code a second for you to see.
Reply
#4

Quote:
Originally Posted by Marshall2015
Посмотреть сообщение
Thanks for answering. "TimerHalfASecond" only has the speedometer and updating of vehicles carrying gasoline. If you want, you can spend Timer code a second for you to see.
Well you can try to comment it out on a test server and see how much it decreases lag.
You could consider putting some of the code in a longer timer though.
Reply
#5

Right now I'm doing this:

timer TimerHalfASecond[500]()

Will it improve anything? You will be charged from main - repeat TimerHalfASecond();
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)