LoadRunner User Discussions
cancel

Memory consumption

Highlighted
HONEY1 Regular Contributor.
Regular Contributor.

Memory consumption

I recorded the script with http protocol,  which was developed in Vaadin technology.  Need to know how much http session memory utilization by heap memory for each user. Please let me know is there any option to check heap memory usage for each user in Loadrunner tool

2 REPLIES
Micro Focus Contributor
Micro Focus Contributor

Re: Memory consumption

Hello.

Please check the following KM document, it contains a very detailed explanation on how to calculate TruClient vusers. For HTTP scripts works exactly the same, just instead of firefox.exe look for the mmdrv.exe process into the Load Generator machine.

https://softwaresupport.softwaregrp.com/group/softwaresupport/search-result/-/facetsearch/document/KM03081389

 

Outstanding Contributor.. JHF Remmelzwaal Outstanding Contributor..
Outstanding Contributor..

Re: Memory consumption

In the document Aron is refering to, it is adviced to run one user. For a protocol that is executed with mmdrv.exe, I whould test with more users (50 users are run per mmdrv.exe), because the 'static' memory overhead of mmdrv.exe will be huge per user, if you test with just one user.

When you have multiple scripts in your scenario you have to test each script individual.

Next to that some memory reduction tips:

- When you use malloc like C-functions, free your data.

- Remember that each lr_save_*, web_reg_param* and lr_eval_string() function allocates memory. The two functionset replace memory when a new value is assigned. The memory allocated by lr_eval_string() is freed at the end of the iteration. The first two sets repace the saved values when a parameter is reused, the latter not.

Recently I had a script that needed to catch the complete return of each call to analyze. The mmdrv.exe processes grow upto more than 400MB each due to many lr_eval_string function calls. But just by replaceing those by lr_eval_string_ext() I was able to keep memory consumption below 80MB per mmdrv.exe process.

Tip: lr_evel_string_ext() fills a buffer and not as a string, the trick is to add the string-trailing null byte in your evaluation pattern. E.g.

lr_eval_string_ext("{Response}\0",11, &gwt_responsetext, &len, 0, __FILE__, __LINE__);