- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: How to limit # of user jobs executing in batch...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2008 06:56 AM
тАО03-21-2008 06:56 AM
I don't want to maintain separate queues per user. The user accounts change frequently. The users are locked in a third-party menu which I don't have much control over (can't make application changes).
I also don't want to make changes in UAF (maxacctjobs, etc.) since I don't want to limit their number of logins, subprocesses, etc.
Any ideas would be much appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2008 07:29 AM
тАО03-21-2008 07:29 AM
SolutionI do not know straight away of something simple.
But you can easily rool your own in SYLOGIN.
If mode eqs batch;
F4GETQUI for the user;
If found & NOT this_job, get entry nr, &
Get info on current job.
SYNC on entry;
Loop back (for potentially user has more than two.
Drawback: job DOES use a job slot,( but no other resources),
If that is cumbersome, then resubmit current job /after=
I hope this will be near enough what you want..
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2008 08:51 AM
тАО03-21-2008 08:51 AM
Re: How to limit # of user jobs executing in batch queue
AFAIK, there is no direct means to control nor to implement this scheduling without some custom coding; the OpenVMS queue manager doesn't consider the username or UIC as part of its scheduling and related processing.
You could use a stopped queue and some software.
Periodically scan the jobs submitted into the stopped queue, either on a timed basis, or upon receipt of an alarm for a queue write, and move the designated jobs over to the execution queue. DCL lexical functions or system services would work here.
Or you could use prolog processing in SYLOGIN that scans for other active jobs when the current job goes "hot", and self-requeues the current batch job based on your criteria.
Slightly fancier, roll your own server symbiont, and park the processing and the queue transfer within.
There are also some potential corner cases here, like what should happen when you have excess computes available. Should you force STAN to run tasks sequentially on the off-chance that OLLIE might need to submit something, even though the processor is otherwise idle and the capacity is available? Or when SNOWWHITE asks DOC to complete a series of tasks before she goes all pumpkin, and the round-robin scheduling is filled with the other six users.
I might also switch approaches (or mix approaches) and take a look at implementing the class scheduler here, too, and set it up to allow all of the the users to submit up to some number of processes, and allow the class scheduler to throttle activity accordingly. See SET PROCESS /CLASS and the sys$sched call and sys$getjpi[w] class stuff, as well as the SYSMAN> HELP CLASS details.
Here's some old (related) stuff, too:
http://mvb.saic.com/freeware/freewarev40/scheduler/
And FWIW, the better phrasing here is probably "not permitted to make changes", and not "can't make application changes". You and I know that we *could* make the necessary changes, even if we have to use an instruction-level patch to do it. :-)
Do ask the third-party for some assistance here, too. As they're certainly permitted to make these sorts of application changes.
Stephen Hoffman
HoffmanLabs LLC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2008 09:46 AM
тАО03-21-2008 09:46 AM
Re: How to limit # of user jobs executing in batch queue
Check out EXECSYMB found at some of the better FTP sites. I expect you could create a server queue through which all users would have to submit their jobs and that server could then funnel them into batch queues based upon your rules. You could control the batch queues by prohibiting direct submission - maybe using an ACL and then add/delete the UIC of the job owner from the queue's ACL while routing to the batch queue. Just a thought...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2008 10:31 AM
тАО03-21-2008 10:31 AM
Re: How to limit # of user jobs executing in batch queue
The idea of submitting to a "stopped" queue and having a job "process" the entries and requeue them has possibilities.
I was already looking into rolling out my own server symbiont but I'm not really sure I wanna go that far (same with class scheduling) just so that my phone stops ringing with users complaining about others hogging the queue. (Hmm maybe it's worth it).
Jim, thanks for the pointer to execsymb. Another system here is actually using that (not sure for what) but I'll take a look at that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-24-2008 04:45 PM
тАО03-24-2008 04:45 PM
Re: How to limit # of user jobs executing in batch queue
Maybe instead of hard limiting your users to a specific number of jobs, you penalise them for each job over your defined "reasonable" limit. Increase the job limit on the queue, so that more users can get their jobs running, but reduce the priority of additional jobs submitted by the same user.
I've posted some (untested) code to scan for batch jobs running under the current username. As written it allows 2 jobs to run at normal priority, then decrements the priority by one for each additional job.
The benefit is a user CAN exploit all the job slots if they're free, but if there are multiple users, the first two jobs for each user get CPU priority.
$ ctx = ""
$ temp = F$CONTEXT ("PROCESS", ctx, "NODENAME", "*","EQL")
$ temp = F$CONTEXT ("PROCESS", ctx, "USERNAME", F$EDIT(F$GETJPI("","USERNAME"),"COLLAPSE"),"EQL")
$ temp = F$CONTEXT ("PROCESS", ctx, "MODE", "BATCH", "EQL")
$ prio=F$INTEGER(F$GETJPI("","PRIB"))
$ me=F$GETJPI("","PID")
$ newpri=prio+2
$ loop: pid=F$PID(ctx)
$ IF pid.NES."".AND.pid.NES.me
$ THEN
$ newpri=newpri-1
$ IF newpri.GT.0 THEN GOTO loop
$ ENDIF
$ IF newpri.LT.prio THEN SET PROCESS/PRIO='newpri'
$ IF F$TYPE(ctx) .eqs. "PROCESS_CONTEXT" THEN temp = F$CONTEXT ("PROCESS", ctx, "CANCEL")
$
(of course, a user could just reset their priority with SET PROCESS/PRIORITY - if that becomes an issue, a SMOP to write a privileged program to reduce the permanent base priority of a process, also safe to install privileged, as long as all it can do is permanently reduce process priority)
Note that a job limit of 6 on a modern Alpha seems a bit low! Most systems can happily run hundreds of simultaneous jobs.
Per-user batch queues, protected by ACL shouldn't be too much of a problem if you write some simple scripts for maintaining accounts. Whenever an account is created, create the queue, and delete it when the account is deleteed. Define SYS$BATCH in SYLOGIN according to username.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-25-2008 04:14 AM
тАО03-25-2008 04:14 AM
Re: How to limit # of user jobs executing in batch queue
The job limit of 6 isn't that low since that's just one batch queue and there are a bunch of queues for different departments. I had just used "sys$batch" as an example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2008 04:27 PM
тАО05-06-2008 04:27 PM
Re: How to limit # of user jobs executing in batch queue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2008 04:36 PM
тАО05-06-2008 04:36 PM
Re: How to limit # of user jobs executing in batch queue
Never mind, I should have tested it before I tried it.
When maxjobs is reached, subsequent jobs are deleted rather than left in the queue. :-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2008 03:51 AM
тАО05-07-2008 03:51 AM