Vous êtes sur la page 1sur 7

SAP Performance and workload analysis

There are three transactions that we can use to analyse the performance of our S
AP system.
• OS06 which allows you to monitor the operating system
• STO3 is the “Workload and Performance Statistics” transaction
• STO4 which is the database performance transaction
These are quite good because when you know them then you can perform analysis on
any SAP system. It will not matter whether it is on UNIX, Windows or whether yo
u are using Oracle or SQL Server database. The SAP interface will be the same.
Let’s look at these one by one. (STO4 will be detailed in future posts.)
Operating System Monitor (OS06)
When this loads, the following is displayed which displays an overview of the cu
rrent CPU, Memory, SWAP usage etc (scroll down to see more). Unlike windows task
manager which would keeps refreshing automatically, here you have to click on t
he “Refresh Display” (or F5) to update the stats.
Click on “Detail Analysis Menu”
I like this screen. From here I can get loads of information, most of which I co
uld easily find on a Windows machine but wouldn’t on a Unix box. Also unlike windo
ws, from the above screen I can get information on stats from the previous 24 ho
urs and averages.
The “LAN Check by Ping” functionality is also good. If you can’t remote onto the SAP s
erver, you can use this utility to ping from the SAP Server using the SAP GUI.
Workload Monitor (ST03)
When this is run, the following screen is displayed which gives you on overview
of your instances.
To get a more details, from the left, in the “Workload” tree, expand an instance and
select a date.
A lot more stats will be displayed. These can be printed, exported; you can even
find the total for columns or display a graph, all using the icons above the st
ats. No need for Microsoft excel anymore.
SAP Processes
The application layer of a SAP system provide the following services:
Dialog service (DIA)
• Executes requirements of current user session
• At least 2 dialog processes exists so that SAP internal processes can be handled
• Not assigned to each user. Only assigned when data needs to be executed which it
is run in memory
Background processes / Batch work processes (BGD)
• Tasks that are run in the background
• Used for tedious tasks that require no user input in dialog mode
• Can be scheduled at certain times or after an event
• Must be supported by at least one instance with one corresponding work process
Update service (UPD)
• Makes asynchronous changes to the database
• Used in non-time critical scenarios
• At least one required in SAP system
V2 Update service (UPD2)
• Update service has been further divided, the less critical parts of the update s
ervice have a separate V2 update service that can execute part of the update col
lectively
• Is not required
Output Service / Spool Service (SPO)
• Output requests are sent to output service, for example the printer, fax etc
• Stored temporarily in TemSe (temporary sequential objects) until outputted (Can
be stored in RDBMS or file system on server)
• At least one must exist in system
Enqueue service (ENQ)
• Provides lock management for SAP transactions
• Only on one instance in entire SAP system
Process overview in SAP can be seen using transaction code SM50.
When this transaction is run, it only shows a snapshot of when the transaction w
as run. It is not like windows task manager which refreshes automatically. You t
herefore need to refresh this using the refresh icon on the top left or F8

In the above screen shot, we can see I have three dialog (DIA) processes.
One “Running” (which is my session that I used with my SAP GUI) and two “Waiting”. This
means that a total of three user requests can be made to my SAP instance at any
one time.
If I wanted to add more dialog processes (i.e. allow more users requests to be p
rocessed concurrently), I would need to edit my “Instance” profile using transaction
RZ10, by changing the value of rdisp/wp_no_dia to for example 10 for ten dial
og processes.
I can now add loads of dialog processes, background processes etc but there will
come a time when all the resources will be taken up. When many users connect an
d do transactions, it will eventually become slow.
This is when we need to look at tuning or maybe we would need to reduce the numb
er of some other processes or simply add a new server for example a Dialog serve
r to handle all user requests. I could then reduce the number of DIA processes o
n the above server and it should be quicker again. I will go into all these in f
uture posts.
SAP Daily Quick Checks
As a SAP Basis Administrator, you need to be able to carry out some simple quick
checks to ensure the SAP system is running as smoothly as possible.
The diagram below lists SAP transactions that are commonly used as a quick check
.

The transactions highlighted in orange are the most important to check.


I will elaborate on the transactions above in future posts.
SAProuter
SAP GUI uses the TCP/IP protocol to connect to a SAP system.
A SAProuter can be used to allow SAP GUI to connect to SAP Systems in other netw
orks segments, for example when the SAP System is on another subnet or behind a
firewall.
To connect to a SAP System on another network, when setting up the parameters in
SAP GUI to the SAP system, you will also need to define a “SAProuter String”.

A SAProuter string is a list of SAProuters that must be passed in order to reach


