xuesn 发表于 2018-11-29 11:12:57

tomcat 9.0.4 性能调优

tomcat9.0.4
  参考了网上的一些优化参数,但是在启动中发现 有2个报错:

11-Feb-2018 15:57:23.293 警告 org.apache.catalina.startup.SetAllPropertiesRule.begin {Server/Service/Connector} Setting property 'maxSpareThreads' to '200' did not find a matching property.
11-Feb-2018 15:57:23.343 警告 org.apache.catalina.startup.SetAllPropertiesRule.begin {Server/Service/Connector} Setting property 'compressableMimeType' to 'text/html,text/xml,application/javascript,text/css,text/plain' did not find a matching property.
  参考官方文档

http://tomcat.apache.org/tomcat-9.0-doc/config/http.html
maxSpareThread这个参数已经找不到了。
compressableMimeTyp 已更换名字为 compressibleMimeType
  最后修改如下:


  参数说明:


[*]org.apache.coyote.http11.Http11NioProtocol:调整工作模式为Nio
[*]maxThreads:最大线程数,默认150。增大值避免队列请求过多,导致响应缓慢。
[*]minSpareThreads:最小空闲线程数。
[*]acceptCount:当处理请求超过此值时,将后来请求放到队列中等待。
[*]disableUploadTimeout:禁用上传超时时间
[*]connectionTimeout:连接超时,单位毫秒,0代表不限制
[*]URIEncoding:URI地址编码使用UTF-8
[*]enableLookups:关闭dns解析,提高响应时间
[*]compression:启用压缩功能
[*]compressionMinSize:最小压缩大小,单位Byte
[*]compressibleMimeType :压缩的文件类型
  实际测试,可正常运行。无报错



页: [1]
查看完整版本: tomcat 9.0.4 性能调优