Performance of presentation server

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Performance of presentation server

tillermanwork
After reading the description of the presentation server, I was seriously considering using it to power a fairly simple web site.

However, when browsing the online samples, I noticed that it was extremely slow to respond to my requests. Initially I thought this may have been caused by a slow connection, so I installed the Orbeon Presentation Server on my local machine
and deployed it with Jakarta Tomcat 5.5.9 and JDK 1.5.

After browsing through the example code, it still appeared to be extremely slow.

In order to test this, I wrote a simple java application that would issue requests
for a fairly small amount of pages at once. I used this to connect to both
my local machine and the sample presentation server provided.

The results of this were less than impressive. When running locally, Java began throwing exceptions that it was out of heap space and crashed.
When connecting to the remote server, it was able to complete the requests, but
it took 45 seconds in order to do so.

To be perfectly honest, this seems to be appalling performance. Is the Orbeon Presentation Server fit in any way for commercial use?

Here is my code for any interested.

import java.net.HttpURLConnection;
import java.net.URL;
import java.net.*;
public class tst extends Thread{

        private String task;
// private static final String URLbase="http://192.168.0.20:8080/orbeon/goto-example/";
        private static final String URLbase="http://www.orbeon.com/ops/goto-example/";

        private static int numthreads;

        public tst(String taskID){
                super(taskID);
                task = taskID;
        }

        public void run(){
                String totalURL = URLbase + task;
                System.out.println("About to query " + totalURL);
                tst.numthreads++;
                try{
                URL url = new URL(totalURL);
                URLConnection con = url.openConnection();
               
               
                System.out.println(task + " ::: opening connection");
                System.out.println(task + " ::: " + con.getHeaderFields());
                System.out.println(task + " ::: " + "completed");
                }
                catch(Exception e){
                        System.out.println("bad stuff");
                        e.printStackTrace();
                }
                tst.numthreads--;
        }
       

        public static void main(String[] args) throws Exception{

        //URL test = new URL("http://192.168.0.20:8080/orbeon/goto-example/xforms-report");
       
        //String URLbase = "http://192.168.0.20:8080/orbeon/goto-example/";

        String[] tasks = {"tutorial-hello1","tutorial-hello2","tutorial-hello3","tutorial-hello4","cart","bizdoc","bizdoc2","blog","xforms-credit-card","xforms-wizard-switch","xforms-wizard-pfc","xforms-ubl","xforms-tax",
"address-book","address-book2"};

// String[] tasks = {"tutorial-hello1","tutorial-hello2","tutorial-hello3","tutorial-hello4"};
        long curtime = System.currentTimeMillis();

        for(String s: tasks){
                System.out.println("setting up " + s);
                tst tmp = new tst(s);
                tmp.start();
        }
        while(tst.numthreads != 0);
        System.out.println("done");
        System.out.println("Took " + (System.currentTimeMillis() - curtime) + " sec");

       




}



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Performance of presentation server

Erik Bruchez
Administrator
[hidden email] wrote:

 > After reading the description of the presentation server, I was
 > seriously considering using it to power a fairly simple web site.
 >
 > However, when browsing the online samples, I noticed that it was
 > extremely slow to respond to my requests. Initially I thought this
 > may have been caused by a slow connection, so I installed the Orbeon
 > Presentation Server on my local machine and deployed it with Jakarta
 > Tomcat 5.5.9 and JDK 1.5.
 >
 > After browsing through the example code, it still appeared to be
 > extremely slow.
 >
 > In order to test this, I wrote a simple java application that would
 > issue requests for a fairly small amount of pages at once. I used
 > this to connect to both my local machine and the sample presentation
 > server provided.
 >
 > The results of this were less than impressive. When running locally,
 > Java began throwing exceptions that it was out of heap space and
 > crashed.  When connecting to the remote server, it was able to
 > complete the requests, but it took 45 seconds in order to do so.
 >
 > To be perfectly honest, this seems to be appalling performance. Is
 > the Orbeon Presentation Server fit in any way for commercial use?

If your question is "Is OPS 3.0 beta 3 fit for commercial use", the
answer is "no, not yet". The examples you have tested online, as well,
I assume, as the version you have downloaded, are beta versions, and
if you check the first known issue in the list of changes for OPS 3.0
beta (http://www.orbeon.com/ops/doc/home-changes-30), you will find a
reference to the XForms initialization performance issue. As discussed
previously on this mailing-list, this is mainly due to an inordinate
number of XSLT transformations taking place to handle XForms in OPS
3.0 beta. We are currently working on reducing that number by
rewriting this code natively, and we hope that once it is released,
OPS 3.0 will have performance comparable to or better than OPS 2.8.

Now if the question is "are stable versions of OPS in general,
including OPS 2.8, fit for commercial use", the answer is "yes". Many
people have deployed OPS 2.8 in commercial applications. It should be
said that if you are looking at creating another Yahoo! or Google, OPS
is not for you: performance of XML- and XSLT- based web platforms tend
to be inferior to, say, compiled JSP.

Another thing you have to make sure to consider when doing performance
testing with OPS is NOT to go through the examples portal. Your own
applications written with OPS do not go through the examples portal,
so it is not fair to use that as a basis for performance. The examples
portal is the page listing all the OPS examples. When you access any
example through that portal, you actually have double OPS processing
going on, including running the page flow epilogue and theme twice:
once for the actual example running in a portlet, and once for the
portal page. In addition to this, there is overhead involved in
passing information from the portlet to the portal. Some examples
already have direct access, for example compare the following:

   http://www.orbeon.com/ops/goto-example/bizdoc2
   http://www.orbeon.com/ops/bizdoc2

However you can get quite good performance if you follow a certain
number of guidelines, including accessing examples directly, limiting
the number of processing threads entering your servlet container, and
correctly dimensioning your Java heap and cache, as described here:

   http://www.orbeon.com/ops/doc/home-faq#out-of-memory

Because there is usually at last one, but sometimes more than one XSLT
transformation involved in producing an OPS page, and such
transformations typically use more memory than for example JSP, it is
easier to get Out of Memory errors. However such use of memory is
transient, and requests are fairly short, so you usually get a large
performance improvement and better memory management by taking care of
serializing requests.

There are other OPS performance tips you can put in place, like cache
tuning, page flow epilogue tuning (stripping it of unnecessary parts
used only for the examples portal, for example), etc. And again, you
will have to either do some testing with OPS 2.8, or to wait until OPS
3.0 final is released, to be able to make a fairer assessment.

I hope this is encouraging!

-Erik




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws