Sequoia Hall
Home Academics Research Seminars Consulting Industrial Affiliates People
    
Computing Guide
Our Brochure
Contact Us
Sitemap
Links



13. Running Computer Intensive Jobs

Previous Computing Guide Contents Next

Remember that our server is used by many users. Therefore, substantial jobs should not be run without some modification as to their priority. Job priorities are on a numeric scale with higher numbers indicating lower priority. Typically, interactive jobs are run with a priority determined to increase responsiveness to the user. So simple interactive jobs, such as an R session, or even small one-off jobs can be run without worrying about priorities as the load tends to go high only temporarily.

Large jobs in either dimensions of time or memory, however, must be given a lower priority (higher number), so as not to annoy other users. This is because the sustained high demands of the job will ruin interactivity for others. Note that we reserve the right to terminate jobs without warning if we have to.. Judging by the usage in our department, most people tend to run large R jobs along the lines of

miller 1% R < script.R > script.out &
An easy way to fix the priority of the running job is to use the top command and obtain the process id of the job (thecolumn labelled PID). Here for example is sample output from running the command top at the system prompt.

top - 17:38:41 up  3:19, 28 users,  load average: 0.04, 0.10, 0.39
Tasks: 252 total,   1 running, 251 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.5% us,  0.8% sy,  0.0% ni, 94.1% id,  2.5% wa,  0.0% hi,  0.2% si
Mem:  32912996k total,  6691908k used, 26221088k free,   142444k buffers
Swap: 24579440k total,   180692k used, 24398748k free,  5813028k cached

PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND 12735 foobar 25 0 7 0:00.29 0.1 751m 98m 9.8m S R 6213 root 15 0 2 3:42.30 0.0 48708 14m 4252 S X 4654 rpc 16 0 1 0:36.91 0.0 4756 628 504 S portmap 4985 root 16 0 1 0:17.75 0.0 8164 928 572 S rpc.mountd 12571 foobar 15 0 1 0:00.17 0.0 102m 7628 5324 S metacity 12584 foobar 15 0 0 0:00.22 0.0 141m 14m 8292 S gnome-panel 12586 foobar 15 0 0 0:00.60 0.1 173m 22m 9956 S nautilus 12628 foobar 15 0 0 0:00.16 0.0 137m 10m 7396 S wnck-applet 12733 root 16 0 0 0:00.05 0.0 6288 1276 848 R top
The PID is the process number. Suppose user foobar wants to renice his R process. He notes his process id (PID) 12375 and executes:

miller 2% renice 19 12735
May job ids may be specified, separated by spaces. You can check the priority of your running process once again using the top command. Check the column labelled NI which should show the new priority.

Note that it is your responsibility to watch the disk and memory usage of a job.

13.1 Matlab jobs
For running Matlab jobs in the background, you have to put your Matlab commands into files, say foo1.m and foo2.m. Be sure to end the commands in foo1.m and foo2.m with exit so that matlab will end the session after running the commands. Then you can mimic the instructions above.

13.2 Memory-sucking, disk-grinding, in-your-face jobs
You better send e-mail to stat-action before running any monsters and wait for a reply. Otherwise, they will most likely be nuked.

13.3 More info
You can find more info via the man page for the commands nice and renice.

miller 3% man nice


Previous Computing Guide Contents Next


Contact  | Sitemap  | Directories  | Maps  & Directions  | Giving to Stanford
Copyright 2004Stanford University. All Rights Reserved. Stanford, CA 94305, (650) 723-2300
Terms of Use Copyright Complaints