cancel
Showing results for 
Search instead for 
Did you mean: 

Memory consumption of BSP-application

martin_schffler
Participant
0 Kudos

Is there a tool to see how much memory a BSP-application uses on the application server?

Or even better how the memory consumption changes during requests?

The system i'm on is a WAS6.20.

I browsed a lot of docu already but when it comes to memory consumption i only found ways to display the size of objects in the ABAP debugger. But i am more interested on the memory consumption in relation to the time the application is running (e.g. to see what memory the session takes in a stateful application etc.).

Martin

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Sure - use the memory inspector. Just set breakpoints where you want to take your memory snapshots. Once in the debugger, choose Development->Memory Analysis->Create Memory Snapshot.

Once done with your snapshots, from the SAPGui you can call Tcode S_MEMORY_INSPECTOR.

This gives you a huge amount of detail as to where you memory is allocated. You can do deltas between different snap shots as well.

Answers (1)

Answers (1)

thomasalexander_ritter
Active Contributor
0 Kudos

Hi Martin,

by using the transaction sm04 you can see how much memory a stateful session uses. Perhaps somebody knows a better solution. Did you take a look at the transaction smicm? It has lots of statistics perhaps you can find something useful.

regards

Thomas

(Thomas Jung was faster - again)

Message was edited by: Thomas Ritter

martin_schffler
Participant
0 Kudos

Thanks to both of you!

I used sm04 to get a first feel for the memory requirements and then looked at the detailed memory snapshots.

So actually both of you solved my problem.

Actually i am a bit astonished how much memory a session without any real content consumes. It is > 1MB for a simple view without any models. That rules out stateful applications for 500+ concurrent users.

regards

Martin

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>That rules out stateful applications for 500+ concurrent users

That's why it is nice that BSP supports stateless as well. I have an application that has about 2500+ concurrent users and I had to go with a stateless MVC approach. I swap my model object to disk by serializing it to XML. There are several weblogs on SDN about the topic.

On the other hand don't underestimate how many concurrent stateful sessions you can have. Even an application with a lot of internal tables, doesn't have a session size that grows that much. With efficient programming I am able to handle large datasets and keep my session footprint at about 2-3Mb. Also SAP does a good job of swapping contexts out of main memory as they become older. Therefore I am able to have applications that support a few hundred concurrent users in stateful mode with only 5Gig of main memory on my production box.