[ome-devel] Blitz sessions

Woodbridge, Mark R m.woodbridge at imperial.ac.uk
Thu Nov 12 09:14:17 GMT 2009


Server log attached. I'll try to install the server on another machine to check whether it's my setup.

Mark.

-----Original Message-----
From: josh.moore at gmx.de [mailto:josh.moore at gmx.de] 
Sent: 12 November 2009 08:16
To: Woodbridge, Mark R
Cc: ome-devel at lists.openmicroscopy.org.uk
Subject: Re: [ome-devel] Blitz sessions


Thanks for the logs, Mark.

I haven't reproduced such a long wait yet, but at least now I can see
what is going on, namely that the serviceFactory.destroy() invocation
is blocking:

TRACE 313034:
	java.lang.Object.wait(Object.java:Unknown line)
	IceInternal.Outgoing.invoke(Outgoing.java:Unknown line)
	omero.api._ServiceFactoryDelM.destroy(_ServiceFactoryDelM.java:Unknown line)
	omero.api.ServiceFactoryPrxHelper.destroy(ServiceFactoryPrxHelper.java:Unknown
	line)

In your case, it's a sizeable part of the main thread's execution:

CPU TIME (ms) BEGIN (total = 145957) Wed Nov 11 21:44:20 2009
rank   self  accum   count trace method
...
   3 13.73% 72.89%       1 313034 java.lang.Object.wait
...

In my remote test, serviceFactory.destroy() shows up much lower on the list:

...
  46  0.48% 73.93%       1 313227 omero.client.closeSession
  47  0.46% 74.39%       1 312800 omero.api.ServiceFactoryPrxHelper.destroy
  48  0.46% 74.85%       1 312798 omero.api._ServiceFactoryDelM.destroy
  49  0.46% 75.31%       1 312799 omero.api.ServiceFactoryPrxHelper.destroy
...

In my local test, it doesn't show up at all.

There is the possibility of making the sf.destroy() call asynchronous
which we'll look into, but it'd be good to understand what's going on
first, since this could conceivably happen for other calls, too. Could
you send the Blitz-0.log for the same time period (21:44 yesterday
according to the hprof output)?

Thanks again,
~Josh.


Woodbridge, Mark R writes:
 > Hello Josh,
 > 
 > I have attached the logs. There are only three projects in the
 > database. The tcpdump when running on the local machine is almost
 > identical to when running on the remote machines - but in the
 > latter case there seems to a be a extra long pause after the query
 > is run but before the server acknowledges the closeSession
 > request. Perhaps this is just something to do with my server or
 > network setup, but it's a bit strange.
 > 
 > Mark.
 > 
 > -----Original Message-----
 > From: josh.moore at gmx.de [mailto:josh.moore at gmx.de] 
 > Sent: 11 November 2009 20:42
 > To: Woodbridge, Mark R
 > Cc: ome-devel at lists.openmicroscopy.org.uk
 > Subject: [ome-devel] Blitz sessions
 > 
 > Woodbridge, Mark R writes:
 >  > Hi,
 > 
 > Hi Mark,
 > 
 >  > If I run the following program on the OMERO server machine it takes about half a second:
 >  > 
 >  > public class Test {
 >  >     public static void main(String[] args) throws Exception {
 >  >         omero.client client = new omero.client(args);
 >  >         try {
 >  >             client.createSession().getQueryService().findAllByQuery("select p from Project p", null);
 >  >         } finally {
 >  >             client.closeSession();
 >  >         }
 >  >     }
 >  > }
 >  > 
 >  > But if I run it on another machine on the local network (have tried
 >  > Windows and Linux) the results are returned almost as fast but the
 >  > client.closeSessionCall() takes 10 seconds rather than being
 >  > instant. Am I missing something from my code? Would be very
 >  > grateful for any pointers...
 > 
 > I don't know of a specific reason that close session should be slower
 > from another machine, i.e. I don't think you're doing anything wrong.
 > 
 > Can you maybe run the Test with either:
 > 
 >   java -agentlib:hprof=cpu=times Test
 > 
 > or 
 > 
 >   java -Xprof Test
 > 
 > (or both) and send the results? Also, how many projects are we talking
 > about here?
 > 
 >  > Mark.
 > 
 > ~J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Blitz-0.log
Type: application/octet-stream
Size: 39524 bytes
Desc: Blitz-0.log
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20091112/f2b23155/attachment-0001.obj>


More information about the ome-devel mailing list