Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Currently I'm running several applications on a server. It's a 2.6.21.3 Linux kernel with Preemption and a 1000Hz kernel. I have a highly CPU intensive application. However, when the application starts using a lot of CPU usage (above 80% of one core), Linux seems to adjust the process priority. I need this to have as consistent of a priority as possible.
Basically:
I need to squeeze every ounce of performance out of this server as possible without setting CPU priority, however, the kernel isn't making that possible as it's changing the application to a low priority.
How can i go about changing this?
Thank you.
Last edited by SAMPCam; 03-14-2008 at 01:28 PM.
Reason: typo
Currently I'm running several applications on a server. It's a 2.6.21.3 Linux kernel with Preemption and a 1000Hz kernel. I have a highly CPU intensive application. However, when the application starts using a lot of CPU usage (above 80% of one core), Linux seems to adjust the process priority.
How did you assess that?
Quote:
Originally Posted by SAMPCam
I need to squeeze every ounce of performance out of this server as possible without setting CPU priority, however, the kernel isn't making that possible as it's changing the application to a high priority.
Which application is that? Surely not the same one as you
suggested above that it's throttling it?
Well, the kernel priority (PR) goes up. (as in the number, higher the number, lower the priority). nice stays the same however.
The application is the infamous Source Dedicated Server.
I also believed I made an error in the post above that might have confused you. "kernel isn't making that possible as it's changing the application to a high priority."
Currently I'm running several applications on a server. It's a 2.6.21.3 Linux kernel with Preemption and a 1000Hz kernel. I have a highly CPU intensive application. However, when the application starts using a lot of CPU usage (above 80% of one core), Linux seems to adjust the process priority. I need this to have as consistent of a priority as possible.
Basically:
I need to squeeze every ounce of performance out of this server as possible without setting CPU priority, however, the kernel isn't making that possible as it's changing the application to a low priority.
You are asking for two conflicting goals. If you want to maximize the speed that the application runs then you need to set the application as the highest priority application process in the machine.
If you are trying to get the maximum performance out of the server then you need to let Linux dynamically adjust all of the processes' priorities to get the maximum amount of work through in the shortest possible time. If you are trying for maximum server throughput then Linux will push cpu bound processes toward the bottom of the priority queue.
I agree, it's impossible without setting priority. You must set the priority to be higher than the rest. I don't understand why you don't want to up the process priority, can you explain. I mean this is what process priority was designed for ... so ... I don't get it.
EDIT:
I don't really see what you're trying to do, but if you must not change the process priority:
1) Try changing your IO scheduler. You can change these on the fly, no need to recompile the kernel
The following will require kernel re-compile:
2) If you running a server, why not 'No Forced Preemption (Server)' and Timer Frequency as '100 Hz' (or 250 Hz if it's not 100 % a server), the setup you are currently running is designed for desktops ...
Last edited by H_TeXMeX_H; 03-16-2008 at 02:28 PM.
When I've needed to isolate workload(s) to CPU boundaries, I have used cpusets - now subsumed into control groups.
Might work for you - when you can guarantee a particular CPU/core to only that task, you will find it will tend to run unhindered. Depends if you want it to have all of an engine, and if 1 is enough (you can add more engines to the group in need).
Your processes could be freezing because of your fiddling with the priorities.
Let everything run at normal priority. If you're having "freeze-ups" long enough for you to perceive as a human, it has nothing at all to do with process priorities.
Generally, the dispatcher will distinguish between "CPU-bound" processes that tend to consume their full time-slice, and "I/O-bound" processes that tend not to.
CPU-bound processes decline in priority, but that doesn't mean they get less attention from the CPU! It just means that I/O-bound processes get to play through... because they're almost certain to start another I/O operation and go right back to sleep again. CPU-bound processes absorb all the time they can use.
The application freezes for about 1 second as it only freezes when the process priorities are set. The CPU usage spikes up to 100% for that short period of time which causes the freeze. That's bad when you're trying to run a high-performance game server. However, if you don't set the CPU priority, once it reaches around 80% CPU, the Linux kernel PR goes up, and then it starts to lag really bad, constantly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.