[Zope-dev] remote procedure calls to manage functions

Michel Pelletier michel@digicool.com
Thu, 10 Aug 2000 11:47:04 -0400


Jim Fulton wrote:
> 
> Michel Pelletier wrote:
> >
> >
> > I made a test script to make about 300 xmlrpc calls to various manage_
> > methods.  I had to kill it after about a half-hour cuz it was takin so
> > long.
> 
> This sounds pretty fishy. Are you saying that you made less than
> 300 calls in half an hour? This doesn't seem right at all.

My bad, my fingers dropped a zero.  I was gonna say 3000.  I don't know
the exact number but I can find out, i just wrapped a for loop around
the code that uploads the book content to zope.org; effectively
uploading the book 100 times.  I don't know the exact time either, but
in the time it ran before i killed it I recompiled and reconfigured a
linux kernel three times and had at least four cups of coffee.

> Hm. This says that the FileStorage _finish method was called
> 3852 times.  This says that 3852 transactions were committed.

That may be the number of calls it made before i killed it.

> Since transactions only get committed on write requests, then
> this suggests 3852 write requests. There should have been
> way more than 3852 requests to have this many write requests.....

You mean 300?
 
> First, it's not spending most of it's time in DT_InSV __getitem__, although
> it's spending more time in that method than in any other single method.
> The reason it spends so much time in that method is that the method
> gets called 700 thousand times. That is, it's used alot, because alot
> of in-tag special variables are used in your test. 

I'm not sure why though, I'm not executing any DTML, just uploading a
bunch of structured text into File objects (and three DTML methods to
view the book).

> This is also a
> pretty non-trivial method, so it's reasonable that it might take
> a while.
> 
> All of this seems to me to be somewhat beside the point.
> 
> The original comment was regarding ZClient vs XML-RPC.
> It would be more interesting to:
> 
>  - Compare ZClient and XML-RPC for some realistic tests, like yours,
> 
>  - Compare them for simple Python methods that don't do much but
>    return some data, something like:
> 
>    def test(x,y,z):
>       return 'hello world' * 100
> 
>  - If there is a big difference, use the profiler to try to figure out
>    why XML-RPC is taking so long.

Ok, in my spare time i'll cobble up a much better benchmark.

-Michel