日期:2014-05-18  浏览次数:20910 次

Tomcat服务器CPU占用率忽高忽低如何解决
linux环境,256的内存,做测试机用。

cpu在linux里查看,占用率忽高忽低,有时99%,有时50%,有时还不到1%.

CPU到经常会到99%,这时候页面速度奇慢,一般都会有哪些原因导致这种情况呢?

------解决方案--------------------
1,tomcat做连接池
2,jdbc用preparedstatment
3,rs用缓冲
4,优化jsp和servlet,输出用servletoutputstream不要用printwriter
等等,还有很多