Issue Summary
This is reproducible on Data Center: ![]()
When an Administrator views Jira's User Management administration page ($JIRA_URL/secure/admin/user/UserBrowser.jspa), the application can initially load the page very slowly, and JVM heap memory utilization rises significantly.
Subsequently, attempting to filter for specific users by entering values in the Filter users search box and clicking Filter results in a much quicker load and less heap memory usage.
Clearing the search box and attempting to filter on an empty search will again load slowly, with significant heap utilization.
The observation appears to be that performing a Filter with an empty search box results in a broad and expensive search across many users, groups (i.e. nested groups), and directories, just to load a small number of users (by default, 20) who may not be in the population of users the Administrator intends to search for.
The problem is that this is the first search that occurs by default just by visiting the User Administration UI. In very large instances, this results in a slow initial page load and high resource (CPU, Heap memory) usage. Users may not be aware that the page is loading, or the browser may timeout, resulting in multiple attempts to view the page, which exacerbates the resource consumption on the server backend.
This can result in performance degradation, HTTP thread exhaustion, high CPU, and heap exhaustion (OutOfMemoryErrors)
Some possible ways we could address this issue:
- Separate loading the User Administration page and searching the users as separate asynchronous threads in order to improve initial page responsiveness and prevent people from believing the page is stuck
- Limit the scope of an empty filter search in order to prevent unnecessary user/group/directory searching
- Prevent (or create a toggle/setting) empty user searches so that an initial search never happens when visiting the page
Steps to Reproduce
- Create an instance with large number of users 1M+. In our test it was 6M+.
- Visit User Management administration ($JIRA_URL/secure/admin/user/UserBrowser.jspa)
Expected Results
The page will load quickly.
Actual Results
The page may hang for a very long time.
CPU and Heap usage may increase, resulting in OOMEs.
Workaround
As an Administrator, refrain from clicking the User Management administration button multiple times, as the request is processing on the server backend even if the page appears unresponsive/times out.