Posts: 50
Threads: 21
Joined: Nov 2015
Reputation:
0
I currently hosting my server in ultra-h.com and my server have 85% cpu ussage and it so LAG can you guys tell me how to reduce this thing?
Posts: 1,219
Threads: 51
Joined: Jul 2012
Optimize your script or get a better server ...
Posts: 1,506
Threads: 13
Joined: Jun 2015
Optimization includes...
Timer, using a lot of timers can cause lag
Variables, using a lot of variables takes place in memory, Ultra-H uses less memory that the minimum required for your gamemode, resulting lag.
Coding tips, optimization also include how you type the code, 'cause the code is being executed, if you have un-optimized then its going to slow down the process.
Example:
PHP код:
// UN-Optimized use of variables
new var1;
new var2;
new var3;
// Optimized use of variables
new var1, var2, var3;
// UN-Optimized use of variable (setting values)
var1 = 0;
var2 = 0;
var3 = 0;
// Optimized use of variables (setting values)
var1 = var2 = var3 = 0;