Server spending more and more CPU usage :S
#1

When i turn on my server(with my gamemode :P ) it spends average CPU memory in the start...but then every seconds it spends more and more CPU memory...i hosted my GM on my hosting and after 1 day CPU USAGE on myne server was over 40% :S
_________________________________________________
GameMode is GF EDIT but HARD edit > and optimized...
when o compile the gamemode i get these INFO's

_________________________________________________
Quote:

Header size: 6688 bytes
Code size: 1270116 bytes
Data size: 1430228 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4183 cells (16732 bytes)
Total requirements: 2723416 bytes

_________________________________________________
and BASIC GodFather gamemode info's are THESE
_________________________________________________
Quote:

Header size: 6012 bytes
Code size: 1102596 bytes
Data size: 4442616 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4720 cells (18880 bytes)
Total requirements: 5567608 bytes

_________________________________________________
i checked all fwrite are followed by fclose and everything is fine :S
_________________________________________________
What to do? :S
Reply
#2

No one can help you else a scripter.
If you don't know scripting then you have to ask a scripter to help you.
Reply
#3

Quote:
Originally Posted by Mina
No one can help you else a scripter.
If you don't know scripting then you have to ask a scripter to help you.
THANK YOU FOR TELLING ME THAT...post collector -.-'

dood thats why i asked in here so SCRIPTER can help me :O
it is a server problem & script problem...
Reply
#4

theres probably a leak somewhere in your code thats causing the increase in cpu usage.
i had a similar problem a few months ago when developing a custom object streamer, really the only way to fix it is to debug or code or to get someone to do it for you, but afaik most coders dont like debugging other peoples work for free.

it might be caused by something else aswell, but thats just my guess since your talking about your gamemode being edited and all.
Reply
#5

You didn't think to fix the warning on compile?
Reply
#6

the classic stack/heap size warning - -
just search for all [256] cell string's and replace them by [128] cell ones
Reply
#7

Quote:
Originally Posted by RoBo
You didn't think to fix the warning on compile?
wht warning? :O

as i can see my GF-EDIT is MORE optimized than the BASIC one...and it should spend way less CPU memory than the basic one...
Reply
#8

What's with your OnPlayerUpdate?
You know that GF gamemode had the callback with this name before sa:mp 0.2 came out with it's own OnPlayerUpdate-callback and GF's OnPlayerUpdate had a lot of file-writing code in it.

Also, fix your memory warnings, read the ******'s code optimization topic.
Reply
#9

Quote:
Originally Posted by Virtual1ty
the classic stack/heap size warning - -
just search for all [256] cell string's and replace them by [128] cell ones
Orly? Not for me.
Reply
#10

Quote:
Originally Posted by Don Correlli
What's with your OnPlayerUpdate?
You know that GF gamemode had the callback with this name before sa:mp 0.2 came out with it's own OnPlayerUpdate-callback and GF's OnPlayerUpdate had a lot of file-writing code in it.

Also, fix your memory warnings, read the ******'s code optimization topic.
i don't have OnPlayerUpdate...i have "public OnUpdatePlayer(playerid)"

i fixed that long time ago...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)