Skip to Content.
Sympa Menu

grouper-users - [grouper-users] Grouper 2.3 DB Performance Question

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] Grouper 2.3 DB Performance Question


Chronological Thread 
  • From: Reid Watson <>
  • To: "" <>
  • Subject: [grouper-users] Grouper 2.3 DB Performance Question
  • Date: Tue, 26 Jun 2018 03:31:36 +0000
  • Accept-language: en-GB, en-NZ, en-US
  • Ironport-phdr: 9a23:D3/jyRHZLoHh2tfB/4vFr51GYnF86YWxBRYc798ds5kLTJ7zoMiwAkXT6L1XgUPTWs2DsrQY07eQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDqwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KOT4n/m/Klsx+gqFVrhWgpxNjzIDbb5qYNOZlcaPYYd8aRXZNU8RXWidcAo28dYwPD+8ZMOhEsYb9pkYBpga+Cga2GOPv0ThIhnnr1qA9yeQuDwDG0xE6E9MAqnvUsM71NKAUUe2u1qbI0CnMb/BS2Tjn7ojHbwotruuQUr5qd8rQyFAiGgXYhVuTsYzoJy6Z2+oRv2SB8eZsSOOih3Q6pw1vojWj3Nkgh4bIi44N11zJ+zl1zJwrKdGlSUN3e8OoHZtTui2AOIZ6Ws0iTH9rtSomz7ALvJ22cSwUx5kjwhPSZeaIfomS7R/mSeqcLy13iG9gdb+wmxq+7Uqtx+vhXceuyllKtDBKktzUu3ANyRPT7s+HR+N4/kau1juDzgHT6udYIUwuj6XbNoIuwr00lpUJt0TMAzX6l1/qg6OMcEUl+/Ck6+XhYrr4up+RL5J4hw/iPqg0hMCzHOU1PhITU2SF+emwzqPv8EL4TblSi/05iKjZsJTUJcQBoa65BhdY0pw95Ba+EjiqytoZkmMbLFJefxKHiZPkNEvTIP/kDve/h06jkDF2yPzcJLLuHo/BLn7Ckbv5Z7Zy91ZcyBYvzdBY/59UBasBIPXuWk/pqtPYFAY1MxGvw+n5EtV9zZgTWWaOAq+CLKPSqkGE6vguI+mKeI8apiz9K/476P7yk3M1g0EScrS03chfVHftVPt8JFiBbGCpn8wMC3wivwwiQfbshUHYFzNfejz6C60m4SwjBZjjEJzOXJuFgbqd0T29E4EMIG1KFwbfP23vctC+VvYAIB2bPtRmlHRQT7WgR8k+3A21swnSwqdsLe7d/CFevJml0sojtL6brg076TEhV5fV6GqKVWwhxm4=

Hi Everyone,

Our DBA team have reviewed a performance issue within our production
environment when inserting a large number of members per domain

1. Application Overview on Version and Patches

Grouper 2.3.0
- grouper_v2_3_0_ws_patch_12
- grouper_v2_3_0_api_patch_104
- grouper_v2_3_0_pspng_patch_16
- grouper_v2_3_0_ui_patch_42

Oracle 11g

Number of Members: 13855148

2. Process to load Members

- Create a Temp table within the Grouper DB
- Use the loader process to read from the Temp table and update Grouper DB

The loader job is as follows
gs = GrouperSession.startRootSession()

addRootStem(“psp”,“psp”);

addRootStem(“loader”,“loader”);

addGroup(“loader”,“allUsers”, “All Users”);

groupAddType(“loader:allUsers”, “grouperLoader”);
setGroupAttr(“loader:allUsers”, “grouperLoaderDbName”, “grouper”);
setGroupAttr(“loader:allUsers”, “grouperLoaderType”, “SQL_SIMPLE”);
setGroupAttr(“loader:allUsers”, “grouperLoaderScheduleType”, “CRON”);
setGroupAttr(“loader:allUsers”, “grouperLoaderQuartzCron”, “0 * * * * ?“);
setGroupAttr(“loader:allUsers”, “grouperLoaderQuery”, “select distinct uid as
SUBJECT_ID from SIS_COURSES”);


3. Database Issue: DB Alerts

OracleEM: Database: GRPPRD CRITICAL: Metrics Blocking Sessions Count is at
87<BR> <BR>
OracleEM: Database: GRPPRD WARN: Metrics Blocking Sessions Count is at 70<BR>
OracleEM: Database: GRPPRD WARN: Metrics Blocking Sessions Count is at 19<BR
OracleEM: Database: GRPPRD CRITICAL: Metrics Blocking Sessions Count is at
43<BR

They believe the issue is related to the high load and Foreign keys …

4. Overview from the DBA’s

*************************************

I just noticed there are numerous foreign keys between the tables. Foreign
keys are problematic for the large scale table inserts and changes (ie table
batch processing)

As an example the table

"GROUPER"."GROUPER_MEMBERSHIPS" has gout about 7 ref. constraints listed
below.

When you insert a row into this table each insert has to be checked for the
constraints with other tables. Then if you insert at high rate these other
referred tables it becomes really difficult to do an row insert and verify
table constraints at the same time in this setup.

The cross tables constraints and simultaneous inserts create high concurrency
inside the database around same table blocks.

One way to improve is o separate table inserts (or batch processing) and do
only one table at the time.

The schedule of the batch processing (ie schedule of the inserts) need to be
adjusted , spread over the time, to allow enough time to complete without
blocking each other.

So need to give sometime between the table changes …..don’t run them all at
once.

CONSTRAINT "FK_MEMBERSHIPS_MEMBER_ID" FOREIGN KEY ("MEMBER_ID")
REFERENCES "GROUPER"."GROUPER_MEMBERS" ("ID") ENABLE,
CONSTRAINT "FK_MEMBERSHIP_FIELD_ID" FOREIGN KEY ("FIELD_ID")
REFERENCES "GROUPER"."GROUPER_FIELDS" ("ID") ENABLE,
CONSTRAINT "FK_MEMBERSHIPS_CREATOR_ID" FOREIGN KEY ("CREATOR_ID")
REFERENCES "GROUPER"."GROUPER_MEMBERS" ("ID") ENABLE,
CONSTRAINT "FK_MEMBERSHIPS_GROUP_OWNER_ID" FOREIGN KEY ("OWNER_GROUP_ID")
REFERENCES "GROUPER"."GROUPER_GROUPS" ("ID") ENABLE,
CONSTRAINT "FK_MEMBERSHIPS_STEM_OWNER_ID" FOREIGN KEY ("OWNER_STEM_ID")
REFERENCES "GROUPER"."GROUPER_STEMS" ("ID") ENABLE,
CONSTRAINT "FK_MEMBERSHIPS_COMP_VIA_ID" FOREIGN KEY ("VIA_COMPOSITE_ID")
REFERENCES "GROUPER"."GROUPER_COMPOSITES" ("ID") ENABLE,
CONSTRAINT "FK_MSHIP_ATTR_DEF_OWNER_ID" FOREIGN KEY ("OWNER_ATTR_DEF_ID")
REFERENCES "GROUPER"."GROUPER_ATTRIBUTE_DEF" ("ID") ENABLE


E.g.

alter TABLE "GROUPER"."GROUPER_MEMBERSHIPS" disable constraint
"FK_MEMBERSHIPS_CREATOR_ID";

Then enable constraints when you have finished all data loading

alter TABLE "GROUPER"."GROUPER_MEMBERSHIPS" enable constraint
"FK_MEMBERSHIPS_CREATOR_ID";

Enabling constraints takes bit if time as it checks related table columns and
enables it if the tables relationship is valid.

Disabling db level constraints means that your application logic or batch
loading logic makes sure the inserted data is correct for all related tables.
So no need to double check within the database as you have already checked
constraints logic in the application program.

Or

If you could adjust your load to go with a delay with the inserts, for
example

Need to have like pause BETWEEN each insert statement into
grouper_memberships table

It should go like
insert ....
1 sec pause
insert
1 sec pause
insert

*************************************

Questions

1. Has anyone come across these performance issues or does grouper 2.4
address these issues ?


Cheers

Reid




Archive powered by MHonArc 2.6.19.

Top of Page