|
|
|
|
| The Basics of Performance |
|
The response time of a given system or application is made up of
four basic elements
 |
Processing time, this the time the CPU is executing instructions on behalf
of the application.
|
 |
Memory, this is the time the application is waiting for
memory, or in a page-wait state. This includes memory pages
being retrieved from disk
|
 |
I/O, the time the application is waiting for disk, excluding memory related
I/O
|
 |
Communications, the time involved in the transfer of the data across
the network to the requesting application.
|
|
| |
| Processing Element |
|
All things being equal the faster the processor the more
instructions can be executed per second. There are many
benchmarks and standards for measuring and comparing CPU speeds -
most are meaningless in the real world.
At a given time the processor can be one of three states
| System State |
When the CPU is executing kernel
code on behalf of the application it is referred to a System State.
It also includes calls to administrative functions on behalf of
the application. The programmer has no direct control over this
state but can influence it.
|
| User State |
When the CPU is executing the application
code it is in User State. This code is under the programmers
direct control
|
| Wait State |
When the CPU has nothing to do it is in Wait
State. Depending on which utility is being used to view the CPU
usage the Wait State might include the time spent waiting for disk.
|
| | |
| Memory Element |
|
There are two real areas of concern when it comes to
memory.
Paging: Paging in a Unix system is not generally a problem, it
only becomes a problem when it is excessive. The speed of the disk
sub-system can be seriously degraded when large amount of paging
occur.
Swapping: If the memory requirements for the application exceeds
the memory that is available then the kernel can be start
swapping. Swapping will only start to occur when the memory
is very low, any swapping shows that the system is very short of
memory.
| | |
| Measuring Performance |
|
In most cases most, if not all the following will need to
be measure and analysed.
Response rate
Transaction rate
Paging rate
IO rate
Disk (and other IO) access times
CPU utilization
The response rate is probably the easiest to understand and to measure
but it is the sum of, potentially, a large number of separate elements,
and everybody involved with the system has their own interpretation of
the response time. The end user, for example, might consider
the response time to be the time taken to complete a series of complex
task, whereas the DBA might consider each element of that task to
have it's own distinct response time.
The system response time, or internal respose time, is the time the system takes from receiving an instruction to do something to the point where it completes it's task. This is time most DBA and administrators would define
as the response time, however, it does not include any communication
delays that the user might experience. This can, and often does, lead
to performance perception problems between the administrators of
the system and the end user community.
| | |
| Measuring Performance |
|
Most hardware vendors provide their own set of measuring tools that
are specific to their version of the operating system, eg Sun has
proctool, IBM has perf. Fortunately, there are a number of standard
Unix utilties that exist on most platforms althought the exact
measurement that is being taken might vary. The most common and useful
utilities are:
vmstat
iostat
mpstat
sar or sa
time and timex
ps
It is important to realise that although most Unix vendors offer these
tools they don't always report the same data, and in some cases the
column title might be historical and bear little resemblance to the parameter
being reported.
Informix also provides a number of utilites for monitoring performance
onstat - onstat provides a window into the shared memory structures that Informix uses
The SMI tables
oncheck - oncheck is a check and repair utility for the database tables and index
onperf - a grahical view of the Online engine
|
|
|
|
|
|
|