Code Monkey home page Code Monkey logo

Comments (4)

icewukong avatar icewukong commented on May 12, 2024 1

I get it,thank you :)

from tile38.

tidwall avatar tidwall commented on May 12, 2024

Before loading the AOF file in tile38, is there a relatively conservative and simple method to evaluate how much memory tile38 will use ?

Every object comprises of at least:

  • Object Header: 16-bytes
  • R-Tree Pointer: 16-bytes

Then there's the actual data such as:

  • Point Object (Lat/Lon): 16-bytes
  • LineString: (Point*N)
  • Polygon: (LineString*N)
  • Etc..

So the smallest object is a Point which will take at least 48 bytes to store.

In addition, in order to reduce memory fragmentation, do you have any suggestion on the design of GeoJSON ?

Tile38 stores GeoJSON in a binary format, and any variation of the same fields are stored identically. For example:

{
  "type": "Point",
  "coordinates": [10,10]
}

and

{"coordinates": [10,10],"type":"Point"}

are the same as far as Tile38 is concerned. Both formats use the same amount of data.

I hope this information helps, and let me know if you have any additional questions.

from tile38.

tidwall avatar tidwall commented on May 12, 2024

I would also like to add that you can always check the memory usage with the SERVER command.

from tile38.

tidwall avatar tidwall commented on May 12, 2024

One more thing. If you are on a low-memory system, you can compile for 32-bits and save some memory.

From the command line:

$ GOARCH=386 make

The pointer sizes will be 32bits and this will save about 8 bytes per object.

from tile38.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.