Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Monitor Production Performance

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain the importance of monitoring performance on the production instance.
  • List five job runtime monitoring best practices.
  • Explain how to approach customer support problem escalation.
  • List the details you need to document when facing network performance issues.
  • Explain how the cache hit ratio can help you diagnose a performance problem.

Monitor Performance

Merchants showcase and sell products on the production instance. Everything that happens on the POD where it runs can affect the shopper experience. It’s important to monitor production instance performance from day one. 

You need to monitor key performance indicators (KPIs), especially when pushing new data or code or running jobs. When performance degrades, likely culprits include the network or caching. Let’s start by looking at KPIs. 

What About KPIs?

Salesforce B2C Commerce performance KPIs help you track and evaluate factors that are crucial to the success and efficiency of the platform. The KPIs listed here can help you understand storefront activity and highlight inefficiencies in custom code.

  • Storefront sessions (unique visitor versus robot)
  • Request rate
  • Order creation
  • New basket versus session rate
  • Basket creation to update ratio
  • Third-party service call response
  • HTTP response code
  • Cache hit rate
  • Average response time

New Code and Data Performance

When a merchant pushes a new version of storefront code or data or a B2C Commerce general availability (GA) release, they should monitor production for performance impact. The Pipeline Profiler and the Technical Reports dashboard are great tools for this. You learned about them in the previous unit. 

The Pipeline Profiler monitors the performance of critical pipelines and controllers. Here are the gridwide median responses for the three most critical pipelines.

Pipeline

Milliseconds

Search-Show

= 500

Product-Show

= 500

Home-Show

<= 90

Note

This data is valid for both controllers and pipelines. See the documentation for the latest benchmarks.

Merchants should also monitor search indexing, and optimize the search index if possible.

Job Runtimes

Running jobs during off-peak hours should be automatic, but things happen. You might need to update products to address incorrect product details, or pricing data might come in at the last minute for a special sale. Here are some best practices.

  • Analyze jobs that run over an hour for possible optimizations.
  • Keep a master record of median job runtimes.
  • Don’t include static data (resources) in daily scheduled backups.
  • Run import/export jobs sparingly. They consume system resources.
  • Always favor standard imports over customizations to modify objects.
  • Design import/export jobs so that they recover automatically by recognizing which files haven’t been imported yet during subsequent execution.
  • Calculate the job load factor: This is the total number of seconds of job execution time on an instance on a day, divided by 86,400 (number of seconds in a day). The baseline for an individual job is 0.02.

Troubleshoot Performance Issues

What do you do and where do you look when performance degrades? Here are some performance troubleshooting tools you can use.

Tool

Description

Chrome DevTools

Comprehensive, browser-based development tools.

Firefox Development Tools

Comprehensive, browser-based development tools.

Microsoft Edge Development tools

Comprehensive, browser-based development tools.

Fiddler

HTTP Debugging Proxy to log HTTP traffic.

TamperData

HTTP/HTTPS headers and POST parameters view and modification.

Commerce Cloud Einstein Recommendation Validator

Chrome extension that validates and debugs Commerce Cloud Einstein recommendations and sorting rules in a storefront.

Google Analytics Real-Time Dashboard

Monitor activity as it happens on your site or app. The reports are updated continuously and each hit is reported seconds after it occurs.

GTmetrix

Run your storefront through the GTmetrix speed test tool to view the Web Vitals score from Google Lighthouse.

Use your experience as a technical architect to promote the tools that you find the most helpful. New tools are released all the time, with updates that help in ways you can’t even imagine.

Get Customer Support

In the midst of troubleshooting, sometimes you need help from customer support. You can help guide the team through the problem escalation process to make it as smooth as possible.

Key merchant contacts typically duplicate, document, and escalate each issue. It’s important that they know how to collect and document key details. The better the details, the faster the problems will be addressed. Take a look at the Salesforce B2C Commerce Customer Support module to learn how to contact Salesforce Customer Support.

Here are problem escalation basics.


Document

Tips

1

What changed

  • Code
  • Data
  • B2C Commerce Version
  • Server software
  • Client software
  • Network

2

