Jump to content

A way to resolve lag caused by resources?


Recommended Posts

Hello,

Ever since I joined MTA from the veryu beginning, my main interest were Roleplay servers. I joined a few in the past, but they all got the exact same problems.

The longer the server is up, the more data it stores. The more data the server get's , the longer it takes for it to load. Everyone knows that.

But what really pisses people off is that it affects the overall gameplay.

For example:

I've been in MTA:RP for almost a year. And I see the performance of the server going backwards even though we have upgraded our server. With a new CPU you'd think the lag would reduce. Now I know that my laptop isn't the greatest to play GTA in the first place, but when I joined the common Race, RPG, zombie, freeroam server. My Framerate got up to 45 - 60 while in my own server I get nothing more then 9-10 on average.

Other then the server has been DDoSsed and is still a target of the attackers (and I know we are not the only one being DDoSsed, I've seen a lot of servers going down by DDoSSers). Even without those stupid attacks, the server lags.

Recently I have checked the items the server has. It's over 230,000 items. A lot of them are gone, but our MySQL still reads through all those lists.

As I fear, there are a lot of scripts in various resources who have endless loops in them. Yes I want to get rid of them, but I need to select it carefully. But what I am looking for is the following:

- A way to end the lag caused by the scripts

- A solution to the unnessesary data checking.

- A way to get rid of memory occupied useless scripts.

We use MySQL

How can I resolve & figure out what scripts are pretty much useless yet the players do not suffer from it?

For the ones interested, here I monitored the timer.log for approx 20-30 minutes. I couldn't upload it to pastebin since it's over 500 kb.

http://puu.sh/29SA5

Link to comment

From what i've heard from the developers of the script, there's a lot of them in some resources like payday, also with the use of world-items trying to render everything to the player. That's what is causing the lag. So I might need to figure out a way to reduce the amount of timers, it'll require some tiem & research I guess.

Link to comment

Improving the code itself will help, avoid using much timers and anything that uses bandwidth (events, remote calls, element data) and mainly XML, unless it's really needed. They're small files, but they're much - it ends up doing the same AFAIK. I would recommend using SQLite or MySQL (if really needed).

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...