Tag Info

Hot answers tagged

5

To quote Robert Love: The scheduler does not magically know whether a process is interactive. It requires some heuristic that is capable of accurately reflecting whether a task is I/O-bound or processor-bound. The most indicative metric is how long the task sleeps. If a task spends most of its time asleep it is I/O-bound. If a task spends more ...


4

I am wondering why top and htop don't display -100 for higest priority real time processes ? That's because SCHED_RR and SCHED_FIFO have fixed static priorities from 1-99: Source For realtime priorities, the order is reversed: 99 is indeed the highest one, contrary to the ususal "lower is higher". Per your comment I misunderstood your question, ...


4

Under Linux, by default, a process's IO priority is derived from its CPU priority according to the formula io_priority = (cpu_nice + 20) / 5 IO priority ranges from 0 to 7 with 0 being the highest priority. CPU niceness ranges from -20 to 19 with -20 being the highest priority. You can use the ionice command to change a process's IO priority. If you want ...


3

Have a look at cgroups, it should provide exactly what you need - CPU reservations (and more). I'd suggest reading controlling priority of applications using cgroups. That said, put the important yet often idle processes into group with allocated 95% of CPU and your other applications into another one with allocated 5% - you'll get (almost) all of the power ...


2

I suspect that the most common use case is when you start a program with the default priority, then realize that you meant to run it with a low priority. renice can also be useful if there are certain times when you want to give certain programs a higher priority (e.g. to give the logged-in user's programs a higher priority than that of other users'), but ...


1

The usual approach is to create a wrapper script. Create a script /usr/local/bin/nicer: #!/bin/sh exec ionice -c3 nice /usr/bin/"${0##*/}" "$@" Create symbolic links for each executable that you want to execute through this wrapper, e.g. ln -s nicer /usr/local/bin/myprogram Then when you run myprogram, it will execute the script ...


1

Typically I've only looked at renice when there is a potentially long running process that could bog down the system. For instance when running ffmpeg video conversions I renice those processes so that it doesn't bog down apache for serving web requests. Now in a proper environment the ffmpeg conversions would be running on another server and could not ...


1

As a component of the kernel, the process scheduler, makes the decisions to divide up processor time between processes on a given system using a priority-based scheduling algorithm. Starting with an initial base or default priority of zero (I believe) the scheduler can dynamically increase or decrease priority to fulfill scheduling objectives based on ...


1

One step further @Jordan, Here's the elegant solution against sudo nice -n -xx su <username> -c matlab hack Note: Using username=sid, matlab meta-data dir=/var/lib/matlab, nice=-10 change at your will Create matlab meta-data dir(PERPARE) sudo mkdir /var/lib/matlab Add specified user to launch matlab & right persimisson sudo useradd ...



Only top voted, non community-wiki answers of a minimum length are eligible