Giter Club home page Giter Club logo

Comments (4)

cswinter avatar cswinter commented on June 27, 2024

We could try switching the allocator back to jemalloc as per: https://doc.rust-lang.org/1.9.0/book/custom-allocators.html

from locustdb.

cswinter avatar cswinter commented on June 27, 2024

I had a go at it and it doesn't seem to be super easy to make this work, might be better to just remove the Heapsize dependency entirely. The only use of it right now is to get (approximate) size of data stored in memory, which is dominated by the DataSection structs in Column. Just estimating their memory usage with Vec::capacity() * std::mem::size_of should work well enough. It wouldn't account for allocator overhead, but it was never quite clear to me what exactly the heapsize crate did in that regard anyway.

from locustdb.

zhzy0077 avatar zhzy0077 commented on June 27, 2024

Yep, I have tried many days but eventually failed. heapsize has hard-coded link name on Mac OS X(https://github.com/servo/heapsize/blob/master/src/lib.rs#L44). After the removal of jemalloc, It's difficult to make this function available for rust to be linked.
In the future, if we want to have fine-grained control of memory, we can benefit from https://github.com/servo/servo/tree/master/components/malloc_size_of which is currently used by Servo.

from locustdb.

zhzy0077 avatar zhzy0077 commented on June 27, 2024

I have create a pr for this. Please have a look. #115

from locustdb.

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.