Make WordPress Core

Opened 8 years ago

Closed 3 years ago

#36470 closed defect (bug) (worksforme)

Multisite - network sites list not very memory efficient

Reported by: bombdogs's profile Bombdogs Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Administration Keywords:
Focuses: multisite, performance Cc:


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...

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.

Change History (2)

This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.

3 years ago

#2 @peterwilsoncc
3 years ago

  • Focuses multisite performance added
  • Resolution set to worksforme
  • Status changed from new to closed

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.

Note: See TracTickets for help on using tickets.