Return-Path: X-Original-To: apmail-airavata-dev-archive@www.apache.org Delivered-To: apmail-airavata-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3AB9B11BD9 for ; Thu, 14 Aug 2014 13:37:46 +0000 (UTC) Received: (qmail 87950 invoked by uid 500); 14 Aug 2014 13:37:46 -0000 Delivered-To: apmail-airavata-dev-archive@airavata.apache.org Received: (qmail 87904 invoked by uid 500); 14 Aug 2014 13:37:46 -0000 Mailing-List: contact dev-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list dev@airavata.apache.org Received: (qmail 87889 invoked by uid 99); 14 Aug 2014 13:37:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Aug 2014 13:37:45 +0000 X-ASF-Spam-Status: No, hits=2.6 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,TRACKER_ID X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kamalasini@gmail.com designates 209.85.215.41 as permitted sender) Received: from [209.85.215.41] (HELO mail-la0-f41.google.com) (209.85.215.41) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Aug 2014 13:37:41 +0000 Received: by mail-la0-f41.google.com with SMTP id s18so1065780lam.14 for ; Thu, 14 Aug 2014 06:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=OcFOclhsAPIutkhCUtFqX3ftPVlGbTwoRAhBB0TfeG4=; b=wPhy0xYxp6Fk2BPCgZGzCnc3jzCbgX0EhGfCBPUBB+dRUAxOlNEk/GB+o5w7oxUaCV NNGmZbaHz3sKvqNML0xLDa31v41QuQsZc8x6Yg/PX5feo5/ESzNQg0KGK2ejDHfNBqH3 Orqlitno+WZZG9de5DF+LahASRLhkQw/Y5Yx4aUjEYKzLEC3ZybKkOYETSqVSixgRC2W 3iZ2OQhvjzBWWnYX5CBBF2hAracLwqwWEL0BzT8pXzYcz88HkjSvxzhsl+nwtYTDYDZ9 vUNLwjzwj2Nkz55IT/JojG9xk5tbLTpnJGixhXR7nLDtDxA/6H2+qLSm46BzUQysDEvC Jwlg== X-Received: by 10.153.6.39 with SMTP id cr7mr5256225lad.66.1408023439518; Thu, 14 Aug 2014 06:37:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.54.200 with HTTP; Thu, 14 Aug 2014 06:36:58 -0700 (PDT) In-Reply-To: References: <53CFAC8D.8070000@iu.edu> <53EA12CB.9070505@iu.edu> <53EA1660.3020606@iu.edu> From: Chathuri Wimalasena Date: Thu, 14 Aug 2014 09:36:58 -0400 Message-ID: Subject: Re: Profiling the current Airavata registry To: dev@airavata.apache.org Content-Type: multipart/alternative; boundary=001a11348414f2b0950500970059 X-Virus-Checked: Checked by ClamAV on apache.org --001a11348414f2b0950500970059 Content-Type: text/plain; charset=UTF-8 Hi Sachith, Which DB you are using to do the profiling ? On Wed, Aug 13, 2014 at 11:51 PM, Sachith Withana wrote: > Here's how I've written the script to do it. > > Experiments loaded: > 10 users, 4 projects per each user, > each user would have 1000 to 100,000 experiments (1000,10,000,100,000) > containing experiments like echo, Amber > > Methods tested: > > getExperiment() > searchExperimentByName > searchExperimentByApplication > searchExperimentByDescription > > WDYT? > > > On Tue, Aug 12, 2014 at 6:58 PM, Marlon Pierce wrote: > >> You can start with the API search functions that we have now: by name, by >> application, by description. >> >> Marlon >> >> >> On 8/12/14, 9:25 AM, Lahiru Gunathilake wrote: >> >>> On Tue, Aug 12, 2014 at 6:42 PM, Marlon Pierce wrote: >>> >>> A single user may have O(100) to O(1000) experiments, so 10K is too >>>> small >>>> as an upper bound on the registry for many users. >>>> >>> +1 >>> >>> I agree with Marlon, we have the most basic search method, but the >>> reality >>> is we need search criteria like Marlon suggest, and I am sure content >>> based >>> search will be pretty slow with large number of experiments. So we have >>> to >>> use a search platform like Solr to improve the performance. >>> >>> I think first you can do the performance test without content based >>> search >>> then we can implement that feature, then do performance analysis, if its >>> too bad(more likely) then we can integrate a search platform to improve >>> the >>> performance. >>> >>> Lahiru >>> >>> We should really test until things break. A plot implying infinite >>>> scaling (by extrapolation) is not useful. A plot showing OK scaling up >>>> to >>>> a certain point before things decay is useful. >>>> >>>> I suggest you post more carefully a set of experiments, starting with >>>> Lahiru's suggestion. How many users? How many experiments per user? >>>> What >>>> kind of searches? Probably the most common will be "get all my >>>> experiments >>>> that match this string", "get all experiments that have state FAILED", >>>> and >>>> "get all my experiments from the last 30 days". But the API may not >>>> have >>>> the latter two yet. >>>> >>>> So to start, you should specify a prototype user. For example, each >>>> user >>>> will have 1000 experiments: 100 AMBER jobs, 100 LAMMPS jobs, etc. Each >>>> user >>>> will have a unique but human readable name (user1, user2, ...). Each >>>> experiment will have a unique human readable description (AMBER job 1 >>>> for >>>> user 1, Amber job 2 for user 1, ...), etc that is suitable for >>>> searching. >>>> >>>> Post these details first, and then you can create via scripts experiment >>>> registries of any size. Each experiment is different but suitable for >>>> pattern searching. >>>> >>>> This is 10 minutes worth of thought while waiting for my tea to brew, so >>>> hopefully this is the right start, but I encourage you to not take this >>>> as >>>> fixed instructions. >>>> >>>> Marlon >>>> >>>> >>>> On 8/12/14, 8:54 AM, Lahiru Gunathilake wrote: >>>> >>>> Hi Sachith, >>>>> >>>>> How did you test this ? What database did you use ? >>>>> >>>>> I think 1000 experiments is a very low number. I think most important >>>>> part >>>>> is when there are large number of experiments, how expensive is the >>>>> search >>>>> and how expensive is a single experiment retrieval. >>>>> >>>>> If we support to get defined number of experiments in the API (I think >>>>> this >>>>> is the practical scenario, among 10k experiments get 100) we have to >>>>> test >>>>> the performance of that too. >>>>> >>>>> Regards >>>>> Lahiru >>>>> >>>>> >>>>> On Tue, Aug 12, 2014 at 4:59 PM, Sachith Withana >>>>> wrote: >>>>> >>>>> Hi all, >>>>> >>>>>> I'm testing the registry with 10,1000,10,000 Experiments and I've >>>>>> tested >>>>>> the database performance executing the getAllExperiments method. >>>>>> I'll post the complete analysis. >>>>>> >>>>>> What are the other methods that I should test using? >>>>>> >>>>>> getExperiment(experiment_id) >>>>>> searchExperiment >>>>>> >>>>>> Any pointers? >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Jul 23, 2014 at 6:07 PM, Marlon Pierce >>>>>> wrote: >>>>>> >>>>>> Thanks, Sachith. Did you look at scaling also? That is, will the >>>>>> >>>>>>> operations below still be the slowest if the DB is 10x, 100x, 1000x >>>>>>> bigger? >>>>>>> >>>>>>> Marlon >>>>>>> >>>>>>> >>>>>>> On 7/23/14, 8:22 AM, Sachith Withana wrote: >>>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>>> I'm profiling the current registry in few different aspects. >>>>>>>> >>>>>>>> I looked into the database operations and I've listed the operations >>>>>>>> that >>>>>>>> take the most amount of time. >>>>>>>> >>>>>>>> 1. Getting the Status of an Experiment (takes around 10% of the >>>>>>>> overall >>>>>>>> time spent) >>>>>>>> Has to go through the hierarchy of the datamodel to get to >>>>>>>> the >>>>>>>> actual >>>>>>>> experiment status ( node, tasks ...etc) >>>>>>>> >>>>>>>> 2. Dealing with the Application Inputs >>>>>>>> Strangely it takes a long time for the queries regarding the >>>>>>>> ApplicationInputs to complete. >>>>>>>> This is a part of the new Application Catalog >>>>>>>> >>>>>>>> 3. Getting all the Experiments ( using the * wild card) >>>>>>>> This takes the maximum amount of time when queried at first. >>>>>>>> But >>>>>>>> thanks >>>>>>>> to the OpenJPA caching, it flattens out as we keep querying. >>>>>>>> >>>>>>>> To reduce the first issue, I would suggest to have a different table >>>>>>>> for >>>>>>>> Experiment Summaries, >>>>>>>> where the status ( both the state and the state update time) would >>>>>>>> be >>>>>>>> the >>>>>>>> only varying entity, and use that to improve the query time for >>>>>>>> Experiment >>>>>>>> summaries. >>>>>>>> >>>>>>>> It would also help improve the performance for getting all the >>>>>>>> Experiments >>>>>>>> ( experiment summaries) >>>>>>>> >>>>>>>> WDYT? >>>>>>>> >>>>>>>> ToDos : Look into memory consumption ( in terms of memory leakage >>>>>>>> ...etc) >>>>>>>> >>>>>>>> >>>>>>>> Any more suggestions? >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>> Thanks, >>>>>> Sachith Withana >>>>>> >>>>>> >>>>>> >>>>>> >>> >> > > > -- > Thanks, > Sachith Withana > > --001a11348414f2b0950500970059 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Sachith,=C2=A0

Which DB you are usin= g to do the profiling ? =C2=A0

On Wed, Aug 13, 2014 at 11:51 PM, Sachith With= ana <swsachith@gmail.com> wrote:
Here's how I've wri= tten the script to do it.

Experiments loaded:
= 10 users, 4 projects per each user,
each user would have 1000 to 100,000 experiments =C2=A0(1000,10,000,10= 0,000) containing experiments like echo, Amber

Methods tested:=C2=A0

getExper= iment()
searchExperimentByName
searchExperimentByApplic= ation
searchExperimentByDescription

WDYT= ?


On Tue, Aug 12, 2014 at 6:58 PM, Marlon Pierce <marpierc@= iu.edu> wrote:
You can start with the API search functions = that we have now: by name, by application, by description.

Marlon


On 8/12/14, 9:25 AM, Lahiru Gunathilake wrote:
On Tue, Aug 12, 2014 at 6:42 PM, Marlon Pierce <marpierc@iu.edu> wrote:

A single user may have O(100) to O(1000) experiments, so 10K is too small as an upper bound on the registry for many users.
+1

I agree with Marlon, we have the most basic search method, but the reality<= br> is we need search criteria like Marlon suggest, and I am sure content based=
search will be pretty slow with large number of experiments. So we have to<= br> use a search platform like Solr to improve the performance.

I think first you can do the performance test without content based search<= br> then we can implement that feature, then do performance analysis, if its too bad(more likely) then we can integrate a search platform to improve the=
performance.

Lahiru

We should really test until things break. =C2=A0A plot implying infinite scaling (by extrapolation) is not useful. =C2=A0A plot showing OK scaling u= p to
a certain point before things decay is useful.

I suggest you post more carefully a set of experiments, starting with
Lahiru's suggestion. How many users? How many experiments per user? =C2= =A0What
kind of searches? =C2=A0Probably the most common will be "get all my e= xperiments
that match this string", "get all experiments that have state FAI= LED", and
"get all my experiments from the last 30 days". =C2=A0But the API= may not have
the latter two yet.

So to start, you should specify a prototype user. =C2=A0For example, each u= ser
will have 1000 experiments: 100 AMBER jobs, 100 LAMMPS jobs, etc. Each user=
will have a unique but human readable name (user1, user2, ...). Each
experiment will have a unique human readable description (AMBER job 1 for user 1, Amber job 2 for user 1, ...), etc that is suitable for searching.
Post these details first, and then you can create via scripts experiment registries of any size. Each experiment is different but suitable for
pattern searching.

This is 10 minutes worth of thought while waiting for my tea to brew, so hopefully this is the right start, but I encourage you to not take this as<= br> fixed instructions.

Marlon


On 8/12/14, 8:54 AM, Lahiru Gunathilake wrote:

Hi Sachith,

How did you test this ? What database did you use ?

I think 1000 experiments is a very low number. I think most important part<= br> is when there are large number of experiments, how expensive is the search<= br> and how expensive is a single experiment retrieval.

If we support to get defined number of experiments in the API (I think
this
is the practical scenario, among 10k experiments get 100) we have to test the performance of that too.

Regards
Lahiru


On Tue, Aug 12, 2014 at 4:59 PM, Sachith Withana <swsachith@gmail.com>
wrote:

=C2=A0 Hi all,
I'm testing the registry with 10,1000,10,000 Experiments and I've t= ested
the database performance executing the getAllExperiments method.
I'll post the complete analysis.

What are the other methods that I should test using?

getExperiment(experiment_id)
searchExperiment

Any pointers?



On Wed, Jul 23, 2014 at 6:07 PM, Marlon Pierce <marpierc@iu.edu> wrote:

=C2=A0 Thanks, Sachith. Did you look at scaling also? =C2=A0That is, will t= he
operations below still be the slowest if the DB is 10x, 100x, 1000x
bigger?

Marlon


On 7/23/14, 8:22 AM, Sachith Withana wrote:

=C2=A0 Hi all,
I'm profiling the current registry in few different aspects.

I looked into the database operations and I've listed the operations that
take the most amount of time.

1. Getting the Status of an Experiment (takes around 10% of the overall
time spent)
=C2=A0 =C2=A0 =C2=A0 =C2=A0Has to go through the hierarchy of the datamodel= to get to the
actual
experiment status ( node, =C2=A0 =C2=A0 tasks ...etc)

2. Dealing with the Application Inputs
=C2=A0 =C2=A0 =C2=A0 =C2=A0Strangely it takes a long time for the queries r= egarding the
ApplicationInputs to complete.
=C2=A0 =C2=A0 =C2=A0 =C2=A0This is a part of the new Application Catalog
3. Getting all the Experiments ( using the * wild card)
=C2=A0 =C2=A0 =C2=A0 =C2=A0This takes the maximum amount of time when queri= ed at first. But
thanks
to the OpenJPA =C2=A0 =C2=A0 =C2=A0 =C2=A0caching, it flattens out as we ke= ep querying.

To reduce the first issue, I would suggest to have a different table
for
Experiment Summaries,
where the status ( both the state and the state update time) would be
the
only varying entity, and use that to improve the query time for
Experiment
summaries.

It would also help improve the performance for getting all the
Experiments
( experiment summaries)

WDYT?

ToDos : =C2=A0Look into memory consumption ( in terms of memory leakage
...etc)


Any more suggestions?


--
Thanks,
Sachith Withana








<= /div>--
Thanks,
Sachith Withana


--001a11348414f2b0950500970059--