Coder Social home page Coder Social logo

Comments (4)

xujiajun avatar xujiajun commented on June 14, 2024 7

@huangchulong 不好意思 才回你。 最近比较忙,但是这个issue 我一直有在关注。

测试了下1亿条 数据量

版本: nutsdb V0.4.0
服务器配置: Ubuntu  16.04 64位 8核64G
数据量:占有11G左右 (目前版本没有做压缩)
为了加快测试,没有设置实时sync,写入速度: 25.7w/s

key\value 类似:

key := []byte("namename" + strconv.Itoa(i))
val := []byte("valvalvavalvalvalvavalvalvalvavalvalvalvaval" + strconv.Itoa(i))

测试结果:

Mem : 64430 MB , Free: 63776 MB , Used:176 MB , Usage:0.273957%
start db index cost time:  72.076µs
batch put data cost:  6m29.067011134s
Mem : 64430 MB , Free: 24760 MB , Used:39147 MB , Usage:60.759105%

发现 消耗内存是数据量的 3.46倍左右。

我不知道 你为啥有80/15 = 16/3 消耗近 5倍多的内存。

不过这个耗内存问题 我做了个解决方案。

解决

master 分支 已经支持了新的模式 EntryIdxMode:HintBPTSparseIdxMode
欢迎尝试,专门为节约内存设计。

测试10亿条数据

版本 :nutsdb master分支
主机配置:Ubuntu 16.04 64位 2核2G
key\value 类似上面的

测试结果:

Mem : 1999 MB , Free: 1786 MB , Used:53 MB , Usage:2.688618%
Mem : 1999 MB , Free: 1695 MB , Used:135 MB , Usage:6.784733%

内存占用只有82MB,完成10亿条数据插入,产生索引文件153G,但是插入速度降到 4.35w/s

希望这个是你要的。

from nutsdb.

huangchulong avatar huangchulong commented on June 14, 2024

测试了一下,几亿条数据的,总元数据量15G左右,结果吃掉我80G的内存,而且我用的是HintKeyAndRAMIdxMode的方式,这样的消耗太大了,直接耗光内存和swap,让系统killed.

本来我想存进200个G看看,现在实现不了了.

from nutsdb.

xujiajun avatar xujiajun commented on June 14, 2024

@huangchulong 谢谢反馈。
我回头去测下大数据量的表现。再给你反馈。

from nutsdb.

huangchulong avatar huangchulong commented on June 14, 2024

太棒了,
我周末测试一下.

from nutsdb.

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.