Operating System - Linux
1825771 Members
2154 Online
109687 Solutions
New Discussion

CPU Resource Alloaction on LINUX Server

 
Lalit Seth
Frequent Advisor

CPU Resource Alloaction on LINUX Server

Hi,

I have few custom Daemon running for our client on Linux Server.

These Daemon on request uses nearly 100% CPU whenever business requests are processed which slows down other tasks running on Machine.

We have been using renice to lower down the priority in past.

We are now looking at some tool which helps us to do some resource allocation constraints for these process wrt to CPU, Memory etc. Majorly CPU.

Any idea which all good tools or functions are available to acheive this.

These Daemons are in C++ and compiled with GNU Compiler.

Thanks
2 REPLIES 2
Alexander Chuzhoy
Honored Contributor

Re: CPU Resource Alloaction on LINUX Server

Hi,
1. man ulimit
2. You can limit resources for any user by adding a line to /etc/pam.d/login:
session required /lib/security/pam_limit.so


and then you must edit the /etc/security/limits.conf file to actually place the limits.
Again, read the documentaion first.
Cheers.
Andrew Cowan
Honored Contributor

Re: CPU Resource Alloaction on LINUX Server

Background processes that require hardware interrupts, e.g. "cu" can cause a system to spiral out of control. Try running your process then use "vmstat" and "top" to monitor interrupt system activity.
If this is your problem the only fix is to re-examine your source code and look at the way in which it is grabbing resources.