|
Policies Links
|
|
CPU Intensive Jobs
People who make heavy use of computing resources are expected to know enough about the systems to do so in a manner that does not interfere with the needs of other users. This includes gaining an understanding of the UNIX Operating System, I/O redirection, memory organization, and process management commands (e.g. "nice", "nohup", "batch", "at", "ps", and "kill"). It is the responsibility of these users to read and under- stand the documentation to reach the level of expertise expected of them. Most of this information is available on-line or from the TA office.
Requirements
Users that need to run CPU intensive jobs need to observe the following rules:
- A "CPU intensive" job is any job/process needing more than 5 minutes of CPU time.
- All CPU intensive jobs must be executed via the "batch" command. This detaches the program from the terminal so the next user to sign on doesn't interrupt your program (and vice-versa). Also, if done properly, it automatically sends you email when the program ends.
- All CPU intensive jobs must be "niced" by a value of 10 or greater. (The "batch" command does this for you.)
- CPU intensive jobs must be run one at a time. A user may run only ONE such job at any given time.
In addition to the requirements above, SEAS/CF strongly recommends that you adopt the following practice:
- Anything that takes more than a few hours to run should check- point its work at least once every CPU-hour. That way, if the program (or the computer) crashes, the job can be resumed with minimal loss.
Most of the SEAS/CF systems are rebooted every Monday morning for preventive maintenance. In addition, systems are occasionally shut down for repairs, upgrades, or diagnostic work. SEAS Computing Facility cannot guarantee uninterrupted "up-time"; however, down-time will be scheduled well in advance, whenever possible.
- It is recommended that you advise the SEAS staff of your special requirements or heavy system usage. This will help the staff monitor the system and schedule downtime. Send mail to user "root" to notify the system staff.
The systems staff routinely monitors the state of all the SEASCF UNIX computers. Any jobs/processes not in conformance with these requirements (1-4) will be terminated.
Example
Here is an example which conforms to the given requirements ("user@hobbes" and "at>" are prompts from the computer; everything else is typed by the user):
user@hobbes: batch
at> myprog myprog.out
at> echo "myprog is finished"
at> ^D (that's control-D to end the script)
user@hobbes:
(Note: The "batch" command may or may not give the "at>" prompt, depending on which machine you are using.
This will run "myprog" in the background, with a suitably low priority, completely detached from the terminal you are on. Input to the program will come from the "myprog.data" file (which should be prepared prior to typing the "batch" command) and output from the program will go to "myprog.out". The output of the "echo" command will be sent to you via email, along with any error messages from the program, as soon as the batch job is finished.
KSH Example
Most of our users run "ksh" as their command shell, but not many make use of its special features. However, if you need to use ksh-specific features (ksh-aliases, ksh-functions, "~" path expansion, etc.) you should do so by creating an executable shell script containing the commands you wish to run in the background. For example, a file which contains this:
#!/bin/ksh
echo ~
when fed to the batch system will run under the ksh shell, and will print the name of your home directory (using the built-in ksh "~" feature). The output arrives in your mailbox when the batch job is finished.
The file (let's call it "myfile") must contain "#!/bin/ksh" as its first line and must be made executable by issuing the UNIX "chmod" command like this:
chmod +x myfile
Then it may be fed to the batch system with something like this:
user@hobbes: batch
myfile
echo "myfile is finished"
^D (again, that's control-D to end the script)
Availability
The "batch" command is available on hobbes only at SEASCF. The other systems are intended primarily as graphics systems or file servers.
|