23.02.2009, 13:59
Hey, i've been told my my server providor that my server is using too much CPU.
With 4 players in it was at 9%.
About 5 minutes later, still with 4 players in the server, it was between 10-11%.
Another few minutes later, still with 4 players in, it was at 11-12%
Then with 5 players in it was to 15-16%
About half hour later, there was 7 players in and the CPU usage was 36%
Its constantly creeping up, even if theres the same amount of players in.
I'm really really not sure what could be causing it.
I've deleted a lot of timers, put the timer frequency of some timers higher.
used #define SLOTS 64 (amount of slots the server has) instead of using MAX_PLAYERS
Does anyone have any idea of what kind of things could be causing this?
I've looked through and found some string sizes at 256. When they only really needed to be around 32 or 63, somtimes smaller...
The only problem is when i change tmp[256]; to tmp[64]; or tmp[128];
I get a lot of the same error
So, could anyone tell me firstly what could be causing so much CPU usage, and slowly creeping higher?
And also how i can stop getting the error above?
Thanks
With 4 players in it was at 9%.
About 5 minutes later, still with 4 players in the server, it was between 10-11%.
Another few minutes later, still with 4 players in, it was at 11-12%
Then with 5 players in it was to 15-16%
About half hour later, there was 7 players in and the CPU usage was 36%
Its constantly creeping up, even if theres the same amount of players in.
I'm really really not sure what could be causing it.
I've deleted a lot of timers, put the timer frequency of some timers higher.
used #define SLOTS 64 (amount of slots the server has) instead of using MAX_PLAYERS
Does anyone have any idea of what kind of things could be causing this?
I've looked through and found some string sizes at 256. When they only really needed to be around 32 or 63, somtimes smaller...
The only problem is when i change tmp[256]; to tmp[64]; or tmp[128];
I get a lot of the same error
Код:
error 047: array sizes do not match, or destination array is too small
And also how i can stop getting the error above?
Thanks