CentOS 6.5 spike

梦想与她 提交于 2019-12-25 05:18:20

问题


I have developed an application in C. I am running this application on "Red Hat Enterprise Linux Server release 5.8 (Tikanga)" and everything looks good but when we deploy this application on "CentOS release 6.5 (Final)" it starts doing problem. It occupies more chache memory and after 30-45 minutes it shoot up a spike and all cpu shows 100% cpu utilization for 1-2 second.

I google this issue and found that CPU high usage of the usleep on Cent OS 6.3

Since one process in my application is using 10 usleep. It is taking less than 3% CPU in RedHat, however it is taking quite high in CentOS around 90%. After reading the link when I change the sleep from 10 usleep to 1000 usleep or 1 us then it takes 40% CPU.

I need to know that the Kernel of CentOS 6.5 is using high speed timers or not or I need to set any configuration in compiling the Kernel.


回答1:


In the first place, you are comparing apples and oranges: CentOS 6 corresponds to RHEL 6. Very likely your code would behave the same on RHEL 6.5 as it does on CentOS 6.5, and the same on CentOS 5.8 as on RHEL 5.8. It is misleading to describe the issue as a difference between RHEL and CentOS.

In the second place, if your CPU utilization is that strongly affected by a few usleep() calls (executed, apparently, very many times), then your code is flawed and you should fix it. Building a custom kernel to mask the problem would be pretty backward. Nevertheless, if the objective is more to move over to CentOS than to move up to a (somewhat) more up-to-date environment, then switch to CentOS 5 instead of to CentOS 6.



来源:https://stackoverflow.com/questions/25491949/centos-6-5-spike

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!