Coder Social home page Coder Social logo

Comments (7)

songliwei2014 avatar songliwei2014 commented on July 27, 2024

现在在生产环境中使用你的driver, 发现cpu占用太高,内存占用太大。
cpu耗时的地方基本就在你的driver 里面。
内存占用基本就是
flat flat% sum% cum cum%
273.31MB 67.52% 67.52% 273.31MB 67.52% bytes.makeSlice
58.51MB 14.45% 81.98% 58.51MB 14.45% runtime.rawstringtmp
45.29MB 11.19% 93.16% 103.80MB 25.64% github.com/ssdb/gossdb/ssdb.(*Client).parse

from gossdb.

songliwei2014 avatar songliwei2014 commented on July 27, 2024

好像不是你的问题,是ssdb作者写的driver 好像有问。

from gossdb.

seefan avatar seefan commented on July 27, 2024

你好,能不能提供一下并发数量,以及平均每个cmd的kb数,方便我测试一下。

from gossdb.

seefan avatar seefan commented on July 27, 2024

看你发的图,应该是在使用MultiHgetSliceArray时下载的数据量比较大,建议你减小一次请求量,改成多次获取,再合并试一下,也许会好一些。ssdb在一次获取的数据里比较多时,会比较慢。

from gossdb.

seefan avatar seefan commented on July 27, 2024

已解决该问题,ssdb的连接在解析大数组时性能会比较差,已将连接重写并移植到gossdb里。

from gossdb.

songliwei2014 avatar songliwei2014 commented on July 27, 2024

我hashmap单个数据项不大,但是整个hashmap比较大,单个数据项不超过200字节,整个hashmap可能有2000-5000项。整个大小应该只有1MB 左右,你修改完之后在线上验证过来吗?

from gossdb.

seefan avatar seefan commented on July 27, 2024

我本机测试的,用pprof也分析过数据,速度比原来提高不是一个数量级。原来是下载量如果太多会导致buf重复加载,所以内存和cpu的压力都比较大。

from gossdb.

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.