db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eranda Sooriyabandara <0704...@gmail.com>
Subject Application level multi-tenant approach performance testing for Apache Derby
Date Tue, 01 Mar 2011 17:20:14 GMT
Hi Devs,
For our school project we created a testing programs and a data to populate
testing databases. I thought that would be helpful to you as well. I created
a little description about the testing we were doing in the following

Here our main target was to test the performance of different queries of
application level multi-tenancy.

There are 3 different application level multi-tenant approaches
1. Shared Machine - in this approach each tenant has a dedicated database
2. Shared Process - in this approach each tenant share the same database but
have different schema.
3. Shared Table - in this approach all tenants share the same database and

Here we tested Apache Derby for first two approaches.

To the testing part we create one bash script program to create and populate
database structures and two programs to do the tests.

In the first program we test Shared Machine approach 1-10 tenants with
1000/10000 users in which we use java threads as tenants.
In the first program we test Shared Process approach 1-10 tenants with
1000/10000 users in which we use java threads as tenants.

I will come up with the results once they are finalize and Here I am
attaching the programs we used if you are interested.

Instructions for use:

First you need to create the databases (to create a real scenario we use a
Airline reservation system as our database schema which can be found at
This can be done using run the bash scripts(every tenant populating folder
has a CreateAndPopulate.sh). In this bash script it need to set DERBY_HOME.
After running the script it will use the Derby ij too to create and populate

Then you need to put all the database created by the ij tool into a one
folder and start the Derby network server there or specify the database
places to that folder.

Now it's ready to do the tests.

In the client program you can specify,

number of tenants(currently we created the databases for max-10 tenants for
SharedMachine approach and 4-tenants for SharedProcess Approach). You can
specify more tenants if you like using the existing data.
number of users per tenant
sql query which need to test. In shared process approach every table name
must be prefix by ' schema"+id+" ' which specify the tenant.

Output: This will output the time taken to run the query for each
tenant(with 1000 or 10000 users) in milliseconds.

If you have any problem with this please feel free to ask any question.


View raw message