Performance and Scalability
Striving for Maximum Performance of SAP Solutions
In today’s economy a wide variety of business scenarios make many different demands on the performance of software with a different aspect of what is perceived as good performance for each scenario.
Performance can be considered both from a system point of view and a user point of view. While system administrators are interested in achieving required system throughput within a given IT budget, end users demand a reasonable response time when interacting with software systems. Acceptable response times are related to the content of the business process. These challenges are relevant for custom application development projects as well.
Performance refers to the total effectiveness of a computer system, including throughput, individual response time, and availability. Programming for good performance means making reasonable use of critical resources, keeping response time at a minimum, taking into consideration aspects of network communication, and producing software that is scalable.
Scalability, in most general terms, means the degree to which a business scenario, component, or system can be expanded (or reduced) in size, volume, or number of users served and still continue to function properly and predictably. In other words, scalability refers to the predictable resource consumption of a software application under different system loads (increasing multiuser or parallel load) while keeping response time within a reasonable range.
- The first aspect of scalability is linearity with the number of business objects.
- The second aspect of scalability is concurrency (processing with parallel jobs or concurrent users).
Larger loads can be balanced with more hardware without the response time getting worse. A distinction is commonly made between:
- Scaling up – This involves replacing an existing server with a more powerful server to double throughput by doubling processing power.
- Scaling out – This adds servers to a set of identical servers that process user requests in parallel, thus increasing processing nodes to increase throughput.
Scalability is a mandatory prerequisite for sizing, and sizing is an important parameter for IT landscape planning and implementation.
Improve the Performance
There are several possibilities to improve the performance - or scalability - of any given system, independent of their provenience. In addition also for custom coding it is important to ensure that the software is scalable, and that it achieves stable end user response times and the expected throughput. Adhering to performance coding guidelines will help you when programming to reach this goal. In addition SAP provides tools and methods for performance analysis and application performance analysis that support tuning the system as well as the coding.
To achieve this, we published a number of articles, blogs and presentations for you to answer questions like:
- What are important rules and guidelines for performance-optimized programming?
- What do I do when I first suspect to have a system performance problem in my environment?
- Which tools do I use to diagnose and solve the problem?
- How can high performance be maintained in the long term to ensure cost efficiency?
- How do I perform testing?
A SAP business application generally consists of 3 layers: the persistence layer, the application layer, and the front end layer.SAP undertakes a number of efforts to ensure that scalability is achieved on different layers of software and hardware. Naturally, we emphasize the importance of code optimization.Performance typically results in two metrics: response time, i.e. the speed of task completion and system throughput, i.e. the amount of work done in a given amount of time.
The basis for scalability and performance modeling is the measured resource consumption, which is influenced by the following four KPIs:
- CPU time consumed
- Peak memory used
- Disk space
- Network load
Guidelines for Good Performance
There several options for improving performance:
- Optimize the coding - requires application and coding knowledge. It is the most sustainable solution by far and strongly recommended by SAP as this effort helps you to control the software.
- Tune the application by analyzing and improving customizing, configuration, functions and performance is much more sustainable but requires business knowledge as well software expertise. Also, the modifications should be tested carefully as there may be some business risk involved.
- Modify the business process by re-scheduling load so that you can distribute load more evenly across servers and time. This may require the involvement of several different parties.
- Tune the system, for example the profile parameters, or you may increase the buffer sizes to improve response times. You can do this even if you are not very familiar with the software. The draw-back here is that is does take some time to fine-tune.
- Add hardware by adding application servers. This will have some impact on the DB server, but otherwise is unrisky and may lead to improved response time. The same holds true for adding CPUs/memory to the server(s). The only issue is that you are dealing with a "black box" - you do not really exercise control over the system and the solution may not be sustainable.
Programming for good performance means making conservative use of critical resources, keeping response time at a minimum, taking into consideration aspects of network communication, as well as ensuring the scalability of the software.
The most important rules and guidelines for performance-optimized programming are:
- Efficient database programming: Designing database accesses for optimal data retrieval; e.g. ensuring that database accesses are supported by an appropriate index.
- Linear resource consumption: Making optimal use of available system resources; for example, by efficiently designing database locks and SAP enqueues to allow scalable parallel processing.
- Efficient network communication: Streamlining communication between frontend and application layer or between two servers, as well as reducing the amount of data transferred between frontend and application layer.
- Minimum response times: Keeping the average response time per user interaction step as low as possible.The best approach to code tuning efforts is bottom-up. Since the database is the foundation of your system architecture, we recommend you start there and work yourself up to the application layer and the network.
The following areas are good candidates for code tuning efforts:
1. Missing indexes increases the number of searched records
2. Identical selects put double load on the database
3. Incomplete Where-clauses return too many data
4. Statements that bypass the buffer lead to superfluous database accesses
5. Nested loops in internal tables prevent scalability at the application layer
6. Average dialog response times higher than 1 second 7. More than two roundtrips per dialog steps for transactions used in the WAN
Measurement and Analysis Tools/ Testing
Performance analysis can de subdivided into system performance analysis and application performance analysis. SAP provides tools and methods for both approaches.
When dealing with application performance analysis and tuning, the methodology and procedure is much more important than the actual tools. First you need to decide what and how you are going to analyze the performance.SAP recommends to perform single user/single test case analyses starting from the database layer and working yourself up to the application layer and front-end.
Please do not underestimate the potentially huge negative impact inefficient custom coding can have on the overall performance of the software. Therefore:
- Allocate enough time for testing and tuning so that the system will run comparatively smoothly even under stress
- Spend enough time prior to coding in carefully setting up a business process that suits end users needs
For software developers, being stainable and contributing to Green IT means designing software
programs that make efficient use of computing resources. The goals for a high performance are to
ensure that software is scalable, and that it achieves stable end user response times and the
expected throughput. Adhering to these goals helps when programming for a Green IT. But the equation “performance-optimized coding = power-optimized coding” is not always true – sometimes there is a tradeoff between power and performance. Looking more closely at specific performance requirements we can see different degrees of interdependence between high-performance program code and power consumption.