8. What we do at Method R Corporation…
• Write code for you
• Troubleshoot performance problems
• Teach you how to do what we do
• Write software tools that make your work easier
7
54. Tasks can nest.
• Print Addresses is a task
Posting
PO AP AR … FA
42
55. Tasks can nest.
• Print Addresses is a task
• Print Address #42 is a
(sub)task
Posting
PO AP AR … FA
42
56. Tasks can nest.
• Print Addresses is a task
• Print Address #42 is a
(sub)task
Posting
PO AP AR … FA
42
57. Tasks can nest.
• Print Addresses is a task
• Print Address #42 is a
(sub)task
• Often, a program is a task
Posting
PO AP AR … FA
42
58. Tasks can nest.
• Print Addresses is a task
• Print Address #42 is a
(sub)task
• Often, a program is a task
• Often, a tiny part of a Posting
program is a task
PO AP AR … FA
42
59. it.
Tasks are
Business people don’t care
about the “system” except
through execution of the tasks
that make up their business.
43
60. it.
Tasks are
Tasks are what
system owners care
about.
44
72. Throughput and response time…
• Throughput (X)
– The tasks-per-time way
– Number of task executions completed in a given duration
• “orders/second”
50
73. Throughput and response time…
• Throughput (X)
– The tasks-per-time way
– Number of task executions completed in a given duration
• “orders/second”
50
74. Throughput and response time…
• Throughput (X)
– The tasks-per-time way
– Number of task executions completed in a given duration
• “orders/second”
• Response time (R)
– The time-per-task way
– Elapsed duration of an execution of a given task
• “seconds/order”
50
101. (Proof)
You cannot optimize X for a task that’s ineficient.
You cannot measure a task’s eficiency without measuring
its R.
68
102. (Proof)
You cannot optimize X for a task that’s ineficient.
You cannot measure a task’s eficiency without measuring
its R.
68
103. (Proof)
You cannot optimize X for a task that’s ineficient.
You cannot measure a task’s eficiency without measuring
its R.
Therefore, to optimize X, you must first analyze R.
68
104. The universal experience of
programmers who have been
using measurement tools has
been that their intuitive
guesses fail.
—Donald Knuth
69
121. How are you supposed to
profiles?
create these
81
122. You have to insist on seeing
where time goes for any task
you think is important.
82
123. To drill down, you need
call-by-call data.
(NOT data about aggregations of calls.)
83
124. In Oracle, we do it with a feature called extended SQL
tracing.
• For Developers: Making
Friends with the Oracle
Database for Fast, Scalable
Applications
– Cary Millsap
http://method-r.com/downloads/doc_details/10-for-
developers-making-friends-with-the-oracle-
database-cary-millsap
• Optimizing Oracle
Performance
– Cary Millsap with Je Holt
84
126. Feature (attribute) Oracle MySQL App tier
Task identification y
Call-by-call coverage 98%+
DB call begin sequence partly derivable
DB call begin time partly derivable
DB call end time y
DB call context info y
OS call begin sequence partly derivable
OS call begin time derivable
OS call end time y
OS call context info y
Call SQL context y
Call CPU (sys mode) -
Call CPU (usr mode) -
Call CPU (total) y
SQL execution plans y
86