Tuesday, September 16, 2014

Avoiding LevelDB in Minetest for Now

Black exclamation mark in a red triangle indicating a warning or to be cautious.
~ Caution! ~
The balance of my experience with LevelDB is telling me to avoid using it in my Minetest worlds for now.

The README.txt file of Minetest states: "Build with LevelDB; Enables use of LevelDB, which is much faster than SQLite, as map backend".

That's it.

No further explanation.

How is LevelDB faster?

Why is LevelDB faster?

How do you even use LevelDB to find out?

Why, if LevelDB is so much better, is the default still SQLite3?

There are no Minetest examples or scenarios given to prove and persuade people to use LevelDB as the database backend for their Minetest worlds.

Searching Minetest's wiki, website, and forums for more information about LevelDB and how or why it should be used in Minetest, pretty much turned out to be "searching for a needle in a hay stack". What little Minetest related information I could find about LevelDB didn't help.

Several times I asked in chat (freenodes' #minetest channel where some of the Minetest developers hang-out) and practically no one could provide usable answers. What little I could get was that the benefits of using LevelDB only appear when working with world databases larger than 4gb, to activate LevelDB required a line in the "world.mt" file, and the way to convert the SQLite3 database to a LevelDB database was somewhere in the man page of the server binary. (Where?... In the what of the... huh???)

A few phrases came to mind:

  • "Clear as mud."
  • "Technically correct but practically useless."
  • and several other phrases cussed and swore, under my breath, through gritted teeth.


You get the idea.

So I did some kitchen-testing of my own.

For several months I used LevelDB in a few mod-testing worlds. The worlds are small (less than 200mb each) and dedicated to trying out only one mod apiece. I didn't change any code, just used the mods, as is,  to see what they could and would do. Some of the LevelDB test worlds are still running fine while other LevelDB test worlds became corrupted and unplayable.

My attempts at converting backup copies of LinuxGaming wound up with a corrupted database each time. My home computer is much stronger than the server's computer and I was running a much more up-to-date OS (Ubuntu 13.10, at the time). The conversion to LevelDB from SQLite3 should have worked but time and time again it didn't.

(Note:  if your server is running Ubuntu 12.04 it won't have the necessary files in its repositories to compile Minetest with LevelDB support enabled.)

One of my contacts is a seasoned Minetest server operator and experienced mod maker. They were able to convert their severs to LevelDB successfully but, after many attempts, was unable to convert other servers. If one of the higher-up experts of the Minetest community had this much trouble, coupled with my own experience of difficulties with LevelDB Minetest worlds, that tells me that Minetest with LevelDB is not a safe combination yet.

The geeks claim SQLite3 is bloated and slow but what good are a few trimmed seconds going to do you when your world and all that you created in it are lost because of a corrupted database?

Me, I'll have a couple sips of coffee while I wait a few extra seconds for the steady, reliable, and stable SQLite3 to load my treasured, long-term worlds.



About Comments
Be civil and show some class toward your fellow commenters.

Trolls will be ignored as will posts containing swear-words or alternate spellings of swear words.

No comments:

Post a Comment