Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

How can i test Heap space?

 
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Bartender
Posts: 1318
39
IBM DB2 Netbeans IDE Spring Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 49
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 1318
39
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic