• Hey Guest, we're evolving the future of TeaSpeak.
    You're invited to join the discussion here!

Server Optimizing the database size

REDOSS

TeaSpeak Team
Staff member
TeaTeam
As some users have already noticed, after deleting some data, the size of the database does not decrease.
For example, this is easy to reproduce when the database has a very large number of virtual servers with groups and channels.
If you delete virtual servers, you will notice that the size of the database has not changed in a smaller way.

I suggest adding database optimization in the next versions, so that its size corresponds to reality.
 

WolverinDEV

TeaSpeak Team
Staff member
Administrator
Depending on the version not everything had been deleting. Test with 1.4.18 I've reworked that. Also execute the command vacuum before comparing the sizes. This will cleanup all preserved space for feature data and compact the database.

---- Automatically Merged Double Post ----

PS: As even if you're deleting all servers the database will still be bigger than the initial one due to the registered clients for the instance.
 
Last edited:

REDOSS

TeaSpeak Team
Staff member
TeaTeam
I tested this on version 1.4.18 beta 5. I deleted all the servers, but my database did not change in size for this instance.

When I executed the command VACUUM;, the database was significantly reduced in size (40 MB -> 7 MB).

P.S:. The database only contains data for clients with a null server ID (about 30,000 records), as well as the default instance template settings.
 

WolverinDEV

TeaSpeak Team
Staff member
Administrator
Ahh nice, seems to be solid.

I thought about enabling auto vacuum or running the vacuum command at the end of server deletion.
After some researching I came to the conclusion that this is way more heave (performance wise) than expected and isn't probably something you want to do on a regular bases.

Since database sizes and disk spaces are not a matter any more, I'll leave it as it is.
If you have a urge to shrink the database you can still run that command, like you did, by your self.