Comments (3)
请教大佬第二个问题:大佬能再封装下libuv的pipe吗?用惯了大佬封装得libuv
from uv-cpp.
经常看到网络库宣传自己支持百万并发,其实大家都是epoll,iopc封的,理论上不是封的太挫,性能上不至于差非常多。这个库本身是对libuv封的,最初的设定就是不损耗太多额外的性能,libuv本身性能怎么样,它就是怎么样,所以这个库尽可能减少memcopy或者内存重新分配(比如读每个连接的数据,那个缓存是复用的,只有不够了才重新申请)。能跑多少,和你机器本身性能有关。
客户端这个例子你可以试试每个线程开个LOOP,每个LOOP分配若干客户端,还有关闭客户端的包处理缓存(会占内存,读包性能降低)。你可以试试和其他网络库对比。
from uv-cpp.
不要一个loop跑100w客户端,因为是单线程,开若干线程(比如你16核就16个线程),每个线程一个独立的loop对象,每个loop跑几万个客户端,你可以测试下看看性能。
from uv-cpp.
Related Issues (20)
- TcpConnection::write函数中似乎有隐藏的内存泄露问题? HOT 3
- TcpServer在客户端断开后发送数据崩溃 HOT 3
- uv::Packet::readFromBuffer 的解包问题? HOT 3
- new EventLoop,再delete,VS报告内存泄露 HOT 1
- 下一个版本解决问题。 HOT 21
- packet中size为uint16_t存放数据长度是否太小? HOT 2
- 新版的代码中有未定义的 ssize_t
- 编译出错 HOT 2
- TimerWheel 类的是否会将没有超时连接删除 HOT 8
- 请问是否支持ssl? HOT 1
- 关于内存的释放问题 HOT 5
- httpserver长链接
- uv-cpp做客户端时,当服务端连不上,重复去连接时,无论是linux还是Windows都会奔溃 HOT 14
- libuv升级到新版本支持吗 HOT 1
- client跨线程循环发送时候 ,client崩溃 HOT 4
- linux centos7下,偶现程序运行一段时间后,CPU使用率100%的情况。最后奔溃。 HOT 1
- centos 7 运行一晚第二天看到崩溃了 HOT 2
- 你好,cmake和make之后该怎么运行helloworld例子 HOT 3
- async 有对应的例子吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uv-cpp.