2

I am working on a web application with Spring / Hibernate, after fews days of production it became really slow, so I did a heapdump using visualvm but I do not know much about how to analyse results, I do not even know what would be a normal size of org.hibernate.impl.SessionFactoryImpl in a similar developpement stack, can someone please tell me accorning to the screenshot , I would like to mention that I use one web client (one user logged in)

enter image description here

bmscomp
  • 777
  • 1
  • 11
  • 21
  • As a comparison, my SessionFactoryImpl is about 30MB for ~180 entities on Hibernate 5.0. So 1.7MB does not seems too big for me ;) It seems Hibernate 5.2 and 5.3 improved their memory consumption – user1075613 Mar 20 '19 at 12:56

1 Answers1

0

A 'normal' size of an Object depends on many things (version of the library you are using, JVM and OS versions...)

You can find more info about shallow and retained sizes here.

I think that SessionFactoryImpl in your case is not too big (only 1.7 MB of retained size) and is not cause of the issue.

However, a small heap size can be a problem, so try to analyze whether the app is using most of its heap space and increase it accordingly.

Community
  • 1
  • 1
Dragan Bozanovic
  • 23,102
  • 5
  • 43
  • 110
  • I am using same confiug as in server on my developpment machine , but with just one user logged in – bmscomp May 18 '15 at 15:04
  • What is the max heap size configured? You will have to inspect the memory at the time when slow-down occurs. You can do it with visualvm or other profiling tools. There are many tutorials online on how to do it, and I'm sure lots of questions on SOF dedicated to it. – Dragan Bozanovic May 18 '15 at 15:15
  • on my dev machine heap size is 1 046 478 848 B and 101 317 648 B used I have the same database dumped from the server (production ) for memory values I did a copy past from visualvm – bmscomp May 18 '15 at 15:19