| << Previous Tip | > Tips Table < | Next Tip >> |
Using Monitor NLM to |
|
While most NetWare Administrators are familiar with the Monitor NLM
provided by Novell with NetWare v3 and v4, not many are aware of the
Processor Utilization option. Even fewer understand how this option
can be used to gain insight into the activity associated with the
various NLMs, Threads, and Interrupts on a NetWare Server. For those
completely unfamiliar with the Processor Utilization option, it is
one of the menu options in the Monitor NLM by default in the Monitor
NLM accompanying NetWare v4 and when the -P command line option is
used (LOAD MONITOR -P) for NetWare v3.
The real value of the Processor Utilization option lies in the fact
that NetWare is not a pre-emptive Network Operating System (NOS).
Without pre-emption NOS, CPU control remains with executing processes
until such time as the process performs a system request which will
force control to be passed back to the task scheduler; or the process
intentionally relinquishes control through a thread switch or sleep
function.
This problem is compounded by the need to design NLMs using a
different methodology from that of single-tasking DOS workstation
programs. Unfortunately, more NLM developers originate from the
single tasking DOS conditions than from the multi-tasking OS/2 and
UNIX environments. Even those NLM developers who are familiar with
other multi-tasking environments are typically used to the
pre-emptive nature of those environments which will forcibly insure
CPU time slicing.
These tendencies can cause some NLM developers to focus too much on
the task at hand; rather than on the overall environment. The result
is what is often referred to as 'ill-behaved' NLMs. The information
provided by the Processor Utilization option can be used to identify
the source of potentially excessive resource loads on the Server
during periods of peak processor activity.
Upon selecting the Processor Utilization option from the Monitor main
menu, a sub-menu will appear listing the active processes at that
particular moment. Here it should be noted that the list of processes
is only updated upon selection of the Processor Utilization option from
the main menu. Therefore, threads which are initiated after the
Processor Utilization option is selected, threads that are
subsequently activated by previously loaded NLMs or as a result of
additional NLMs being loaded, will not appear in the list. Moreover,
those threads which were active at the time the option was selected
but have since terminated remain in the list despite being non-existent.
The processes shown in the list represent both active threads and
interrupts associated with the Server's present state. Some of the
threads are specific to NetWare, while others are associated with
various Novell and third party NLMs which are loaded at that time.
While the sub-menu of active processes is displayed, it is possible
to look at the activity associated with a single process by
positioning the highlighted bar over the desired process and
pressing enter. Multiple processes can be selected by pressing the
F5 function key whenever the highlighted bar is positioned over a
desired process to mark it; and then pressing the enter key once
all desired processes have been marked. All of the listed processes
can be selected by pressing the F3 function key.
Upon selecting one or more processes to view, a screen will appear
with each of the processes listed on a separate line, along with
three columns of data with the headings Time, Count, and Load.
Following the list of processes are the histogram values: The
maximum possible time slice; The overhead associated with tracking
the selected information; And, the adjusted or weighted value which
will be used as the sample for calculating Processor Utilization.
The data associated with each process and the histogram overhead
are updated once per second.
The first column (Time) indicates the amount of CPU time spent
executing code within the process (i.e., the thread or Interrupt
Service Routine). The higher this value, the more CPU time that
the process actually consumed. This value is directly related to
the load imposed on the Server by the process.
The second column (Count) shows how many times the process was
executed over the last second. This value, if taken alone, can be
confusing. The higher this value, the more often the process was
executed which is representative of a level of activity. In the same
respect, each count also represents a point where the process has,
through design or by force, relinquished control so that other tasks
can be run. Therefore, if other tasks had needed CPU time, they
would have had the opportunity to allocate time during each such
relinquish of control by the process.
The third column (Load) is a calculation of the relative CPU load
imposed by the associated process. The Load percentage is based
upon the adjusted or weighted maximum processing time.
Some processes poll for tasks by checking a flag each time executed.
If the flag is set, the process will perform the task and then
resume polling for tasks. Otherwise, the process will relinquish
control to other processes via a ThreadSwitch() or
ThreadSwitchWithDelay() function. Once control returns to this
process, it will then resume polling for tasks.
These processes may appear to impose heavy loads upon the Server
although the utilization reported by the Monitor NLM remains low.
In reality, the process is really doing nothing more than spinning
while looking for something to do. As more processes become active,
the Load associated with this process will be reduced since its
continuous relinquishing of control allows the other processes to
allocate CPU time. In this instance, the values can be confusing
since the process will actually reduce its Load the more active
the Server becomes.
An example of such a process can be found in NetWare's internal
Polling Process (NetWare v3, it has been more appropriately renamed
to the Idle Loop in NetWare v4). NetWare's Polling Process
(or Idle Loop) continuously checks for tasks to do. Upon
discovering a task needing service, it spawns the appropriate
process and resumes its polling for tasks. Thus, the Polling
Process (or Idle Loop) ideally should be the most active process
on a NetWare Server: The one constantly looking for something to
do, versus those actually performing tasks.
Key things to watch for are processes which consume a higher than
average amount of time and infrequently relinquish control (i.e.,
high Time and low Count). Such processes tend to indicate an NLM
which is not necessarily well behaved.
|
| << Previous Tip | > Tips Table < | Next Tip >> |