Comments (8)
该问题百分百复现
from gnet.
看你这 profiling 结果,你的服务器一直在接收新连接吧?是不是你的客户端使用的是短连接,用完就丢?而且在频率很高。
from gnet.
没有,websocket业务,看了下服务器上的连接数,就几百个,而且重启完不会出现CPU占用率很高的情况。这种情况是保持了大量的连接后出现的...
from gnet.
所以复现的步骤是:
- 先发起大量的连接,然后 CPU 占用飙升;
- 客户端关闭大部分连接之后,CPU 占用率没有下降。
这样?
有没有试过不要用 gnet.WithReuseAddr(true), gnet.WithReusePort(true) ?
from gnet.
还有,能不能详细描述复现这个问题的步骤,以及能够稳定复现的客户端和服务端代码?
from gnet.
- 发起大量的连接后,CPU占用一开始不会飙升,而是过一段时间后才会飙升
- 是的
- 没试过不使用 gnet.WithReuseAddr(true), gnet.WithReusePort(true)
from gnet.
如果可以的话,请用 bug report 的模板重新建一个 issue,填上所有必要的信息。
from gnet.
每次CPU飙升都是 +100% +100% 这样🤔
from gnet.
Related Issues (20)
- [Question]: What is the maximum number of cores tested by anyone? I just tested 192 cores and it's better than evio etc but... HOT 7
- [Question]: Will the OnTraffic function be called concurrently? HOT 1
- [Question]: Validate the approach of implementing persistent TCP connections. HOT 1
- [Bug]: Calling Dial() in version 2.4 of Windows 10 will block HOT 4
- [Question]: I would like to verify whether this problem in the screenshot will cause the memory of the service to slowly increase. HOT 1
- [Feature]: support edge-triggered I/O
- [Question]: Is the netpoll v1 version defaulting to horizontal triggering, and the V2 version defaulting to edge triggering? HOT 15
- [Bug]: fatal error: concurrent map read and map write HOT 1
- Inconsistent behaviors with SO_REUSEPORT on Linux and *BSD HOT 7
- Don't use SO_REUSEPORT on Unix domain sockets HOT 1
- Don't disable SO_REUSEPORT on DragonFlyBSD HOT 1
- [Question]: gnet client works not as expected even tho i did it according to the api ref HOT 1
- [Bug]: GNET client not working as expected HOT 4
- [Bug]: example gnet for echo tcp uses too much memory HOT 7
- [Bug]: Read returns io.ErrShortBuffer on closed connection HOT 7
- Special treatment for the first package HOT 8
- [Question]: How to shut down the started tcp server and turn off port listening? HOT 2
- [Question]: When using io.CopyBuffer(), do you need to call Flush to send the data? HOT 2
- [Bug]: Discard() panic HOT 17
- [Feature]: now tls is possible, when can we have io_uring?
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 gnet.