Uploaded image for project: 'Migration Toolkit for Applications'
  1. Migration Toolkit for Applications
  2. MTA-3286

[Scale] Slow loading Application Inventory when 1000 Applications are loaded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • MTA 7.2.0
    • MTA 7.1.0
    • Hub, Scale&Perf-QE, UI
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Important
    • None

      Description of problem:

      This bug is a placeholder for poor performance of loading Application Inventory /applications page from the UI when 1000 applications are loaded.

       

      We were requested to test managed imports with 5k, 10k, and 20k applications loaded.

      Whats seen is that loading Application Inventory page /applications  when 1000 applications have been imported using managed import is slow to render with page load times greater than 30s - 40s depending on whether firefox or chrome is used. During the time that the application inventory is loading what is shown is 'No Applications available'  default message which isn't correct.  The page is then updated after some time.

      Another issue which likely impacts the load time of Application Inventory is that currently the UI doesn't use pagination and this is leading to many requests from the UI returning broken 400 error code due to mta-hub API limit.

      Over 8 mins of idling on Application Inventory /applications page 250+ requests are continually being sent because when loading more than 500 applications the API will correctly return a limit error message that more than 500 results were requested.

       

      Found=2000, ?Limit <= 500 required. 

      Checking the logs on mta hub we see:

       

       

      2024/07/11 10:10:36 /remote-source/mta-hub/app/api/task.go:257[0.188ms] [rows:0] SELECT `State`,COUNT(*) Count FROM `task` WHERE `State` IN ("Ready","Postponed","Pending","Running") GROUP BY `State`[GIN] 2024/07/11 - 10:10:36 | 200 |      322.12µs |       10.1.52.1 | GET      "/tasks/report/queue"
      2024/07/11 10:10:36 /remote-source/mta-hub/app/api/base.go:451[0.062ms] [rows:-] SELECT `Task`.`ID`,`Task`.`CreateTime`,`Task`.`CreateUser`,`Task`.`UpdateUser`,`Task`.`BucketID`,`Task`.`Name`,`Task`.`Kind`,`Task`.`Addon`,`Task`.`Extensions`,`Task`.`State`,`Task`.`Locator`,`Task`.`Priority`,`Task`.`Policy`,`Task`.`TTL`,`Task`.`Data`,`Task`.`Started`,`Task`.`Terminated`,`Task`.`Errors`,`Task`.`Events`,`Task`.`Pod`,`Task`.`Retries`,`Task`.`Attached`,`Task`.`ApplicationID`,`Task`.`TaskGroupID`,`Application`.`ID` AS `Application__ID`,`Application`.`CreateTime` AS `Application__CreateTime`,`Application`.`CreateUser` AS `Application__CreateUser`,`Application`.`UpdateUser` AS `Application__UpdateUser`,`Application`.`BucketID` AS `Application__BucketID`,`Application`.`Name` AS `Application__Name`,`Application`.`Description` AS `Application__Description`,`Application`.`Repository` AS `Application__Repository`,`Application`.`Binary` AS `Application__Binary`,`Application`.`Comments` AS `Application__Comments`,`Application`.`BusinessServiceID` AS `Application__BusinessServiceID`,`Application`.`OwnerID` AS `Application__OwnerID`,`Application`.`MigrationWaveID` AS `Application__MigrationWaveID` FROM `Task` LEFT JOIN `Application` `Application` ON `Task`.`ApplicationID` = `Application`.`ID` [GIN] 2024/07/11 - 10:10:36 | 400 |   62.353454ms |       10.1.52.1 | GET      "/tasks"Error #01: Found=2000, ?Limit <= 500 required.
      2024/07/11 10:10:42 /remote-source/mta-hub/app/api/task.go:257[0.090ms] [rows:0] SELECT `State`,COUNT(*) Count FROM `task` WHERE `State` IN ("Ready","Postponed","Pending","Running") GROUP BY `State`[GIN] 2024/07/11 - 10:10:42 | 200 |     172.726µs |       10.1.52.1 | GET      "/tasks/report/queue"
      2024/07/11 10:10:42 /remote-source/mta-hub/app/api/base.go:451[0.084ms] [rows:-] SELECT `Task`.`ID`,`Task`.`CreateTime`,`Task`.`CreateUser`,`Task`.`UpdateUser`,`Task`.`BucketID`,`Task`.`Name`,`Task`.`Kind`,`Task`.`Addon`,`Task`.`Extensions`,`Task`.`State`,`Task`.`Locator`,`Task`.`Priority`,`Task`.`Policy`,`Task`.`TTL`,`Task`.`Data`,`Task`.`Started`,`Task`.`Terminated`,`Task`.`Errors`,`Task`.`Events`,`Task`.`Pod`,`Task`.`Retries`,`Task`.`Attached`,`Task`.`ApplicationID`,`Task`.`TaskGroupID`,`Application`.`ID` AS `Application__ID`,`Application`.`CreateTime` AS `Application__CreateTime`,`Application`.`CreateUser` AS `Application__CreateUser`,`Application`.`UpdateUser` AS `Application__UpdateUser`,`Application`.`BucketID` AS `Application__BucketID`,`Application`.`Name` AS `Application__Name`,`Application`.`Description` AS `Application__Description`,`Application`.`Repository` AS `Application__Repository`,`Application`.`Binary` AS `Application__Binary`,`Application`.`Comments` AS `Application__Comments`,`Application`.`BusinessServiceID` AS `Application__BusinessServiceID`,`Application`.`OwnerID` AS `Application__OwnerID`,`Application`.`MigrationWaveID` AS `Application__MigrationWaveID` FROM `Task` LEFT JOIN `Application` `Application` ON `Task`.`ApplicationID` = `Application`.`ID` [GIN] 2024/07/11 - 10:10:42 | 400 |   65.044144ms |       10.1.52.1 | GET      "/tasks"Error #01: Found=2000, ?Limit <= 500 required.
      2024/07/11 10:10:43 /remote-source/mta-hub/app/api/base.go:451[0.066ms] [rows:-] SELECT `Task`.`ID`,`Task`.`CreateTime`,`Task`.`CreateUser`,`Task`.`UpdateUser`,`Task`.`BucketID`,`Task`.`Name`,`Task`.`Kind`,`Task`.`Addon`,`Task`.`Extensions`,`Task`.`State`,`Task`.`Locator`,`Task`.`Priority`,`Task`.`Policy`,`Task`.`TTL`,`Task`.`Data`,`Task`.`Started`,`Task`.`Terminated`,`Task`.`Errors`,`Task`.`Events`,`Task`.`Pod`,`Task`.`Retries`,`Task`.`Attached`,`Task`.`ApplicationID`,`Task`.`TaskGroupID`,`Application`.`ID` AS `Application__ID`,`Application`.`CreateTime` AS `Application__CreateTime`,`Application`.`CreateUser` AS `Application__CreateUser`,`Application`.`UpdateUser` AS `Application__UpdateUser`,`Application`.`BucketID` AS `Application__BucketID`,`Application`.`Name` AS `Application__Name`,`Application`.`Description` AS `Application__Description`,`Application`.`Repository` AS `Application__Repository`,`Application`.`Binary` AS `Application__Binary`,`Application`.`Comments` AS `Application__Comments`,`Application`.`BusinessServiceID` AS `Application__BusinessServiceID`,`Application`.`OwnerID` AS `Application__OwnerID`,`Application`.`MigrationWaveID` AS `Application__MigrationWaveID` FROM `Task` LEFT JOIN `Application` `Application` ON `Task`.`ApplicationID` = `Application`.`ID` [GIN] 2024/07/11 - 10:10:43 | 400 |   63.060187ms |       10.1.52.1 | GET      "/tasks"Error #01: Found=2000, ?Limit <= 500 required. 

      With many requests returning erroneously it seems unfair to call the Application Inventory as 'slow to load/render' when essentially it seems the API is requiring pagination to be used and the UI is not using it as expected.

      If dev prefers to have separate bugs for this I'm happy to split this.

      Just reporting whats currently observed.

      Severity set as 'Important' as desired scale is 5k, 10k, and 20k - and this is occurring with 1k

       

       

      Version-Release number of selected component (if applicable):

      7.1.0-19 /  iib:753465

      How reproducible:

      Consistently

      Steps to Reproduce:
      1. Use Managed imports to load 1,000 applications from csv (attached in this bug)
      2. Wait for imports to complete successfully.
      3. Browse to /applications (Application Inventory page), and reload that page

      Actual results:

      Many api calls returning 400 error code and slow loading Application Inventory.

      During loading of page 'No Applications available' message is shown, until the requests have completed.

       

      Expected results:

      Assuming many applications are present: Inital load times for empty-cache visits or 1st time visits should complete less than 3-4s.  Returning visits or prime cache visits should render with in 1.5-2s,  this assumes no latency is included due to distance from server and time taken is for the server response (which is not the case in the attached har files)

      Additional info:

      Attached to the 1k-app-present-ui-issues.tar.gz contains the following:

      1k-apps-import.csv for importing to dev env to reproduce issue.

      mta-logs folder contains pod logs, and resource request/limit along with tackle cr

      har_files folder contain 1 har for slow loading, and 1 har for failing requests

       

            sdickers@redhat.com Scott Dickerson
            mlehrer@redhat.com Mordechai Lehrer
            Tzahi Ashkenazi Tzahi Ashkenazi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: