Memory usage problem
#1

Hey guys, I'm having some problems with my gamemode.. After some time online my server is using A LOT of memory and things are getting pretty laggy.. Like timers being late, MySQL SELECT queries being REALLY REALLY slow. Can you help me fix this? If this helps, I've got:

- I'm using the default command processor(strcmp) and I'm not using foreach
- I'm using .INI systems along with MySQL systems
- I'm using crashdetect(?)
- I'm using an objects streamer (~2000 objects)

Can you help me? And if you're kind, can you tell me which of these can cause problems?
Reply
#2

The your second problem,use ZCMD+sscanf+foreach.
Reply
#3

Specs on your host?
Reply
#4

I'm owning a VDS for the server so I think the host specs are enough:

3.5 GB of RAM
Intel Dual Core 3.3 GHz

I'm having ~150 players at once, and on my tests server(where there are maximum 5 players online) the server works perfectly even after a week online, things aren't getting laggy at all.
Reply
#5

Optimise your script , use zcmd + sscanf + foreach this will help to use less ram
Reply
#6

Quote:
Originally Posted by CONTROLA
Посмотреть сообщение
Can you help me? And if you're kind, can you tell me which of these can cause problems?

- I'm using the default command processor(strcmp)
- and I'm not using foreach
- I'm using .INI systems
That is what could cause your problems. And big strings like new string[256]; when you often never use half.
Really hard to tell without seeing any piece of code at all.

But it sounds like It's one or more loop(s) that doesn't stop when it's supposed to.

Post your OnPlayerUpdate aswell....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)