Home > Articles > Security > Software Security

Performance Forensics

Like this article? We recommend

Diagnostic Strategies

Rapid and accurate diagnoses can be critical to controlling costs. Given the high stakes common in commercial computing, the importance of diagnostic strategy deserves some special attention. Rapid problem resolution can prevent lost revenues arising from inadequate system performance. Accurate analyses can prevent the waste of time and money that can result from undisciplined approaches. For example, system upgrades undertaken without proper analysis, often called "throwing iron at the problem," can be very disappointing when the extra iron fails to solve the actual performance bottleneck.

As in medicine, the shortest path to an accurate diagnosis lies in the timely consideration and exclusion of both the grave and the mundane, and in timely referrals to appropriate specialists. Following a systematic high-level diagnostic strategy can help speed this process. The following questions represent one possible process-oriented high-level strategy for performance diagnosis:

  • Is the system correctly configured?

  • Have appropriate best practices been applied?

  • Has appropriate research into candidate bugs been performed, and have the appropriate patches and updates been applied?

  • Is the performance complaint based on reasonable expectations and valid experiment design, backed by good science?

  • If a resource is saturated, can more resources be added, or are there options to decrease demand?

  • What resources are under contention?

  • Where is the time going?

  • Why is the time going wherever it is going?

Each of these questions can be augmented by asking if the services of a specialist are needed. A detailed diagnostic outline could fill volumes, but the best diagnosticians do not have, want, or need a highly detailed or rigid process. They merely combine their knowledge, experience, and skills to find problems and fix them. If they determine that the problem is outside their expertise, they make an appropriate referral.

Any strategy that succeeds will be celebrated at the time of victory, whether or not the strategy was philosophically defensible. There are innumerable cases in which trial-and-error strategies will work out well, especially when executed by highly experienced and knowledgeable practitioners. Well-informed hunches and lucky guesses that pan out are undeniably strategically efficient, but as strategies, they are not characteristically predictable.

Much of what is written on system tuning is commonly arranged by subsystem (for example, CPU, disk I/O, and messaging), as in the imminently practical and proven approach described in Chapter 21 of Configuring and Tuning Databases on the SOLARIS Platform by Allan Packer. Packer's strategy is exemplary of a classical functionally-oriented approach.

At a functional level, tuning and troubleshooting techniques share a great deal in terms of tools and knowledge base. While system tuning is characteristically a trial-and-error process, it is generally preferred that troubleshooting techniques converge on root causes with maximum determinism and minimal experimentation. The success of system tuning is measured in terms of empirical results. Drill-down troubleshooting might lead to discovery of a previously undiagnosed issue for which no empirical payoff might exist until the issue is repaired.

A simple three-step functionally-oriented strategy11 that is equally applicable to tuning or troubleshooting is to ask:

  1. Is the system working or waiting for something?

  2. If it is working, is it working intelligently and efficiently?

  3. If it is waiting, can the thing it is waiting for be made faster, or can you decrease dependence on that thing?

High-level diagnostic strategies are useful as road maps for diagnostic efforts and lay solid foundations for rational problem-solving.

Regardless of the strategy used, there will commonly be challenges to successful execution. For example, a challenge faced by doctors and performance analysts alike is patients who are convinced they have provided all the data needed to make their diagnosis. Diplomacy may be required to extract from the patient or customer whatever data is actually needed.

Root Causes

The root causes of bad performance are just as diverse as the spectrum of illnesses ranging from the common cold to incurable fatal diseases. As in medicine, knowledge of the relative likelihood of various diagnoses has some bearing on the process used for diagnosis.

The process of troubleshooting most frequently reveals root causes that are more closely analogous to the common cold than the rare fatal disease. The common cold is usually diagnosed with no lab tests whatsoever, but rather by the presence or absence of clinical signs, and consideration of the season and the locale. Just as doctors do not invest in culturing the virus that causes the common cold, much of the effort that gets invested in performance analysis could be avoided by beginning with basic symptom-matching diagnostic techniques.

