James,

On 3/11/26 7:14 PM, James H. H. Lampert via users wrote:
On 3/11/26 3:53 PM, Konstantin Kolinko wrote:
. . .
   # Set job priority to standard for interactive (interactive - 6) by using    # the interactive priority - 6, the helper threads that respond to requests
   # will be running at the same priority as interactive jobs.
   COMMAND='chgjob job('$JOBNAME') runpty(6)'
. . .

Thanks. I saw the comment in the code, but omitted it when quoting, to avoid risking having the long comment lines wrap, obscuring the meaning of the excerpt.

And I have no idea how to go about finding the commit that put that block into the code, so thank you VERY MUCH for doing that.

It sounds like whoever did commit 421604 didn't understand how run priority (RUNPTY) works on IBM Midrange boxes. The range is from 1 (highest priority, preempts everything) to 99 (lowest priority, preempted by everything) As I said, most terminal sessions run at RUNPTY(20), while most batch jobs run at RUNPTY(50). It's considered extremely unusual (I've been working with IBM Midrange boxes for 3 decades now, and only just now was made aware of it) for anything other than the console to run at priority 10 or better.

It's entirely possible that only that individual would be able to explain what the CHGJOB RUNPTY(6) is doing there.

And I'm not entirely sure how that interacts with threadPriority in Java, either. Nobody has complained about the JVM job on their Tomcat server going "runaway" with that RUNPTY(6).

I agree that this was probably originally written by someone who didn't understand how priorities work on OS400.

I *am* very curious whether this priority is taking effect, as it's looking for an OS string that begins with "OS400". If you run "uname" at your command prompt, what does it print? IIRC, you were running Tomcat inside of a Linux VM because "it was easier" or something like that. If that's the case, than the OS400-related stuff won't be running at all.

Run priority 6 for an IBM i Series server does seem quite high. It should probably be 10 or higher (i.e. lower), but it really depends upon the expected use.

If it's one of 10,000 processes running on the server, then yeah lower priority probably makes sense. If you have a thin application and most of the application is really hidden elsewhere (e.g. inside a database) then priority doesn't matter much: most of the time spent in Tomcat code will just be waiting on I/O, so the priority is irrelevant. And, if nobody has noticed for a long time, maybe it doesn't matter?

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to