How to reproduce the problem

  • Is the problem reproducible or intermittent?
  • Can you reproduce it using unchanged SFRA code with minimum customization?
  • Did any of the following happen right before the performance issues started?
    • Data replication
    • Code replication
    • Manual editing of data on the production instance
    • Manual clearing of the cache or a cache partition on the production instance
    • Import of a large data feed

Network Performance Issues

Network issues can be tricky because multiple players might be involved. Fortunately, these types of problems have been around for a while and there’s a wealth of information to help. The merchant must document details such as those listed here so they can get help fast.

Problem

Questions to ask

Slowness

  • Is it seen by a single user, a specific location, or is it sporadic across the regions?
  • Is it just the B2C Commerce storefront or on other internet websites?
  • Is it common across all instances or only one instance?
  • Is it reported for a specific page, search result, component, or across the site?
  • Is it reported by an actual user or by a monitoring bot?

Another issue

  • Is it seen all the time or happening sporadically?
  • Does it happen at a specific time of day?

If the issue is only seen from a specific location or the entire internet is slow, then it's likely to be a local network issue.

Use a performance issue checklist like this one.


Task

1 Perform a traceroute to identify the bottleneck in your network chain.

2

Use the network view in Firebug and Chrome Dev Tools to analyze requests with long response times.

  • Waiting time: If you see this time to be highest then most probably the issue is on the server side and needs further investigation from a code perspective.
  • Receiving: If this takes the majority of time in the graph then this is a good indication of a local network or browser issue.
  • Connecting: If a request shows huge time spent here then this also is a good indication of a possible network issue.

3

Check for a browser proxy. If the issue is in Mozilla, click Tools > Network > Settings and set it to No Proxy, restart the browser, and try accessing the site again. If it doesn't resolve the issue, then contact your network administrator.

Caching Issues

Getting the system cache just right takes effort, and caching issues are common. Here are some best practices and tips.

  • Avoid manually clearing the cache. Avoid clearing it during high traffic to prevent degraded performance.
  • Pay attention to code replication/activations and data replications, which automatically clear cache unless you specify in a job that they should not.
  • Be careful with the iscache tag. An iscache tag set to daily in a storefront page clears all pages of a specific type at the same time every day. Use a relative iscache tag if you have issues.
  • Avoid invalidating page cache just to bring a piece of static content online, or invalidating it several times throughout a day just to update a specific product or to make a small number of changes. Try using page cache partitioning to invalidate controllers/pipelines gradually over a fifteen minute period.

Cache Hit Ratio

As you learned in the previous unit, the cache hit ratio measures how many content requests a cache is able to fill successfully, compared with how many requests it receives. Here are some best practices and tips when using this value.

  • Aim for a high cache hit ratio, over 70%, and minimum noncached content, ideally 0%.
  • Focus on these critical content pages.
    • Home page
    • Category pages
    • Product tiles
    • Product detail page
  • Review usage of the iscache VaryBy attribute, which instructs the web adaptor to use customer groups and active promotions as part of the key used to look up the cache. How it’s used on a page can degrade performance.

URL Diversity

Make sure URLs are unique.

  • The web adapter uses URL with URL parameters as a key to look up cache.
  • These URLs don’t use the same cache.
    • Product-HitTile?pid=apple-ipod-shuffle&position=1
    • Product-HitTile?position=1&pid=apple-ipod-shuffle
    • Product-HitTile?pid=apple-ipod-shuffle&position=2
  • Always use the same URL parameter order.
  • Use URL hashes (parameters behind a #) where there are unique values for each individual shopper (for example, email marketing campaigns).
  • URL hashes can be handled only on the client side.
  • Use Web Adapter Cache Key Ignore Feature Switch.

Specify position with # instead of &. That means converting &position=1 to #position=1 so that each URL has the same cache hit.

Here’s an example.

Convert

Product-HitTile?pid=apple-ipod-shuffle&position=1

To

Product-HitTile?pid-apple-ipod-shuffle#position=1

Let’s Wrap It Up

In this unit, you explored ways to track and troubleshoot performance on a production instance. Next, take the final quiz and earn an awesome badge!

Resources

Salesforce ヘルプで Trailhead のフィードバックを共有してください。

Trailhead についての感想をお聞かせください。[Salesforce ヘルプ] サイトから新しいフィードバックフォームにいつでもアクセスできるようになりました。

詳細はこちら フィードバックの共有に進む