OpenNTF / org.openntf.domino

Open replacement for lotus.domino package in HCL Domino
Apache License 2.0
65 stars 34 forks source link

Removed call to System.gc when terminating a thread. #136

Closed mariusj closed 8 years ago

mariusj commented 8 years ago

This call kills performance of the server (up to 10x slower throughput). Bellow is sample report from XpagesToolbox monitoring.

Type Count Total time Max time Avg time Min time Specific time
ODA disabled 500 671 80 1 0 140
develop 500 21461 100 43 20 20259
with fix 500 761 60 2 0 120

I've opened an empty XPage using 100 threads. First result is with ODA completly disabled. Second is with current develop branch, third is with System.gc() removed.

Maybe it will fix #128.

the-ntf commented 8 years ago

The System.gc() there in order to recover the WeakReferences to the reference queue of lotus.domino handles that need to be auto-recycled. However, in the try block, there is a forced recycle of all outstanding Sessions, which itself should recycle any outstanding lotus objects because they are all parented to Sessions.

Therefore I think this is a good change, and I've tested it with success, so I'm committing it to my branch. Not through the pull request, though, because I have other changes in my Factory that need to stay intact. :)

Well-spotted!

On Thu, Sep 24, 2015 at 3:12 AM, Mariusz Jakubowski < notifications@github.com> wrote:

This call kills performance of the server (up to 10x slower throughput). Bellow is sample report from XpagesToolbox monitoring. Type Count Total time Max time Avg time Min time Specific time ODA disabled 500 671 80 1 0 140 develop 500 21461 100 43 20 20259 with fix 500 761 60 2 0 120

I've opened an empty XPage using 100 threads. First result is with ODA completly disabled. Second is with current develop branch, third is with System.gc() removed.

Maybe it will fix #128

https://github.com/OpenNTF/org.openntf.domino/issues/128.

You can view, comment on, or merge this pull request online at:

https://github.com/OpenNTF/org.openntf.domino/pull/136 Commit Summary

  • Removed call to System.gc when terminating a thread. This call kills performance of the server (up to 10x slower throughput).

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/OpenNTF/org.openntf.domino/pull/136.

mariusj commented 8 years ago

The System.gc call was not removed from 2.0.0 release so this release is also affected by this huge performance slowdown.

jesse-gallagher commented 8 years ago

The change hasn't made it up to the GitHub repo yet, so it wasn't around for 2.0.0 packaging. Presumably, it'll make it into a release shortly.

jesse-gallagher commented 8 years ago

Looks like this was indeed implemented with a wave of Nathan's changes a couple weeks ago, so I'll close this pull request.

MarkusLanger commented 8 years ago

When will there be a new version on the OpenNTF project?