Re: Using Oracle with Shark 1.1-2
David Delbecq <[email protected]> Wed, 14 Sep 2005 10:09:28 +0200
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Organization | Institut Royal Météorologique |
| Message-ID | <[email protected]> |
Here is the test i did.
First, i access using corba, but not using the manager, we simply do the following using the shark-corba api:
WfAssignment ass[] = ressource.get_sequence_work_item(0);
ArrayList beans = new ArrayList();
for (int i=0;i<ass.length;i++)
beans.add(new AssignmentBean(ass[i]));
pageContext.setAttribute(bean,beans,getScope(scope));
the AssignementBean collects various informations from the WfAssignement about the assignee,
the activity, and the context. Those are not very extensive informations, just basic datas needed
to show the assignement (like activity descripition, accepted status, start time, status), disabling
process_context() gathering helps a bit (takes about half of the time) but does not solve root of problem.
The test were made using the beanshell example xpdl, where a few 'game' and 'math' workflow had been started and
then user listed it's assignments (10 assignments).
I added various time tracking code to my collecting beans, here is what gets out with oracle:
all times are expressed as milliseconds and represent time our various bean
had taken to get some datas from the wf objects given as their constructor argument.
creating activity....
created process managertest_bs#1#basic
created processbean+managerbean in 206
done creating activity....429
assignment created for atcivity A1
creating activity....
created process managertest_bs#1#domath
created processbean+managerbean in 121
done creating activity....740
assignment created for atcivity Enter math parameters
creating activity....
created process managertest_bs#1#domath
created processbean+managerbean in 306
done creating activity....1824
assignment created for atcivity Enter various parameters
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 1501
done creating activity....1854
assignment created for atcivity Enter 2. No.
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 176
done creating activity....423
assignment created for atcivity Enter 1. No.
creating activity....
created process managertest_bs#1#domath
created processbean+managerbean in 1255
done creating activity....1490
assignment created for atcivity Enter various parameters
as you can see(done creating activity.... lines), getting datas from an assignment takes
between 400 and 1800 milliseconds. (Yes, up to 1,8 seconds to
get informations on an assignement)
Not to mention there are no special datatype involved other than ones may be
define in your example workflows.
Now, here are result with the exact same code on a mysql server i just installed:
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 46
done creating activity....84
assignment created for atcivity Enter 1. No.
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 45
done creating activity....83
assignment created for atcivity Enter 2. No.
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 47
done creating activity....88
assignment created for atcivity Enter 2. No.
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 47
done creating activity....94
assignment created for atcivity Enter 2. No.
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 49
done creating activity....87
assignment created for atcivity Enter 1. No.
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 64
done creating activity....110
assignment created for atcivity Enter 2. No.
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 65
done creating activity....116
assignment created for atcivity Enter 1. No.
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 71
done creating activity....221
assignment created for atcivity Enter 2. No.
creating activity....
created process managertest_bs#1#Game
created processbean+managerbean in 55
done creating activity....111
assignment created for atcivity Enter 1. No.
result as you see are quite different (between 100 and 250 milliseconds / assignement)
The difference between mysql and oracle configuration is apparently a factor of 1:4 to 1:7
For us this simply mean, no go with oracle as long as problem is not solved, so we are investigating
Here is for example the constructor for the AssignmentBean:
public AssignmentBean(WfAssignment ass) throws BaseException{
accepted = ass.get_accepted_status();
assigneeKey=ass.assignee().resource_key();
assigneeName=ass.assignee().resource_name();
activity = new ActivityBean(ass.activity());
System.out.println("assignment created for atcivity "+activity.getName());
}
Now, you doubt we can't reach such slowness. Starting a process like the 'game' one takes for me 2 to 3 seconds on oracle.
So am not surprised more complex ones take up to 30 seconds for process creating.
For the optional data models, we are not using large strings neither custom java classes for now.
considering the vent audit manager, i'll try to disable it for testing purpose, but we unfortunatly need it :)
For caching, i activated a dods caching of 500 objects, but it seems anyway shark engine is doing oracle queries.
We are investigating with our DBAs to get a list of queries and the time they took.
Le Mercredi 14 Septembre 2005 09:46, Sasa Bojanic a écrit :
> Hi guys,
>
> it is true that shark has the worst performance when working with Oracle, but it shouldn't be that slow.
>
> I made an internal tests, and when not using caches (DODS and Shark), the refreshing of the worklist that contains 70 assignments
> lasts for 5 seconds when using shark admin.
>
> Also, the shark admin is not the best tool for testing performance, because it does a lot of additional queries additional to the
> one you needed.
>
> I.e., you said that you need some 30 sec to start a process, which can't be possible (it could be possible only if you have a lot of
> automatic activities that last for a long time at the very beginning of the process). As my tests show, the process is started in a
> less than a second, and the rest of the time I was waiting for Admin to refresh the state (you can see it by looking at shark logs),
> and the time admin spends for refreshing depends on the number of already started process instances, and probably the number of
> existing assignments.
>
> Did you try to use optional variable data model for EventAudit and InstancePersistence layer? If you are not using large String
> variables and custom Java classes as variables, this could help. Turning-off of EventAudit component (if not needed) could also
> help.
>
> The shark/dods caching will certainly improve the performance, but once again, the shark admin is not relevant for the performance
> tests.
>
> Finally, the latest CVS version has the new profiling feature. You can configure profiler to log the times spend in the API methods
> you call - this could certainly help to determine the bottlenecks.
>
> Regards,
> Sasa.
>
> ----- Original Message -----
> From: "David Delbecq" <[email protected]>
> To: <[email protected]>
> Sent: Tuesday, September 13, 2005 3:20 PM
> Subject: Re: [shark] Using Oracle with Shark 1.1-2
>
>
> Le Mardi 13 Septembre 2005 15:07, Dahl, Greg (BLM) - contr a écrit :
> > Unfortunately, we shelved our workflow project in order to complete some higher priority projects before the end of the year.
>
> Poor shelves :) I bet i'll Investigate alone.
>
> >
> > There is a mention about Oracle performance in setting one of the config files that talks about performance. I believe it had
> something to do with caching. However, I never did get time to try it out.
>
> Am playing with it, but does not seems to have lots of influence :/
>
> >
> > There are a few other things in Shark that may prevent us using it - mainly, the inability to dynamically assign groups of people
> to a work item. It allows you to dynamically assign an individual user, but not a group.
>
> For information, We nearly solved a problem i think similar here. We needed to assign to a group of user where the elligible users
> in the group where dependent on the workflow starter. (assign to 'boss of requester')
> Thought there is no code here to do it yet, we checked and it seems inside the assignment manager we have all informations we need
> to do it.
>
> Regards
>
> >
> > Hopefully, when we pick this project back up, we'll be able to resolve these issues.
> >
> > Greg
> >
> > > -----Original Message-----
> > > From: David Delbecq [mailto:[email protected]]
> > > Sent: Tuesday, September 13, 2005 7:58 AM
> > > To: [email protected]
> > > Subject: Re: [shark] Using Oracle with Shark 1.1-2
> > >
> > >
> > > Le Mardi 30 Août 2005 15:37, Dahl, Greg (BLM) - contr a écrit :
> > > > Has anyone else used any version of Oracle as the database
> > > for Shark?
> > > >
> > >
> > > Hi, we have ran in the same problem here.
> > >
> > > To integrate shark in our website, we created some taglib
> > > connecting to shark via CORBA. While performance were quite
> > > good using devel hsql database (about 80
> > > milliseconds/assignment) the oracle version is slow like hell
> > > (between 700 and 1400 milliseconds/assignment). I let you
> > > imagine my surprise when i loaded a webpage showing my 13
> > > assignments and it took about 15 seconds to load it :s
> > >
> > > > When using a HSQL database for testing, we can create a new
> > > workflow
> > > > instance in less than a second. When we use our same code but this
> > > > time point Shark to Oracle, it takes approximately 31 seconds. For
> > > > instance, each process variable we add to our context map adds two
> > > > seconds to the set_process_context method. The start method takes
> > > > approximately five seconds to run.
> > >
> > > about 2 seconds to create a new process here using oracle.
> > > Simply by starting the test game in beanshell example XPDL
> > >
> > > >
> > > > Normally, I would suspect a problem with our database server. Yet,
> > > > this server has other tables in the same tablespace and our
> > > > application is using it which does multiple queries and table joins
> > > > with sub-second response time.
> > >
> > > Same case here, server is highly used and has no know issue
> > > with load.
> > > We have a content managment stored on it, and it way faster
> > > to get metadatas of 100 documents in it then to get datas
> > > about 13 assignments in shark :(
> > >
> > > >
> > > > Any suggestions where to start? I'd hate to have to modify
> > > the Shark
> > > > source because we'd have to make the same modifications
> > > everytime we
> > > > wanted to upgrade. The inability to resolve these issues is
> > > going to
> > > > cause me to toss the last three months worth of work down the drain.
> > > >
> > >
> > > I'd like to know if you located the probem already.
> > >
> > > > Greg
> > > > ******* Confidentiality Notice *******
> > > > This email, its electronic document attachments, and the
> > > contents of
> > > > its website linkages may contain confidential health information.
> > > > This information is intended solely for use by the individual or
> > > > entity to whom it is addressed. If you have received this
> > > information
> > > > in error, please notify the sender immediately and arrange for the
> > > > prompt destruction of the material and any accompanying attachments.
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > > --
> > > David Delbecq
> > > Royal Meteorological Institute of Belgium
> > >
> > > -
> > > Is there life after /sbin/halt -p?
> > >
> > >
> >
> >
> >
>
> --
> David Delbecq
> Royal Meteorological Institute of Belgium
>
> -
> Is there life after /sbin/halt -p?
>
>
>
>
> --------------------------------------------------------------------------------
>
>
> >
> > --
> > You receive this message as a subscriber of the [email protected] mailing list.
> > To unsubscribe: mailto:[email protected]
> > For general help: mailto:[email protected]?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
>
>
>
--
David Delbecq
Royal Meteorological Institute of Belgium
-
Is there life after /sbin/halt -p?
message-footer.txt
(text/plain, 271 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws