The HP-UX Parallel rc Framework

For example - if the sc
ript under investigation is /sbin/rc2.d/S730cron, then run the following
command:
rcutil –p S730cron
Manually inspect the scripts run in parallel with the given script. If it appears that the given script
depends on some of these scripts, or if some of these scripts share a resource with the given script,
then place a dependency from the given script on these other scripts.
For example - if S730cron runs in parallel with S220syslogd, S416ldapclientd, S500inetd,
S870swagentd and S900samba and if S730cron depends on S220syslogd and shares resources
with S500inetd, then specify a dependency as follows:
rcutil –s S730cron:S220syslogd,S500inetd
After placing this dependency, measure the time taken by the given script to execute with the Parallel
rc Execution Infrastructure turned on. If the time taken to execute is still substantially greater than the
time taken to execute sequentially, then revert the dependencies specified and debug further.
For example, to revert dependencies for S730cron, run the following command:
rcutil –r –s S730cron:S220syslogd,S500inetd
To find resource conflicts, the following tools can be used:
top(1) CPU conflicts
vmstat(1) Memory and swap conflicts
iostat(1) IO conflicts
sar(1M) CPU, swap, IO and kernel resource conflicts
HP caliper General purpose performance analysis tool
The given rc script can be instrumented to run the above tools. The output of the tools can either be
redirected to a file or to stdout. For more information on how to use these tools, see the respective
manuals available at
http://www.hp.com/go/hpux-core-docs
.
For example, consider the case where rcutil reports that S730cron and S500inetd run in parallel. In
order to find whether the scripts contend on CPU, place the following command line at the beginning
of S730cron.
top –s 1 –d 5 &
This would run top(1M) for 5 seconds, gathering CPU statistics every second. The output of top(1M)
will show what other processes are contending for the CPU along with those started by S730cron. If it
can be determined that processes started by S500inetd contend for the CPU, then placing a
dependency from S730cron to S500inetd may resolve the bottleneck.
rcutil –s S730cron:S500inetd
System Configuration Guidelines
The benefits from Parallel rc Framework can be seen on multi processor systems with higher memory
configuration. When scripts are run in parallel, they may contend for processor or memory resource.
Minimum of 4 processors and 4GB RAM is recommended. Depending on the products installed,
benefits can be seen on lower configurations as well. As a result, it is recommended to enable Parallel
rc on a test system and measure the benefits before deploying the same on production systems.