the SAP System.
This string consists of hosts which is defined with a “H” and services which is defi
ned with an “S”
• A host is the SAProuter to connect to.
• A service is the port in the SAProuter to connect to.
When a SAProuter receives a request to a port, it then forward the connection on
to either another SAProuter or the SAP system.
Lets take an example. Let say the following SAProute string is defined.
/H/CustGateway/S/3299/H/SAPGateway/S/3299/H/SAPSystem/S/3201
What does this mean? Well if we break it up into services and hosts, we can see
the following
/H/CustGateway/S/3299/H/SAPGateway/S/3299/H/SAPSystem/S/3201
1. Firsly SAP GUI tries to connect to a server called CustGateway (this cou
ld be an IP address) to port 3299
2. When CustGateway receives this request, it forwards it onto a server cal
led SAPGateway to port 3299.
3. When SAPGateway received this request, it forwards onto a server called
SAPSystem to port 3201
Some extra info:
All SAP GUI connections are made to the “Dispatcher” on a SAP system. The port numbe
r for the dispatcher always starts with 32 and consists of four digits. The last
two digits are the instance number.
In the above example, we connect to port 3201, this means we are connecting to i
nstance 01.
SAP Backup and Restore
In case of a disaster, you will want to ensure you have a backup of everything y
ou need in order to restore to the original state.
Backup
Below is a list of what is a must to backup.
(Note: The information below is based on a Microsoft environment, including Wind
ows Server and SQL Server)
• Database – Ensure a full backup is carried out every night on production. DEV and
QAS does not require full backup, differential can be used. Ensure the following
databases are backed up.
Master which is used to store all of SQL Servers system information such as user
s, databases etc.
MSDB – used by SQL Server to schedule alerts and Jobs.
• Transaction Log – on a production system, this should be backed up every hour. Thi
s will therefore allow for a maximum of an hour’s loss of data.
• SAP Tree structure which can be found in folder “..\usr\“. Backup all the SAP files
under the usr folder.
• Operating System – create a backup of the “system state” which allows you to restor
he operating systems configuration files. These include Boot.ini, the registry,
SYSVOL, Active Directory...
Restore
Assuming the operating system has been installed, there are two options
Option 1
• Reinstall SAP
• Apply the SAP tree structure over the above install
• Restore database
Option 2 (Quicker)
• Restore System State
• Reapply SAP tree structure
• Restore database.
SAP Transaction DB02 can be used to check some database settings such as the dat
abase size. I think this is quite good because it doesn’t matter what database is
used, the SAP transaction can be used as a consistent GUI to find database infor
mation.
How the SAP hard disks are structured
SAP uses are a lot of hard disk space, not only for the application but also for
the data that it stores.
Both of which are very important and therefore we need to use a method in which
we can recover data in case of disk failure. For this reason we use RAID – “Redundan
cy array of inexpensive disks”
The two types of RAID SAP recommends is RAID 1 and RAID 5
• RAID 1 uses two disks and is a mirror of each disk. If one disk fails, replacing
it will recreate the data.
• RAID 4 uses three of more disks. It uses striping where data is written across m
any disks to improve speed and parity. Therefore if one disk fails, it can be re
placed and the data would be recreated.
The minimum recommended structure is to have
• RAID 1 disk with the Operating System, Page file, Temporary Database, SQL Execut
ables, SAP Executables and the transaction log.
• RAID 5 disks would only hold the database.
The recommended structure is to have a three RAID 1 and one RAID 5 setup.
• RAID 1 disk with the Operating System, Page file, Temporary Database, SQL Execut
ables, SAP Executables and the transaction log.
• RAID 1 disk with the Temporary Database, SQL Executables and SAP Executables
• RAID 1 disk with the transaction log.
• RAID 5 disks with only the database.
Both the minimum and recommended structure should have the RAID disks partitione
d as below
• C Drive: (RAID1) Operating System
• D Drive: (RAID1) Page File
• E Drive: (RAID1) Temporary Database
• F Drive: (RAID1) SQL Executable and SAP Executables
• G Drive: (RAID1) Transaction Log for the database
• H Drive: (RAID5) Database
The disks should be formatted in NTFS.
Three Tier Architectures
SAP consists of three layers.

Database Layer where the RDBMS database is for example SQL Server or Oracle.
Application Layer is the layer where the SAP executables are installed. This lay
er connects to the database layer to do all the processing and contains a SAP in
stance.
Presentation Layer is the GUI that you use to connect to the SAP System via the
application layer. This could be through the SAP GUI (SAP FrontEnd), a Web GUI o
r even a Java GUI (on a mobile phone).
Communication between the layers is via TCP/IP
Two tier architecture would have the database and application layers on one mach
ine and the presentation on another however the three tier architecture is the m
ost common. I will however build a two tier system due to lack to hardware.
Three Tier Landscapes
SAP can be installed on a one-tier or two-tier however the three-tier system is
most common.

