Does anyone know how one can calculate the size of particular application session in WebSphere 5.0.1 with multiple applications running on the same server? After I moved new version of the jar to the server the session size grow 10%, even though there were only 2 simple changes to the code that should not create that big of a difference.
Also, is there any way to calculate the size of the session when you are running WSAD?
Irene, You could use a profiling tool (WSAD has one built in) to see the approximate size of the session. If you want the exact size, you could serialize/output the session to an in memory writer and get the number of bytes from it. Or if you are using session persistence, you could see the size of the row in the database.
It sounds like you may already have a method if you know the size is jumping by 10%. If I had to guess, I would say that one of the objects now has a reference to some other object. Sessions are transitive when persisted somewhere.
Also note that this size can be misleading. If all of your sessions have a reference to the same object, it is only in memory once but will be in all the calculated session sizes.
Hello Jeanne, Thank you for your post. I am not familiar with a profiling tool in WSAD much. I set it up but it does not provide with the size of the session. It gives information about how much references different classes have, etc. Could you please tell me more how to set up it correctly?
I know that the session size jumped 10% on the server where multiple applications are deployed after new version of our jar was deployed. But it could be related to other issues as well. We cannot distinguish session size per application. Any other suggestions?