grouper-users - Re: [grouper-users] Cloned Grouper environment runs slower
Subject: Grouper Users - Open Discussion List
List archive
- From: Julio Polo <>
- To: "Hyzer, Chris" <>
- Cc: "" <>
- Subject: Re: [grouper-users] Cloned Grouper environment runs slower
- Date: Fri, 8 Sep 2017 11:30:40 -1000
- Ironport-phdr: 9a23:8UgyPhdbXicTtsbI7kbfhRpflGMj4u6mDksu8pMizoh2WeGdxcuzYB7h7PlgxGXEQZ/co6odzbGH4+a4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9GiTe5Yr5+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM28m/XhMx+gqxYvRyvuQBwzpXOYI2JLvdzZL/Rcc8YSGdHQ81fVzZBAoS5b4YXC+QBIOJYr4j6p1ATtxW+Ag2sBOTywTJPhH/2wKk60+UmEQzd3AwvBdwPv27VrNX0LqsdT/26zLTRwDjFcvhY1zD96I3SfRAgp/GBRbNwcczNyUYxDQPFiEufqZD7Mz+PyOsCrnWb4ux9Xuysk24qsx99rzmzysouj4TJiIEYxUvY+Sh8z4s5OcG0RFN+bNG4DJddtiSXOo5oTs4sXW1lvjsxxKcctp6hZicKzYwqxx7BZPyDdIiF+hfjW/yQITd8nX5lebW/iwqr/Umv1OHxWNe43ExFripCldnMuXQN2ALJ5sebTft9+1+t2TeJ1w/N9uFJOV44mKvHJ5Mjx7MwmJkevl/fEiLzl0j6kLOaelgh9+e09+jqY7Drq5qCO4J6lA3yKqEulda+AeQ8PAgORW+b+eGk2b3h4E35RLRKjvotn6nZqp/bK94Upq+4AwNPzIks9gu/Ay+80NsEhXkHME5FeBWfgojmIVHOJ+34De+hjFS2iTtr2uvGMaP7ApXWNXXDlLbhfa1h605H1gY/19Ff55RICr4fOvLzXFH+tMDGAhMjLQO73vvnW51B0dZUeXOdD7XdeIjSq16TrKp7JuKMdZ0Yoh78MPNj+ubji3l/lFMAK/qHx5wSPVKlGvVha32eZX2k1tUcFWYNlgo3U+XriRuPXSMFNCX6ZL41+jxuUNHuNozEXI342LE=
So the analyze fixed it or is there still a problem?
From: Julio Polo <>
Sent: Friday, September 8, 2017 4:25:46 PM
To: Hyzer, Chris
Cc:
Subject: Re: [grouper-users] Cloned Grouper environment runs slower1st SQL:Here are the answers provided by our DBA:Ran analyze on all the tables in test, then ran those two queries with these results:
Test has 16G of memory compared to 32G for prod.
Same charset for databases.
Indexes the same for both databases.
prod - 0.015 sec. 2531 rows
test - 0.422 sec. 2183 rows
2nd SQL:
prod - 972 sec. 29 rows
test - 921 sec. 38 rows
Explain results:
prod:
test:
Thanks!
-julio
On Wed, Sep 6, 2017 at 2:32 PM, Hyzer, Chris <> wrote:
Do both databases have the same amount of memory?
Are they both innodb and the same charset (utf8) and collation (utf8_bin)?
Are all the indexes on the test db?
Have you analyzed all the tables in the test db?
When you run an explain plan on prod and test for that query what are the results?
Thanks
Chris
From: [mailto:] On Behalf Of Julio Polo
Sent: Wednesday, September 06, 2017 7:08 PM
To:
Subject: [grouper-users] Cloned Grouper environment runs slower
We recently cloned our production Grouper 2.2.2 environment into a test environment, and we've noticed that the test environment is significantly slower compared to production, especially the first time a query is made. Both environments use MySQL, and we expected the test Grouper and test database to perform better (idle, dedicated database)
We made two calls to getMembersLite:
1) POST /groups/path:to:group:one/memb
ers [ with memberFilter => all ]
Test took 13674 ms while production took 1782 ms. Subsequent queries for the same group are much faster and return in about the same amount of time for both environments.
2) POST /groups/path:to:group:two/memb
ers [ with memberFilter => all ]
Test took 18044 ms while production took 2348 ms. Subsequent queries for the same group are much faster and return in about the same amount of time for both environments.
The following SQL is for the second query. It doesn't use temp tables (more on this later). It took 18 seconds on test but under a second in production:
-- State: Sending data
select member0_.id as id21_,
member0_.hibernate_version_num
ber as hibernate2_21_, member0_.subject_id as subject3_21_,
member0_.subject_source as subject4_21_,
member0_.subject_type as subject5_21_,
member0_.context_id as context6_21_,
member0_.sort_string0 as sort7_21_,
member0_.sort_string1 as sort8_21_,
member0_.sort_string2 as sort9_21_,
member0_.sort_string3 as sort10_21_,
member0_.sort_string4 as sort11_21_,
member0_.search_string0 as search12_21_,
member0_.search_string1 as search13_21_,
member0_.search_string2 as search14_21_,
member0_.search_string3 as search15_21_,
member0_.search_string4 as search16_21_,
member0_.name as name21_,
member0_.description as descrip18_21_
from grouper_members member0_
cross join grouper_memberships_all_v membership1_
where membership1_.owner_group_id='d
cacd183a3f04ec99ce1f8dd4e81cd1 2' and membership1_.field_id='97f744e
efee9415b9ab94ace9774abf1' and membership1_.member_id=member0
_.id and membership1_.immediate_mship_e
nabled='T';
It seems that the very first query triggered a lot of copying to temp tables in the test environment. The following SQL took a little over 200 seconds total on the test database with temp tables set to 384M.
-- State: Copying to tmp table
select distinct group0_.id as id20_,
group0_.hibernate_version_numb
er as hibernate2_20_, group0_.last_membership_change as last3_20_,
group0_.last_imm_membership_ch
ange as last4_20_, group0_.parent_stem as parent5_20_,
group0_.creator_id as creator6_20_,
group0_.create_time as create7_20_,
group0_.modifier_id as modifier8_20_,
group0_.modify_time as modify9_20_,
group0_.name as name20_,
group0_.display_name as display11_20_,
group0_.extension as extension20_,
group0_.display_extension as display13_20_,
group0_.description as descrip14_20_,
group0_.context_id as context15_20_,
group0_.alternate_name as alternate16_20_,
group0_.type_of_group as type17_20_,
group0_.id_index as id18_20_
from grouper_groups group0_
cross join grouper_memberships_all_v membership1_
cross join grouper_memberships_all_v membership2_
where membership2_.owner_group_id=gr
oup0_.id and (membership2_.field_id in ('b34f320a98014ef2a39016df8312
a16c' , 'ca3b97aa5186446aa8770a18364d3 88c')) and (membership2_.member_id in ('520c350d37db4d0a9b728e56822f
fab8' , '39e8f222fa1d434f87d40cc4f0633 717')) and membership2_.immediate_mship_e
nabled='T' and membership1_.immediate_mship_e
nabled='T' and membership1_.owner_group_id=gr
oup0_.id and membership1_.field_id='97f744e
efee9415b9ab94ace9774abf1' and membership1_.member_id='b75b7c
918a6847bbbb0e8c30fe56e776' order by group0_.display_name asc;
I don't think we saw the long copying to temp tables when the first query was run against production. We did try to run the above SQL in production, and it took over 500 seconds before killing it . Production has 128M temp tables. Tried changing temp table size on test to 32M, but killed it when it went over 200 seconds.
We expected the test environment to perform better since it is mostly idle and it has a dedicated database (production uses a database server used by many other applications). Given that test grouper was cloned from production, we would expect performance to be better in test. This is how we cloned it:
Any ideas on what might be causing the slowness?
-julio
- [grouper-users] Cloned Grouper environment runs slower, Julio Polo, 09/06/2017
- RE: [grouper-users] Cloned Grouper environment runs slower, Hyzer, Chris, 09/07/2017
- Re: [grouper-users] Cloned Grouper environment runs slower, Julio Polo, 09/08/2017
- Re: [grouper-users] Cloned Grouper environment runs slower, Hyzer, Chris, 09/08/2017
- Re: [grouper-users] Cloned Grouper environment runs slower, Julio Polo, 09/08/2017
- Re: [grouper-users] Cloned Grouper environment runs slower, Shilen Patel, 09/08/2017
- Re: [grouper-users] Cloned Grouper environment runs slower, Julio Polo, 09/08/2017
- Re: [grouper-users] Cloned Grouper environment runs slower, Hyzer, Chris, 09/08/2017
- Re: [grouper-users] Cloned Grouper environment runs slower, Julio Polo, 09/08/2017
- RE: [grouper-users] Cloned Grouper environment runs slower, Hyzer, Chris, 09/07/2017
Archive powered by MHonArc 2.6.19.