Opened 9 years ago
Closed 4 years ago
#36470 closed defect (bug) (worksforme)
Multisite - network sites list not very memory efficient
Reported by: | Bombdogs | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3 |
Component: | Administration | Keywords: | |
Focuses: | multisite, performance | Cc: |
Description
This recent change in 4.3 to add user counts to multisite network admin sites list can cause out of memory errors on installs with many thousands of users...
https://core.trac.wordpress.org/attachment/ticket/32434/32434.2.patch
On a vanilla WPMU install with 200,000 users (bulk generated by wp-cli) the wp-admin memory footprint for the network admin sites list page can be as low as 32Mb when running WP4.2 - simply upgrading to WP4.3 requires you to increase this to 128Mb (~4x) for this size user base. The memory requirement keeps increasing as the user base increases (unsustainable).
The problem in the code referenced in the patch above is that all users for a blog are selected out of the DB and then a count is done in PHP - this requires more memory than is ideal - selecting just the count will be quicker and more memory efficient.
This was discussed in a triage session today. It looks like the query has been improved and caching added since this report came in, so I am going to close this as worksforme. It's not the perfect keyword but I am unable to find the ticket in which this was fixed.
Sorry about the delay responding to this ticket.