Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue on high thread count scenarios #107

Open
loadtestingru opened this issue May 12, 2022 · 1 comment
Open

Performance issue on high thread count scenarios #107

loadtestingru opened this issue May 12, 2022 · 1 comment

Comments

@loadtestingru
Copy link

loadtestingru commented May 12, 2022

During load test with about 2k threads about 30% of all threads are blocked at:
com.github.johrstrom.collector.JMeterCollectorRegistry#getOrCreateAndRegister(BaseCollectorConfig cfg)

What is thre reason here to use synchronized method?
registered is alread ConcurrentHashMap.

You can use registered.computeIfAbsent(BaseCollectorConfig key, Function<BaseCollectorConfig, Collector> mappingFunction)
And threads will not be blocked on each method call after first key creation.

@johrstrom
Copy link
Owner

Hi! Thanks for the issue and the potential fix. I however, don't actively maintain this much anymore so am unlikely to do the work. Happy to evaluate and potentially merge a pull request though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants