Re: Can you stack nice and ionice?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03May2012 16:08, Richard Shaw <hobbes1069@xxxxxxxxx> wrote:
| I have a CPU and IO intensive task I'd like to tame a bit but I'm not
| sure if this can be done in a one-liner. Since both nice and ionice
| are designed to run only a single command I'm not sure if the
| following would work:
| 
| ionice -c3 nice -n19 <process>
| 
| It looks like to me that ionice is going to run nice who's going to
| run the task.

Should work just fine. ionice _is_ running just one command:

  nice -n19 <process>

Note that "<process>" will need to be a command, and not something like
"-p pid".

| I tried examining the first example using pstree but I don't think the
| processes "stacked".

They will exec, so no parent/child stuff. ionice will set the ionice
setting then exec the next command. Likewise nice.

There are plenty of little commands with this behaviour: make a setting
change and then execute comething with the new setting: env etc. I've
got a bunch of shell scripts with similar usage patterns as well. These
"prefix" commands make a lot of simple things very easy to express in
scripts.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Like dogs and muggers, transistors can sense fear.      - Norman Yarvin
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux