Tuesday, October 7, 2008

Some Memory Settings to Help with Swaps...

If you are running a Central Instance on a server that is also hosting the database, you may run into a problem with high swaps as seen in transaction ST02. The problem is that typically when SAP is installed, the default settings will allocate all of the system memory to SAP, leaving nothing for the database or other applications that may be running on the server. This will mean your page file will need to be very large (sometimes 3x the amount of system memory) in order for SAP to even start up.
If you are in this situation, try the following:

First, you will want to dictate to the database how much memory to use.
With SQL Server 2005, I prefer to allocate 6 GB of system memory as long as the system has 16 GB or more installed. SQL Server Management Studio is the tool to use to do this. Check with your RDBS guidelines to see how much your database host is required to have available and do not go under that.

Secondly, you will need to decide how much memory to assign to SAP.
You can assign the balance of the system memory to SAP, but if you have other applications that run on the system you will want to take that into consideration as well. In a system with 16 GB of memory that has 6 GB dedicated to the DB, I assign 10 GB of memory to SAP. This is done so by setting the PHYS_MEMSIZE parameter (MB) in the Instance Profile. I have a few systems with two Central Instances installed on the same 16 GB server, so I assign 6 GB to SQL Server, and 5 GB to each SAP instance.

Third, if you are still getting high swaps in ST02, you will want to look at the settings of each buffer parameter.
Inside ST02 under the "Current Parameters" button you will find what parameter settings you are running with. the defaults are supposed to be a good starting point for the typical SAP install, but here are the parameters I like to set:

rsdb/ntab/ftabsize = 60000
rsdb/ntab/entrycount = 40000
rsdb/ntab/irbdsize = 12000
rsdb/cua/buffersize = 6000
rsdb/obj/buffersize = 8192
abap/buffersize = 600000
zcsa/table_buffer_area = 60000000
zcsa/presentation_buffer_area = 8800000


Using these settings I rarely get high swaps in my SAP systems, but you will need to study each parameter and tweak them for your specific install.

I hope this helps...