Git Product home page Git Product logo

Comments (2)

fengjiachun avatar fengjiachun commented on May 21, 2024

下面都是猜测哈

第一个问题: 把线程优先级的参数加上并设置为最高优先级试试? DefaultThreadFactory(NioEventLoopGroup.class, Thread.MAX_PRIORITY)

第二个问题: 一般理论上确实是Channel跟CPU核心数相同或略大于CPU核心数性能更好些, 你遇到了小数据包单Channel性能更好, 应该也没有差距很大吧? 猜测是不是这样:
你的测试场景是同步阻塞调用, 这个测试方式我认为小数据包场景其实瓶颈都会在客户端(客户端阻塞等待响应), 这就导致了客户端发送数据能力受限, 所以反过来推测服务端其实应该会很轻松的, 再加上服务端处理小数据包本身就没什么CPU的开销(你对反序列化也有zero-copy的优化, 就更不占用CPU时间片了), 所以虽然单Channel同一时刻只能利用一个核, 但不会对吞吐造成什么影响, 因为远远没达到服务端处理能力的极限

上面的解释主要靠猜测, 没验证过, 也不一定对, 哈哈, 很佩服你的钻研能力, 你要有新发现也分享下给我

from jupiter.

hank-whu avatar hank-whu commented on May 21, 2024

好吧,确实很难解释,我自己再思考一下

from jupiter.

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.