ARIS Database Performance Test: How To Work With Huge Number of Objects
So, it’s my first post here and I’d like to introduce myself. My name is Nikita Martyanov and I’ve been working as an ARIS Developer / ARIS Products Specialist for more than 8 years. Here you’ll find my contacts, resumes and other information.
Today I want to tell you about different modes of ARIS database working. It’s a very common task to upload to ARIS a lot of new data / renew data on schedule and so on. Sometimes we need to create tons of occurrences, definitions, models, groups. And if we work in standard mode we’ll start to experience performance troubles. But ARIS has a built-in solution.
First of all, ARIS has three database modes (object Constants
):
Constants.SAVE_AUTO //default mode
Constants.SAVE_ONDEMAND
Constants.SAVE_IMMEDIATELY
To change the mode we can use ArisData
object:
ArisData.Save(Constants.SAVE_ONDEMAND)
Some words about ARIS Database modes. The default mode is SAVE_AUTO
as it’s said in ARIS Script Help. SAVE_ONDEMAND
mode lets us to accumulate changes somewhere in the memory and don’t apply them to a database until SAVE_NOW
is called. And SAVE_IMMEDIATELY
mode (the slowest) applies changes at once.
To prove there’s a big difference between those modes I created the test ARIS report and performed an experiment. I think that an absolute result may vary, it depends on the computer performance, type of DBMS and other factors. Nevertheless we can get relative results on the same machine.
This test contains five tasks:
- create 1000 groups inside the root group of a database;
- create 1000 models inside the root group of a database;
- create 1000 object definitions inside the root group of a database;
- create 1000 object occurrences on a random model;
- clear a database (delete all created items);
It’s not a good idea to post here full code, so you’ll find it in the Github Repository.
I ran each test three times and below in the table the average execution time is presented:
DB Mode | 1000 groups | 1000 models | 1000 definitions | 1000 occurrences | Clear a database | Total time | Total time change |
---|---|---|---|---|---|---|---|
SAVE_AUTO | 00:00:42,848 | 00:00:00,733 | 00:00:00,322 | 00:01:35,659 | 00:01:42,450 | 00:04:02,013 | 100% |
SAVE_ONDEMAND | 00:00:00,536 | 00:00:01,394 | 00:00:00,119 | 00:00:38,568 | 00:00:39,868 | 00:01:25,031 | ~-65% |
SAVE_IMMEDIATELY | 00:00:30,684 | 00:00:37,403 | 00:00:40,661 | 00:01:32,435 | 00:03:57,794 | 00:07:18,978 | ~+81% |
there can be some inaccuracies in the time data because of the mode difference and their approaches of working with DB. Nevertheless total time is accurate.
As you can see execution time decreases by 65% percent when we use SAVE_ONDEMAND
mode in comparison with SAVE_AUTO
mode. And this result we got on an empty database. I suppose it will be much more effective, when a database has a lot of objects inside.
And time extremely increases by 81% when we use SAVE_IMMEDIATELY
mode. This mode is effective only if we want to write changes in a database right after the execution of a particular command in the script.
Hope that the information above will be useful for you.