Skip to content

Excessive memory usage on Transaction Controller using parent sample #6237

@jgaalen

Description

@jgaalen

Expected behavior

When 'generate parent sample' is enabled on a Transaction Controller, it should clear the data once the transaction is finished and processed by the listeners. This is to avoid unnecessary excessive memory usage per thread.

Actual behavior

When 'generate parent sample' is enabled on a Transaction Controller, it looks like it doesn't clean the data after the transaction is finished. When there are samplers with very large bodies (ie. large java scripts), the memory piles up for the duration of the Thread. When generate parent sample is disabled, it does clear the sample data as memory usage is significantly low

Steps to reproduce the problem

Place 30 samplers/ HTTP requests to large objects (1MB) in a Transaction Controller with Generate parent sample enabled. With a 1 second think time in between, 30 threads, it will use up to 3 GB of memory.
When disabling the generate parent sample, it will reduce memory usage to 500MB.

Based on calculations and playing around with different values it feels like the body is kept in memory 3 times for the duration of the thread

JMeter Version

5.6.3

Java Version

17

OS Version

Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions