I try to reproduce production load isolated on a staging enviroment to find out memory problems. Production shows that upper limit of heap space is hit (here either GC is executed very often to keep memory down or even memory leak shows up).
For isolated test I want to do:
-getting the right mixture of production load request types (I got good metrics about what web-requests are called in production).
-reduce the memory heap-space so hitting the memory limit will be easier (I won't be able to force such a high load like real production).
can somebody give me hints how to find the best memory heap space for staging environment so it is not too low for the application itself and not too high so I will be able to hit the ceiling at some point.
Have you tried using any of the memory profilers? You can run your app under a profiler which can detect memory leaks if any. Some profilers like Jprofiler (commercial) or Netbeans profiler can help you out. You can monitor heap space, GC'd objects etc.
Yes I am using profiler, but I have to find a good memory heap space setting so I can somehow get near to a "realistic" heap space limit. Using the production heap space setting will get me into problems that its heap space limit won't be reached, because I cannot reproduce such a big load as in production from that many users.