Closed xiazhaozhao closed 5 years ago
You can analysis it yourself with visualstudio diagnostic tools. step1. enable CPU analysis
step2. run and break it
step3. select time period and find what ate cpu
I'd suggest looking through your own code. The setup for dotnetty from what is shown is ok. Feel free to re-open if you see any more specific evidence it is dotnetty's issue. Meanwhile I'd suggest checking PerfView for performance analysis.
Environment OS: Window server 2012 R2 Description Please help.
ServerBootstrap bootstrap = new ServerBootstrap(); bootstrap .Group(bossGroup, workerGroup) .Channel()
.Option(ChannelOption.SoBacklog, 100)
//.Option(ChannelOption.)
.ChildHandler(new ActionChannelInitializer(channel =>
{
IChannelPipeline pipeline = channel.Pipeline;
if (tlsCertificate != null)
{
pipeline.AddLast(TlsHandler.Server(tlsCertificate));
}
pipeline.AddLast(new IdleStateHandler(120, 0, 0));//第一个参数为读,第二个为写,第三个为读写全部
pipeline.AddLast(new CommunicationEncoder());
pipeline.AddLast(new CommunicationDecoder(0x76, 2048, 22));
pipeline.AddLast(new CmdServerHandler(_clientsList,redisClient));
}));