Coder Social home page Coder Social logo

beidou 性能问题 about beidou HOT 5 CLOSED

alibaba avatar alibaba commented on May 1, 2024
beidou 性能问题

from beidou.

Comments (5)

weichunpeng avatar weichunpeng commented on May 1, 2024 2

@andylei18
beidou simple example为例, 根据我上面说的三个点(采用react16, production模式启动,去掉worker=1, 我本机起了7个worker), RT从21ms降低到了2.5ms左右(客户端采集到的RT,服务端RT大约还要减去1ms), 并发量从QPS40多升到了800以上(未压到极限)

image

至于你说的egg-view存在性能问题,这个我会再跟进的

from beidou.

andylei18 avatar andylei18 commented on May 1, 2024

我是mac顶配 本机测试

from beidou.

weichunpeng avatar weichunpeng commented on May 1, 2024

以下四个方面因素影响非常大

  • 模板中默认版本是react15, 依赖升级到react16,性能会有非常大的提升,大约会在10倍左右
  • 本地开发模式,默认NODE_ENV=local, 以 production模式启动,大约会提升 2-3倍(另外在local环境下,所有请求都会经过webpack, 这也会有一倍左右的性能影响)
  • 本地开发,默认开启进程数是1个,去掉worker=1, 会起CPU核数个进程,QPS会有大幅提升的, 参考work number code
  • node版本,node 8相比node 6会有30%左右的提升

可以试试这四个方面, 关于第一点,我们在升级默认的react版本了。 另外超时应该是单个进程处理不了这么大并发量,很多请求超时了

@andylei18

from beidou.

andylei18 avatar andylei18 commented on May 1, 2024

@weichunpeng
1.react 版本这个我理解;
2.NODE_ENV 这个我觉得 约定的太死了,光我知道很多公司线上NODE_ENV不是production,是不是这块的耦合性太高了;
3. worker 数我理解跟部署服务器的cpu核数相关;
4.我就是v8.9.3
5.Egg 本身的egg-view这个包就有性能问题;这个我测试过

from beidou.

andylei18 avatar andylei18 commented on May 1, 2024

@weichunpeng 收到 多交流。技术无国界

from beidou.

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.