View previous topic :: View next topic |
Author |
Message |
trossachs Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/gallery/Marvel/Marvel_-_Zangief.gif)
Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Sat Jun 12, 2004 1:37 am Post subject: application dependant CPU allocation |
|
|
Sounds complex. Is there any way that I can allocate let's say 80% of the systems CPU resources to "general" processing such as perl scripting and the like which normally demands as much of the CPU as will be made available. And then to reserve the remaining 20% to specific "real time" applications such as VIM where any loss of CPU availability is frowned upon by users?
Or will I need to look at a bigger box such as SPARC or something along these lines? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54850 Location: 56N 3W
|
Posted: Sat Jun 12, 2004 2:24 pm Post subject: |
|
|
JulesF,
You can nice your pearl process(es) so it yeilds the CPU more readily, but not set a hard split. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
trossachs Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/gallery/Marvel/Marvel_-_Zangief.gif)
Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Sat Jun 12, 2004 6:16 pm Post subject: |
|
|
"Nice?" I'm afraid I don't quite understand NeddySeagoon. Is there some sort of menu option where I can choose which apps get access to different parts of the CPU? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
AlterEgo Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/173811519640c8947cd3c4d.gif)
Joined: 25 Apr 2002 Posts: 1619
|
Posted: Sat Jun 12, 2004 6:23 pm Post subject: |
|
|
man nice:
NAME nice - run a program with modified scheduling priority.
Or have a look at verynice:
app-admin/verynice
Latest version available: 1.1
Homepage: http://www.tam.cornell.edu/~sdh4/verynice/
Description: A tool for dynamically adjusting the nice-level of processes
In short, by this you can give certain processes priority over others. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54850 Location: 56N 3W
|
Posted: Sat Jun 12, 2004 6:34 pm Post subject: |
|
|
JulesF,
All processes have a nice value associated with them. Running top will show it in the column headed NI.
The more positive the "nice" value, the nicer the process is to other processes on the system. Interactive processes and processes spawned by users get a default nice of 0. Users can adjust the value for themselves in the range of positive values. Only root may assign negative (nasty??) values to nice. (Be careful if you try this at home)
The upshot of all this is that you can tune system behaviour this way by having the system assign a positive nice value to batch (background) jobs when they are launched.
For example, I run Seti At Home, which is CPU intensive at a nice of 19. It gets out of the way for everything except other tasks with the same nice value. This gives me a CPU load of 1.00 or more becuase S@H is always ready to run but the system does compiles in good time and is always responsive.
See man nice _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nephros Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/145383245043ee5edfbdaa3.png)
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Sun Jun 13, 2004 9:14 am Post subject: |
|
|
Porbably unrelated, but can someone explain to me what the ulimit setting for CPU time does?
if you do a ulimit -a:
Code: | core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 512
virtual memory (kbytes, -v) unlimited |
ulimit is a bash internal command, and the bash manpage is not very informative of the values. All the others are pretty self-explanatory, but how does the "cpu time" limit work? _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|