Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #7288 (closed)

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

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:

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

Not this may have been fixed in 3.4.x since the logic changed:

- Added support for using direct buffers in the transport layer to
  minimize copying. The semantics of the Ice.CacheMessageBuffers
  property have been extended as follows:

  0 = no buffer caching
  1 = buffer caching using non-direct buffers
  2 = buffer caching using direct buffers

See: https://github.com/joshmoore/zeroc-ice/blob/master/CHANGES#L809

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.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.67663 sec.)

We're Hiring!