How to configure the CA Workload Automation Agent on Solaris and Linux OS to not set the file descriptors (nofile) limit to the maximum (ulimit -Hn)?
search cancel

How to configure the CA Workload Automation Agent on Solaris and Linux OS to not set the file descriptors (nofile) limit to the maximum (ulimit -Hn)?

book

Article ID: 16713

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent

Issue/Introduction

 

The CA Workload Automation System Agent inherits the resource limits of the user that starts it. Normally, the System Agent is started by init daemon during system boot up or the root user starts the System Agent service up and hence the resource limits for the CA WA Agent is the same as those of the /sbin/init process or the root user, except for the file descriptors (nofiles) values.

In the following examples, notice that the file descriptors for the CA WA System Agent is set to the maximum/hard limit.

On Oracle Solaris:

init process limits

# plimit 1
1:      /sbin/init
   resource              current         maximum
  time(seconds)         unlimited       unlimited
  file(blocks)          unlimited       unlimited
  data(kbytes)          unlimited       unlimited
  stack(kbytes)         8192            unlimited
  coredump(blocks)      unlimited       unlimited
  nofiles(descriptors)  256             65536
  vmemory(kbytes)       unlimited       unlimited

 

CA WA Agent process limits

# plimit 11149
11149:  ./cybAgent.bin -a
   resource              current         maximum
  time(seconds)         unlimited       unlimited
  file(blocks)          unlimited       unlimited
  data(kbytes)          unlimited       unlimited
  stack(kbytes)         8192            unlimited
  coredump(blocks)      unlimited       unlimited
  nofiles(descriptors)  65536           65536
  vmemory(kbytes)       unlimited       unlimited

 

On SUSE Linux Enterprise Server 11:

init process limits

# ps -ef | grep "init\s"

root         1     0  0 Aug02 ?        00:03:58 init [5]

# cat /proc/1/limits

Limit                     Soft Limit           Hard Limit           Units

Max cpu time              unlimited            unlimited            seconds

Max file size             unlimited            unlimited            bytes

Max data size             unlimited            unlimited            bytes

Max stack size            8388608              unlimited            bytes

Max core file size        0                    unlimited            bytes

Max resident set          unlimited            unlimited            bytes

Max processes             62856                62856                processes

Max open files            1024                 4096                 files

Max locked memory         65536                65536                bytes

Max address space         unlimited            unlimited            bytes

Max file locks            unlimited            unlimited            locks

Max pending signals       62856                62856                signals

Max msgqueue size         819200               819200               bytes

Max nice priority         0                    0

Max realtime priority     0                    0

Max realtime timeout      unlimited            unlimited            us

CA WA Agent process limits

# ps -ef | grep "cybA.*a$"

root     13558     1  2 07:26 ?        00:00:03 ./cybAgent.bin -a

#cat /proc/13558/limits

Limit                     Soft Limit           Hard Limit           Units

Max cpu time              unlimited            unlimited            seconds

Max file size             unlimited            unlimited            bytes

Max data size             unlimited            unlimited            bytes

Max stack size            8388608              unlimited            bytes

Max core file size        1024                 unlimited            bytes

Max resident set          7012638720           unlimited            bytes

Max processes             62856                62856                processes

Max open files            8192                 8192                 files

Max locked memory         65536                262144               bytes

Max address space         10041098240          unlimited            bytes

Max file locks            unlimited            unlimited            locks

Max pending signals       62856                62856                signals

Max msgqueue size         819200               819200               bytes

Max nice priority         0                    0

Max realtime priority     0                    0

Max realtime timeout      unlimited            unlimited            us

 

All child processes of the CA WA Agent process inherit the same resource limits from the Agent. This might result in failure or unexpected behavior of jobs that need more file descriptors.



How to configure the CA Workload Automation Agent on Solaris and Linux OS to not set the file descriptors (nofile) limit to the maximum (ulimit -Hn)?

Environment

CA Workload Automation Agent for Linux and UNIX 11.3+

Resolution

 

The reported scenario with the System Agent is due to the default Java behavior. Java by default bumps files descriptors (nofiles) to the maximum (hard limit, i.e. ulimit -Hn). To inhibit this behavior, we can use the -XX:-MaxFDLimit command line option of the Java process. 

Set the following parameter in the CA WA System Agent agentparm.txt file to honor the aforementioned Java option.

oscomponent.jvm.x.options=-XX:-MaxFDLimit

Restart the CA WA System Agent service for the setting to take effect and notice the file descriptors soft (current) and hard (maximum) limits are different:

 

On Solaris OS:

# plimit 328

328:    ./cybAgent.bin -a

   resource              current         maximum

  time(seconds)         unlimited       unlimited

  file(blocks)          unlimited       unlimited

  data(kbytes)          unlimited       unlimited

  stack(kbytes)         8192            unlimited

  coredump(blocks)      unlimited       unlimited

  nofiles(descriptors)  256             4096

  vmemory(kbytes)       unlimited       unlimited

 

On SUSE Linux Enterprise Server 11:

# ps -ef|grep [c]yb
root      3161     1  0 Dec04 ?        00:03:49 ./cybAgent.bin -a

# cat /proc/3161/limits

Limit                     Soft Limit           Hard Limit           Units

Max cpu time              unlimited            unlimited            seconds

Max file size             unlimited            unlimited            bytes

Max data size             unlimited            unlimited            bytes

Max stack size            10485760             unlimited            bytes

Max core file size        0                    unlimited            bytes

Max resident set          unlimited            unlimited            bytes

Max processes             30445                30445                processes

Max open files            4096                 10240                files

Max locked memory         65536                65536                bytes

Max address space         unlimited            unlimited            bytes

Max file locks            unlimited            unlimited            locks

Max pending signals       30445                30445                signals

Max msgqueue size         819200               819200               bytes

Max nice priority         0                    0

Max realtime priority     0                    0

Max realtime timeout      unlimited            unlimited            us

Additional Information

https://bugs.openjdk.java.net/browse/JDK-8010126