Task #7288 (closed)
Bug: Ice leaks BasicStreams when CacheMessageBuffers=1
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | critical | Milestone: | OMERO-4.4 |
Component: | Performance | Version: | n.a. |
Keywords: | n.a. | Cc: | jhufnagle@…, cxallan, jburel |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2011-12-13 (4) |
Description
Running the following with the default of Ice.CacheMessageBuffers=1 leaks IceInternal.BasicStream instances (which hold on to a number of other objects):
for (int i = 0; i < repetitions; ++i) { ExporterPrx exporter = null; try { exporter = myInstance.s.createExporter(); } finally { if (exporter != null) { exporter.close(); } }
Many thanks to John Hufnagle for tracking this down!
See:
- http://www.zeroc.com/doc/Ice-3.3.0-IceTouch/manual/PropRef.50.11.html
- http://www.zeroc.com/forums/help-center/4112-basicstream-allocation.html
Note: The same issue may also exist in OmeroPy. If that's the case, we should make CacheMessageBuffers=0 the default across the board.
Change History (6)
comment:1 Changed 12 years ago by jmoore
comment:2 Changed 12 years ago by jmoore
- Remaining Time set to 1
- Sprint set to 2011-12-13 (4)
- Status changed from new to accepted
Investigating performance impact of enabling this across the board.
comment:3 Changed 12 years ago by jmoore
Certainly doesn't look to be any slow down accessing from Python. On the contrary, there's a minor speed up (though over time the extra garbage collection could play a role):
(Using Ice 3.3)
The average real/user/sys for import of a smallish PNG with CacheMessageBuffers?=0 was: 6.58s, 5.03s, 0.50s where as with CMB=1: 7.15s, 5.10s, 0.50s or real/user ratios of 92 and 99% (i.e. a small speed up).
The same for exporting that PNG with CMB=0: 0.92s, 0.56s and 0.16s versus for CMB=1: 1.39s, 0.59s, 0.18s or real/user ratios of 66% and 96%.
Chris, thoughts on enabling this for the moment so we can get a feel for it in production? If you're ok with it, I'd probably push to my sprint4-bugs branch.
comment:4 Changed 12 years ago by jmoore
- Remaining Time changed from 1 to 0.1
comment:5 Changed 12 years ago by jmoore
- Remaining Time changed from 0.1 to 0
- Resolution set to fixed
- Status changed from accepted to closed
Chris, this got pushed to my branch: https://github.com/joshmoore/openmicroscopy/commit/fd4e57511d0f42e69a282b630b5b27b6d303ea63
If you could check over it there, that'd be great.
comment:6 Changed 12 years ago by jmoore <josh@…>
(In [fd4e57511d0f42e69a282b630b5b27b6d303ea63/ome.git]) Set Ice.CacheMessageBuffers?=0 (Fix #7288)
Not this may have been fixed in 3.4.x since the logic changed:
See: https://github.com/joshmoore/zeroc-ice/blob/master/CHANGES#L809