40.6 System V.4 Batch QueuesAt many UNIX sites, batch submission systems are considered a thing of the past. This is unfortunate. Batch execution is an effective way to get a lot of work done, particularly in a production-oriented environment. A batch queue is one of the best ways to ensure that a computer remains active during off hours. The at command leads to "bursty" execution: you will see a lot of activity at midnight, 1 a.m., 2 a.m., and other popular submission times, trailing off as the jobs complete. A batch queue will keep the system running on an even keel as long as there is work left to do. System V.4 and SunOS have added a very simple batch queue facility. This facility is really just a variation of the at command, except that you can't specify when you want to run the job. The system has a single batch queue that executes jobs in the order in which they are entered into the queue. Submit a job to the queue with the command: % If you have written your job as a shell script, you can submit it as: % But check your online batch manual page to be sure that your system will run it with the right shell. To delete jobs from the queue, use atq and atrm (SunOS) or at -l and at -r (V.4). The queue facility is so simple that it's pathetic: it doesn't support multiple queues, queue priorities, and other features that you really need if you want batch submission. But it will do one important thing. If users use batch queues for their big jobs, they will guarantee that, at most, one large program (whether it is the compiler, an engineering application, or whatever) is running at a time. That may be all you need to restore order to a troubled system. - from O'Reilly & Associates' System Performance Tuning , Chapter 3 |
|