Slow performance when listing members on Postorius
We are about to upgrade to Mailman core 3.3.9 and Postorius 1.3.10. We notice that for setup with large number of members, the performance is much slower when listing members on web (Postorius). Further troubleshooting show that there are quite a number of API calls which do not appear in Mailman core 3.3.5 and Postorius 1.3.6 when we list members.
[17/Apr/2024:14:12:22 +0800] "GET /3.1/members/33a6266d0a04472c8d5d6c78869a964c/preferences HTTP/1.1" 200 156 "-" "GNU Mailman REST client v3.3.5" [17/Apr/2024:14:12:22 +0800] "GET /3.1/members/7a18b7cb90a34ac98881a3f01b5488d1/preferences HTTP/1.1" 200 156 "-" "GNU Mailman REST client v3.3.5" [17/Apr/2024:14:12:22 +0800] "GET /3.1/members/61c6c3e2aaf443babd3bd191519b0424/preferences HTTP/1.1" 200 156 "-" "GNU Mailman REST client v3.3.5" [17/Apr/2024:14:12:22 +0800] "GET /3.1/members/8dd681165b8c436fac6793cae1ed2c27/preferences HTTP/1.1" 200 156 "-" "GNU Mailman REST client v3.3.5"
Further tests showing that each database query using "_member_id" in table member can take as much as 0.3 to 0.5 seconds for some large installations. The default 25 members per page mean that it will take at least 7.5 to 12.5 seconds. Changing to 200 members per page will take even longer time. We wonder whether "_member_id" should be indexed just like most other id in the database mailman_core in order to solve the issue. Or are there any other workarounds?
+----------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | _member_id | char(32) | YES | | NULL | | | role | int(11) | YES | MUL | NULL | | | list_id | varchar(255) | YES | MUL | NULL | | | moderation_action | int(11) | YES | | NULL | | | address_id | int(11) | YES | MUL | NULL | | | preferences_id | int(11) | YES | MUL | NULL | | | user_id | int(11) | YES | MUL | NULL | | | bounce_score | int(11) | YES | | NULL | | | last_bounce_received | datetime | YES | | NULL | | | last_warning_sent | datetime | YES | | NULL | | | total_warnings_sent | int(11) | YES | | NULL | | +----------------------+--------------+------+-----+---------+----------------+
We have further experimented by adding the field "_member_id" in the table member as one of the keys. Before adding, listing 25 members in a page takes around 16 seconds. After adding, it takes less than 1 second. There are more than 650000 records in the table member in our testing installation.
Is it safe to add "_member_id" as key as a workaround if we want to fix the issue in 1.3.10? Will we also consider to add it as key in future releases if there are no negative impacts?
participants (1)
-
Alan So