• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

calculate the size of the session

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?


Thank you,
Irene
 
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has nothing to do with Performance, and everything to do with WebSphere, so let's move this to the WebSphere forum.
 
Irene Loos
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

Thank you,
Irene
 
Jeanne Boyarsky
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Irene,
I don't recall the details on the profiler. You can check in the WSAD help or a redbook for more information.

Personally, I used the approach of Serializing the session object because I wanted to get the exact size.
 
Irene Loos
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for advise.
 
Doody calls. I would really rather that it didn't. Comfort me wise and sterile tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic