what should I do ? Variable files are large, causing the server to lag

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

jomjonejame

Member
Jan 26, 2017
54
1
8
29
"variables.csv" size is 28,673 KB

ApGp6GJ.jpg


Server lag every 5 minute. I'm try remove variables file to 2,000 KB Fixed this problem
There is a solution to this problem. Besides deleting files?
 
20 MB shouldn't be a that big probem.
Try splitting that one database in different databases, and you should try SQLite.

mstsc_2017-05-08_13-41-29.png

10 SQLite Databases, 240+ MB without Problems [Biggest database is 140+ MB]
 
  • Like
Reactions: jomjonejame
Want a sample to add variables to SQLite


code_language.skript:
Database1:
        type: SQLite
     
        pattern: Variable pattern (regex)
        file: ./plugins/skript/Database1.db
        backup interval: 0 hours# 0 = don't create backups
        monitor changes: false
        monitor interval: 120 seconds
 
If your server is still lagging, try using YML to store some variables. You'll need SkUtilities.

I use YML for most of my individual player variables.
{%player%.autopickup} -> yml value "%UUID of player%.prefs.autopickup" of file "{@SaveFile}"
 
@jomjonejame

Who is hosting the server? How much ram is allocated in your server, and how many plugins do you have?

I also recommend using https://www.spigotmc.org/resources/toplite.1140/
to see if Skript is causing all the lag.

Host is VPS Server - 64 Plugin Ram 10GB
[doublepost=1498440243,1498440164][/doublepost]
I got 39 plugins, 100mb of variables in a 2gb ram server and TPS is 19.99 at 99% of the time...

Or because of writing the system causing the server to lag.
[doublepost=1498440364][/doublepost]
If your server is still lagging, try using YML to store some variables. You'll need SkUtilities.

I use YML for most of my individual player variables.
{%player%.autopickup} -> yml value "%UUID of player%.prefs.autopickup" of file "{@SaveFile}"

Thank you, I'm try use MYSQL database, May be better
 
Host is VPS Server - 64 Plugin Ram 10GB
[doublepost=1498440243,1498440164][/doublepost]

Or because of writing the system causing the server to lag.
[doublepost=1498440364][/doublepost]

Thank you, I'm try use MYSQL database, May be better
The server doesn't write to the variables file until the server is shutting down, so no.
 
What was it that doesn't get done till shutdown then? maybe it was deletion of variables from the file?
It says in the config that variables are deleted when the server shuts down. But that is wrong as well. The variable file is cleaned when the server is started.
 
Status
Not open for further replies.