Loading objects lags
#1

Hey, everytime when my server loads objects (with xml from files), the server doesn't respond
and for example if i type a command or chatting, the system doesn't respond and just when the objects loading
finish the message and the commands sent with delay...
The objects generally is DM Maps.. so it takes some time because ever map it's 10k~7k objects.
please help
Reply
#2

UP!!!
Reply
#3

Quote:
Originally Posted by TopShooter
Посмотреть сообщение
Does the whole server crash, or only your connection doesn't respond and lags out? If only your connection, then you should either remove some maps or increase your ackslimit.
There aren't any crashs or lags, the system only doesn't respond during the objects loading, and after the loading
the system respond.
for example:
[15:20:29] Loading Objects..
[15:20:30] Eden: something.. (chats, but the system doesn't respond)
[15:20:50] Finish Loading
[15:20:51] Eden: something (The message sent in delay of 20 seconds)
Reply
#4

The SA-MP server is single threaded and can only do one thing at a time. If it's processing a file it can't handle chats, commands, timers, updates, ... anything really. Loading from disk is inherently and notoriously slow and should probably be avoided as much as possible.

Split it up in chunks of 500 objects or something if at all possible, or use an entirely different system that doesn't rely on files. A database might be somewhat faster, but 10,000 objects is still a lot.
Reply
#5

You must be running a lot of timers.

EDIT:

Vince the godfather, said it all.
Reply
#6

Quote:
Originally Posted by TopShooter
Посмотреть сообщение
Does the whole server crash, or only your connection doesn't respond and lags out? If only your connection, then you should either remove some maps or increase your ackslimit.
Quote:
Originally Posted by Vince
Посмотреть сообщение
The SA-MP server is single threaded and can only do one thing at a time. If it's processing a file it can't handle chats, commands, timers, updates, ... anything really. Loading from disk is inherently and notoriously slow and should probably be avoided as much as possible.

Split it up in chunks of 500 objects or something if at all possible, or use an entirely different system that doesn't rely on files. A database might be somewhat faster, but 10,000 objects is still a lot.
It sounds like a good idea to load objects in chunks.. but if I will load the objects in chunks of 1000, it will make
a lags in the server?
and as I saw there are some server are loading objects and there aren't any lags.. and I'm talking about DM map
who includes 10k~7k objects...

EDIT:
This is not good method, because it jams the system..
Maybe you got another idea?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)