Page 1 of 1

Use leveldb instead of sqlite for huge maps

PostPosted: Sun Feb 26, 2017 18:14
by burli
I made a little test to see which dB is faster. I run /emergeblocks (-1000,-20,-1000)(1000,20,1000)

Leveldb was a little bit slower, but not much. The more interesting fact was that the sqlite DB has 66MB, leveldb only 36MB

Maybe just an interesting FYI

Re: Use leveldb instead of sqlite for huge maps

PostPosted: Sun Feb 26, 2017 19:28
by Sergey
Recently I ran /emergeblocks (-5000, -50, -5000) (5000, 150, 5000)

About 5 hours of processing and 4.2 GB of map.sqlite file size.

Re: Use leveldb instead of sqlite for huge maps

PostPosted: Sun Feb 26, 2017 19:52
by burli
The map only has ~1900 mapblocks from the center to the edge, if I'm not totally wrong.

From center to edge are ~31000 nodes, each mapblock has 16 nodes.

31000/16=1937.5

Or did I miss something and emergeblocks means nodes and not mapblocks?

Re: Use leveldb instead of sqlite for huge maps

PostPosted: Sun Feb 26, 2017 20:07
by Sergey
burli wrote:The map only has ~1900 mapblocks from the center to the edge, if I'm not totally wrong.

From center to edge are ~31000 nodes, each mapblock has 16 nodes.

31000/16=1937.5

Or did I miss something and emergeblocks means nodes and not mapblocks?

Not mapblocks. Coordinates. You can type /emergeblocks (-10.5, -5.5, 0) (10.9, 1.5, 20)

From wiki:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
/emergeblocks <pos1> <pos2>
— Starts loading (or generating, if inexistent) map blocks contained in the area within pos1 and pos2

http://wiki.minetest.net/Server_commands

Re: Use leveldb instead of sqlite for huge maps

PostPosted: Sun Feb 26, 2017 20:57
by burli
Sergey wrote:Recently I ran /emergeblocks (-5000, -50, -5000) (5000, 150, 5000)


If I run this I got error messages like "couldn't get block..."

Re: Use leveldb instead of sqlite for huge maps

PostPosted: Sun Feb 26, 2017 22:37
by Sergey
burli wrote:
Sergey wrote:Recently I ran /emergeblocks (-5000, -50, -5000) (5000, 150, 5000)


If I run this I got error messages like "couldn't get block..."

That's strange. I had no error messages.

Well, to be honest, I had no messages at all, not only error messages but also processing messages. I thought my computer froze, but I look into MT world folder and map.sqlite was growing.

Re: Use leveldb instead of sqlite for huge maps

PostPosted: Wed Mar 01, 2017 06:26
by paramat
/emergeblocks takes 2 co-ordinates in node units, it means 'emerge or generate the mapblocks that intersect the volume defined by these node co-ordinates'.

Re: Use leveldb instead of sqlite for huge maps

PostPosted: Wed Mar 01, 2017 17:31
by Sergey
...