Section 7.10. Exercises

   

7.10 Exercises

  1. Install a system call trace utility like strace on your system. Use it to trace an Oracle kernel process. In a separate window, view the SQL trace output as it is emitted (using tail -f or a similar command). What timing calls does the Oracle kernel make on your system? In what sequence are the timing calls made? Does your system's behavior resemble the behavior described in Example 7-2?

  2. Run the program listed in Example 7-4 on your system. What is the average measurement intrusion effect of one gettimeofday call on your system?

  3. The Perl program in Example 7-7 saves the values returned from a rapid-fire sequence of times system calls. It traverses the list of saved values and prints a value only if it differs from the prior value in the list. What, if anything, does running this program indicate about the resolution of CPU resource accounting on your system?

    Example 7-7. A Perl program that executes a rapid-fire sequence of times system calls
     #!/usr/bin/perl use strict; use warnings; use IO::File; autoflush STDOUT 1; my @times = (times)[0]; while ((my $t = (times)[0]) - $times[0] < 1) {     push @times, $t; } print scalar @times, " distinct times\n"; my $prior = ''; for my $time (@times) {     print "$time\n" if $time ne $prior;     $prior = $time; } 
  4. At www.hotsos.com, we have several millions of lines of Oracle8 i trace data that resemble the following:

     FETCH #1:c=1,e=0,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=3,tim=17132884 

    Explain how this can occur.

  5. In Oracle9 i , trace file lines like the following occur as frequently as the phenomenon described in the previous exercise:

     PARSE #7:c=10000,e=2167,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=0,tim=1016096093915846 

    Explain how this can occur. How different is this phenomenon from the one described in the previous exercise?

  6. Write a program to test the thought experiment shown in Example 7-6. Explain any major differences between its output and the output of the thought experiment shown in Table 7-2.

  7. Trace client programs that use different Oracle interfaces on your system, such as:

    • PL/SQL RPC calls issued by client-side PL/SQL within Oracle Forms applications

    • Java RMI calls between the client VM and server VM

    Do they result in unexpectedly large amounts of unaccounted-for time?


   
Top


Optimizing Oracle Performance
Optimizing Oracle Performance
ISBN: 059600527X
EAN: 2147483647
Year: 2002
Pages: 102

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net