• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can i test Heap space?  RSS feed

 
Miri Yusifli
Ranch Hand
Posts: 42
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)I write code for site in Spring  and i use hibernate . My heap space is 128 mb in hosting. My site works in this hosting perfectly . If the number of users will increase , can i see heap memory exception ? i think that , heap space depends on the number of users . Can you  give me information about this ?
2) How can i test heap space in local ?
 
Claude Moore
Ranch Hand
Posts: 875
8
IBM DB2 Java Netbeans IDE
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heap space  depends upon how much memory your program consumes. A single user consuming all available memory may sink your program as well.
128 MB it's quite a few memory amount, I would start with 1/2 GB.
To measure heap consumption I would avoid self-made solutions. I would use for example JConsole or JVisualVM, shipped with JDK (and / or JRE, I don't remeber).
 
Miri Yusifli
Ranch Hand
Posts: 42
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Claude Moore wrote:Heap space  depends upon how much memory your program consumes. A single user consuming all available memory may sink your program as well.
128 MB it's quite a few memory amount, I would start with 1/2 GB.
To measure heap consumption I would avoid self-made solutions. I would use for example JConsole or JVisualVM, shipped with JDK (and / or JRE, I don't remeber).


thanks for answer , but i used Jconsole , but in local just me use my web application , and Jconsole shows consuming of heap space in order to one user , but i want to test it in real condition , such as 100 or 1000 users .
 
Claude Moore
Ranch Hand
Posts: 875
8
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing prevents you from using Jconsole or JVisualVM with an instance of your program running in production. I did it myself a few times to monitor heap space usage of an osgi based application;this way, you can monitor in real time what's going on under actual users' load. To simulate different requests load, you may consider using JMeter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!