The following categories of root causes should not require intense analysis to diagnose, and should therefore be considered at the earliest phases of diagnostic efforts. There is no simple policy for making these considerations before delving deep into low-level root cause analysis techniques, but much of the time and effort that gets consumed in performance troubleshooting could be saved by doing so.

  • Best practice deviations

  • Just as 80 percent of disease might be avoided by good habits of diet and exercise, a similar rate of performance complaints can be traced back to deviations from known best practices. Uninformed decisions regarding system feature selections or failure to make appropriate space-versus-speed tradeoffs can often be quickly diagnosed by inspection. It is vastly preferable to diagnose these by examination of configuration parameters than to discover them from low-level technical analysis or sifting through reams of data.

  • Known bugs

  • By some estimates, 80 percent of all reported bugs have been previously reported. Often, bug reports already on file indicate workarounds or availability of product patches. For known issues with no workaround or patch, the best path to getting them repaired involves building a business case by raising escalations against the appropriate bugs or RFEs.

  • Errors in experiment design and data interpretation

  • Claims of performance problems sometimes arise from psychological factors doctors routinely encounter, such as hypochondria or anxiety. Sometimes, ostensibly alarming data will turn out to be benign, and some symptoms will turn out to be of no consequence. Much effort can sometimes be saved be conducting a "sanity check" before investing too heavily in additional data collection and analysis. This involves making a preliminary assessment that the problem is real, and establishing realistic expectations regarding performance goals.

  • Resource saturation

  • This is a major category of initial diagnosis, but more often, it is merely an indicator of a need for tuning, rather than a root cause. A 100-percent-busy issue is often the result of avoidable inefficiencies, so one should not rush to judgment over the inadequacy of the resource itself.

The preceding categories are somewhat of a mixture of science and art, but they should be properly evaluated before investing in detailed low-level root cause analyses.

Whether or not the root causes of a complaint have been previously identified and characterized, they will fall into a finite set of categories. Knowledge of the number and nature of the categories can help guide diagnostic reasoning processes. Medical texts often arrange diseases into familiar categories, such as viral, bacterial, genetic, and psychological. Here is an attempt to enumerate the general categories of root causes for computer performance issues.

  • Bad algorithms

  • Intuition leads many people to think that bad or inappropriate algorithms are at the heart of performance issues, more often than they actually are. Still, this is a major category of diagnosis. Some algorithms have issues scaling with data volumes, while others have issues scaling to meet ever-increasing demands for scaling through parallelism. Diagnosis of the former might require a detailed analysis of execution profiles using programming tools, and the latter might be diagnosed from looking for contention symptoms. Of course, to say an algorithm is "bad" is rather broad-ranging, and the subsequent categories listed here enumerate some particular types of badness.

  • Resource contention

  • Given that resource-sharing issues can occur in various kernel subsystems, as well as in application software and layered, third-party software, you might need to look in many places to locate resource contention. At high-levels of resource utilization, the relative priority of resource consumers becomes an interesting topic. Failure to prioritize and failure to tune are common diagnostic findings. In this context, a resource is not simply a CPU, memory, or an I/O device. It also extends to mechanisms such as locks or latches used to coordinate access to shared resources. Queuing and polling for scarce resources can account for considerable clock time, and they can also account for a considerable percentage of overall CPU utilization.

  • Serialization

  • When it is possible for pieces of a computing workload to be processed concurrently, but concurrency does not occur, the work is said to proceed serially. Missed opportunities for concurrent processing might arise from laziness or ignorance on behalf of a programmer, constraints on program development schedules, or non-optimal configuration and tuning choices. In some cases, unintended serialization will be diagnosed as a bug.

  • Latency effects

  • When an operation is highly iterated and not decomposed into parallel operations, the time per iteration is of particular interest. While this notion is obvious in cases of computational loops, latency effects in the areas of memory references, disk I/O, and network I/O are often found at the root of many performance complaints.

  • Hardware failures

  • Failed or failing system components can lead to poor overall performance. Certain modes of failure might not be immediately apparent, though most failures will result in an error message being logged somewhere.

  • Common inefficiencies

  • Any book on programming optimization techniques will likely feature a long list of common programming inefficiencies. Among these are major categories like memory leaks, along with common inefficiencies such as repeatedly evaluating the length of a string, poorly chosen buffer sizes, or too much time spent managing memory. Doing unnecessary work counts as a major category, especially when it involves inefficiencies in the underlying system. For example, some versions of the Solaris OS have slow getcwd(3C) and fsync(3C) performance (see BugIDs 4707713 and 4841161 for getcwd and BugID 4336082 for fsync).

  • Esoteric inefficiencies

  • Sometimes, the root cause of performance issues lies at very low levels in the system, involving factors with which most analysts have no concrete grasp. For instance, you might observe a low-level instrumentation issue in the system architecture or the CPU itself. As systems evolve toward chip multiprocessing, you can expect the subject of low-level efficiency to become an increasingly hot topic.

What really defines a performance topic as esoteric is the talent, experience, and tools required to troubleshoot it. Many simple problems will appear difficult to the practitioner who lacks the right experience. Some difficult problems will require the services of authentic gurus to diagnose. The steady advance of performance analysis tools will inevitably reduce the mystique of these factors.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020