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"

User Story #725 (closed)

Opened 17 years ago

Closed 16 years ago

Performance of resetDefaults() is non-linear

Reported by: cxallan Owned by: bwzloranger
Priority: minor Milestone: 3.0-Beta3
Component: Performance Keywords: n.a.
Cc: jburel Story Points: n.a.
Sprint: n.a. Importance: n.a.
Total Remaining Time: n.a. Estimated Remaining Time: n.a.

Description

Over time, calls to resetDefaults() get slower and slower into the 10's of seconds. This makes browsing of a semi-large dataset of thumbnails (>500) in OMERO.insight horrendously slow (hours to fully display all thumbnails). Large numbers of calls to resetDefaults() also increase the memory usage on the server exorbitantly eventually resulting in the server VM spending almost all of its time triaging for objects to deallocate.

Change History (10)

comment:1 Changed 17 years ago by cxallan

  • Owner changed from jmoore to callan
  • Status changed from new to assigned

r1581 resolves this.

comment:2 Changed 17 years ago by cxallan

  • Owner changed from callan to jmoore
  • Status changed from assigned to new

Josh, if you can think of a reason why we must have this debug statement I'm all ears. Perhaps it's time to reduce the logging level in some of the modules? I can't see however, how this statement can be useful if it murders the server after about 10 or 20 calls to resetDefaults() though. *shrugs*

comment:3 follow-up: Changed 17 years ago by jmoore

  • Owner changed from jmoore to callan

Naturally, no, it's not an issue to take out any single debug statement. However,

  • Did you try just reducing the output level in log4j.xml? There should be little or no impact when turned off, since it was protected by if (log.isDebugEnabled())
  • What's the actual performance hit look like with debug enabled? Do you really think this is the culprit of resetDefaults() issues?
  • Let's not get into the habit of removing all debug statements, 'cause we'll just end up adding them back eventually. :)

In general, however, let's review (or just completely overhaul) the log4j.xml that we ship with the distribution bundle, and perhaps put up a page for anyone who wants to modify their own jboss. I'll add a ticket for that.

comment:4 Changed 17 years ago by jmoore

See #726

comment:5 in reply to: ↑ 3 Changed 17 years ago by cxallan

Replying to jmoore:

Naturally, no, it's not an issue to take out any single debug statement. However,

  • Did you try just reducing the output level in log4j.xml? There should be little or no impact when turned off, since it was protected by if (log.isDebugEnabled())

Yeah, reducing the log level has the same benefit obviously.

  • What's the actual performance hit look like with debug enabled? Do you really think this is the culprit of resetDefaults() issues?

It's huge. Basically the server is spending 25% or more of its time doing StringBuffer? operations and for every call the server memory allocation seems quite significant.

  • Let's not get into the habit of removing all debug statements, 'cause we'll just end up adding them back eventually. :)

With out a doubt. That said, I don't think we should get into the habit of sticking whatever we feel like into the debug logging level and just assuming that the performance hit is irrelevent.

In general, however, let's review (or just completely overhaul) the log4j.xml that we ship with the distribution bundle, and perhaps put up a page for anyone who wants to modify their own jboss. I'll add a ticket for that.

Sounds perfect. Along with that I'd like to make sure that we do a couple things (which I've added to #726):

  • Ensure that there are no e.printStackTrace()'s anywhere (they just make debugging using the server.log useless)
  • Remove instances of System.err or System.out from the codebase

comment:6 Changed 17 years ago by cxallan

I'd just like to clarify that the StringBuffer operations are just one factor here, I've now got a couple culprits in the RenderingEngine (math operations and lookup table construction) that are also some pretty heavy hitters. However, it definitely seems that the culprit of the non-linearity is the StringBuffer operations.

comment:7 Changed 17 years ago by cxallan

  • Cc jburel added
  • Status changed from new to assigned

r1582 has alleviated a lot of issues with regards to object orientation of math code inside the StatsFactory. Jean-Marie, you'll probably want to review this and see if we can improve it further.

comment:8 Changed 16 years ago by cxallan

  • Keywords iteration6 removed

Going to have a look at this again now that OmeroSessions has been merged in.

comment:9 Changed 16 years ago by cxallan

  • Owner changed from callan to brain
  • Status changed from assigned to new

Features for Brian are now available in r2344; the importer should now hold a IRenderingSettings service and call resetDefaults() once the image has been imported successfully.

Passing to Brian.

comment:10 Changed 16 years ago by bwzloranger

  • Resolution set to fixed
  • Status changed from new to closed
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.65552 sec.)

We're Hiring!