ER4 Policy: Remote and Background Processes
This policy is in place to ensure the fair distribution of computing resources among the many persons using them.
Statement of Policy
- Users are entitled to log into the console of one, and only one, workstation.
- Users who are logged into the console of a Windows-based workstation may make a remote connection to one Unix system.
- Users may not run more than one remote or background process at a time.
- Processes that are submitted to the remote access cluster may be run at normal process priority.
- Processes that are submitted to Unix systems that permit on-console sessions or processes that are left behind as background processes on such systems, must be run at the lowest possible priority.
- Processes such as web browsers and full-blown CDE or KDE sessions may not be run remotely on the ER4 systems. All such functionality is available on your local system and does not consume network or ER4 resources.
Policy Definitions
- The process priority requirements of this policy are not applied to such processes as shells or SSH connections. Those processes are recognized as required overhead. The policy is intended to apply to resource-intense processes such as (but not limited to) Matlab, Mentor Graphics and Cadence.
- A remote process is defined as any process running on a system on which the user is not logged into the console.
- A back-grounded process, in the context of this policy, is defined as a process that is started during an interactive console session but continues to run after the user logs out of that session.
- On-console capable systems are currently defined as all ER4 Red Hat workstations.
Policy Enforcement
Users found in violation of this policy may have their processes terminated without warning. Repeated violations may result is suspension of account privileges.
It is recognized that at certain times the ER4 facilities are under-utilized. At these times exceptions may be made to the one-process limitation. Submit a request to the site staff by sending email to site@ece.osu.edu if you wish to apply for an exception. All requests for exceptions must be approved prior to processes initialization.
Methods of Process Control
The best tool for listing Unix processes is the ps command. To get a "long" listing of all your own processes, including such information as process priority, use the following command:
ps -flu username
The returned information will look something like this:
er4rh016-juodvalk> ps -flu juodvalk
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
5 S juodvalk 2923 2919 0 75 0 - 2165 - 13:26 ? 00:00:00 sshd: juodvalk@pts/1
0 S juodvalk 2924 2923 0 75 0 - 1871 rt_sig 13:26 pts/1 00:00:00 -tcsh
0 T juodvalk 2954 2924 0 76 0 - 2316 finish 13:27 pts/1 00:00:00 vim Untitled1..doc
0 R juodvalk 2959 2924 0 77 0 - 953 - 13:27 pts/1 00:00:00 ps -flu juodvalk
Of interest here are the "PID" which is the process identifier and is used when interacting with the process, the "NI" value which tells how "nice" a process is, and the "COMD" value which identifies the running process by name.
To be in compliance with this policy, any resource intense process should be set to the lowest priority level possible. This is accomplished by raising the "nice" value. In this case, the nicer a process is, the less resources it will consume. Of the four processes listed above, PID 2924 is the shell process and PID 2923 is the SSH daemon. Both of these processes are accepted overhead and may run as is. PID 2959 is the ps command used to get that information and also may run as is. vi is a simple text editor and would normally not be treated as a resource intense package, but for the purpose of this demonstration we will treat it as though it were.
The current "nice" value of PID 2954 is "0". This is the default nice value for all user initiated processes. To be as nice as possible, this value should be "19". This change in value is made by the "renice" command. Its man pages may be referenced for full details, but to simply change the nice value of a process so that it complies with this policy, the following command can be used:
er4rh016-juodvalk> renice 20 2954
2954: old priority 0, new priority 19
Having executed that command, the new priority can be seen with a second ps invocation:
er4rh016-juodvalk> ps -flu juodvalk
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
5 S juodvalk 2923 2919 0 75 0 - 2165 - 13:26 ? 00:00:00 sshd: juodvalk@pts/1
0 S juodvalk 2924 2923 0 75 0 - 1871 rt_sig 13:26 pts/1 00:00:00 -tcsh
0 T juodvalk 2954 2924 0 99 19 - 2316 finish 13:27 pts/1 00:00:00 vim Untitled1..doc
0 R juodvalk 3000 2924 0 77 0 - 1023 - 13:28 pts/1 00:00:00 ps -flu juodvalk
It can be seen that the NI column now shows a value of 19 for PID 2954. This is the desired result.
To start a process with an initial NI value of 19, the "nice" command can be used at the time of invocation. The following is used to start an emacs process at an already nice level:
er4rh016-juodvalk> nice +20 xterm -ls &
[2] 3039
The emacs process can now be shown to have started with the correct nice value:
er4rh016-juodvalk> ps -flu juodvalk
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
5 S juodvalk 2923 2919 0 75 0 - 2165 - 13:26 ? 00:00:00 sshd: juodvalk@pts/1
0 S juodvalk 2924 2923 0 75 0 - 1872 rt_sig 13:26 pts/1 00:00:00 -tcsh
0 T juodvalk 2954 2924 0 99 19 - 2316 finish 13:27 pts/1 00:00:00 vim Untitled1..doc
0 S juodvalk 3039 2924 0 96 19 - 1258 - 13:31 pts/1 00:00:00 xterm -ls
0 R juodvalk 3042 2924 0 77 0 - 841 - 13:31 pts/1 00:00:00 ps -flu juodvalk
Questions and Comments
Questions about the enforcement of this policy may be sent to site@ece.osu.edu.
Questions or comments about the content of this policy may be sent to rcc4@ece.osu.edu.
|