Within these systems, we have clients which are a commercially and organizationa
lly independent unit in the R/3 System, which means that it has its own data env
ironment.
CUST: Master Configuration - Customising and Developing client
TEST: Unit testing client
QAS: Quality Assurance Client
PROD: Production (Live) Client
One tier system would have all of the above clients on the same machine. This ha
s the advantage of using minimal hardware and requires fewer administration howe
ver there are disadvantages which include
• Global customisation will affect all clients – for example when configuring / test
ing the printer, it will affect all clients.
• Other clients can affect productions performance and performance is a big deal i
n SAP.
• Cannot test upgrade in a one tier system.
• Development immediately affects production.
Two tier system would have the production client on a separate machine to the ot
her clients. This allows the data to be secure, performance from other clients d
oes not affect production and development is kept separate from the production.
The disadvantage is that DEV and QAS testing is carried out in the same environm
ent and transports (Moving ABAP which is custom SAP Code from one client to anot
her) from development immediately become active in production.
Three tier system is the recommended and most common landscape. It has the follo
wing advantages
• Production data is kept secure from other clients.
• Production performance is not affected by other clients.
• There is an independent test and QAS environment
• Transports are verified (in QAS) before they are delivered to production.
The main disadvantage of the three tier system is that it is the most expensive
because of the increase in hardware requirements.
All that said, because I dont have the hardware and because I am only going to b
e building my environment for playing around (SAP SandBox), it will be a one tie
r system.
What do the SAP Basis techies do?
Basis is the environment that allows us to administer and manage SAP R/3 and the
SAP Components
It provides
• Administrative Tools
• Runtime Environment
• Distribution or resource

There are four main responsibilities of Basis


Operating System which involves Installation, Networks, Security Admin, Printing
, Generic Maintenance, Monitor system performance and logs, Virus protection, Ba
ckups and Disaster Recovery procedures
Database which involves Installation, Backup and Recovery, Performance Monitorin
g, Problem analysis, DB Re-orgs / Re-indexing, Monitor of free space, memory and
connections, Checks for missing indexes / Creation of new ones, Creation and te
st of DR procedures and Checks on Database security
SAP R/3 System which includes SAP installation, Upgrades, Security Admin, System
monitoring, Client copies, Transports, Batch management, Gui installs, Printing
Admin, Monitor R/3 Alerts, Bug fixes, Patch application, Workload analysis, Per
formance Tuning, External interface management, Archiving and Generic user suppo
rt
Hardware which includes sizing and all the hardware used.
All of the above I will need to know inside out and will blog as I go along.
The difference between Basis and Netweaver and whats with all the versions?
Although the installation of SAP is still commonly called Basis, from the diagra
m below, we can see SAP Basis is old (See Blue blocks). Basis has had many funct
ionalities added to it over the years and is currently called Netweaver 7.0. So
when you hear Basis, think Netweaver 7.0

Netweaver 7.0 comes with SAP ERP 6.0


So what does that mean?
SAP is the Acronym for Systems, Applications and Products.
Enterprise resource planning (ERP) is a company-wide computer software system us
ed to manage and coordinate all the resources, information, and functions of a b
usiness from shared data stores
ERP 6.0 is commonly known as ECC 6.0 and is the latest ERP solution which brings
together core ERP functionality with the Technology of SAP Netweaver 7.0 and Bu
siness Intelligence (BI) to provide a more comprehensive and an even more comple
te ERP offering to organizations.
ECC stands for Enterprise Core Components (currently on version 6) and enables S
AP to build and develop an environment of Finance, Logistics, Sales, Material Ma
nagement, HR, etc that can function upon the foundation of the central component
.
Netweaver 7.0 contains the SAP Kernel core and the operational environment.
Well, I hope that has cleared something up.
Solution Manager Key
Before SAP can be installed, there are a few pre-requirements that need to met.
One of these is to generate a solution manager key which is required during the
SAP installation. This is detailed below.
Run SAP Logon and double click on your Solution Manager SAP Server
Login into Solution Manager
Run transaction code SMSY by entering into the text box at the top left and pres
sing enter
In the "SYSTEM LANDSCAPE - SAP Solution Manager" screen, from the menu on the le
ft, right click on "Systems" and select "Create new system"

In the "Create New System" box, enter the SAP SID in the System box, select prod
uct and version as in the example below. Click on the save icon to save this sys
tem
From the menu, select "System" and then "Other Object"
In the "Select Other Object" window, enter the SAP SID in the "System" text box

Click on the "Generate Installation/Upgrade Key" icon at the bottom of the above
window

In the "Gernerate Installation/Upgrade Key" window, enter the SAP SID, System nu
mber and the SAP Servers hostname.

Finally click on Generate Key. This will the key required during the installatio
n of SAP

Vous aimerez peut-être aussi