mailman findmember runs very slow
Hi, I am noticing a performance issue with Mailman 3 when using the "mailman findmember" CLI command to search for email address or name. On average, it takes about 15 - 20 seconds to run a query which is very slow IMHO. When searching through web administrator interface for Users, it takes only 1 -2 seconds. Is there a reason for such a discrepancy between the two interfaces? Is there any tuning to the CLI that could help with the performance issue? Here is the setup information regarding the VM hosting the Mailman 3 server:
Memory: 16G CPU Cores: 6 Mailman CORE version: 3.3.9 Python version: 3.11.5 Database: MariaDB 10.6.15 OS: SLES 15 SP5
Thanks.
wesley
Wesley Wong Senior Systems Engineer (ACIS) (310) 206-2571 wesley.wong@anderson.ucla.edu<mailto:wesley.wong@anderson.ucla.edu>
UCLA Anderson School of Management | Transformative Leaders
On 7/12/24 3:34 PM, Wong, Wesley wrote:
Hi, I am noticing a performance issue with Mailman 3 when using the "mailman findmember" CLI command to search for email address or name. On average, it takes about 15 - 20 seconds to run a query which is very slow IMHO. When searching through web administrator interface for Users, it takes only 1 -2 seconds. Is there a reason for such a discrepancy between the two interfaces? Is there any tuning to the CLI that could help with the performance issue? Here is the setup information regarding the VM hosting the Mailman 3 server:
This is actually https://gitlab.com/mailman/mailman/-/issues/1095
The basic loop is at https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/commands/cli_fi... and the time consuming part is https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/commands/cli_fi...
On mail.python.org which has about 75,000 users
for user in getUtility(IUserManager).users:
continue
takes a few seconds, but
for user in getUtility(IUserManager).users:
emails = [address.email for address in user.addresses]
continue
takes almost 3 minutes which is about the time that findmembers
takes
in total. I've tried changing this to
for user in getUtility(IUserManager).users:
if len(user.addresses) == 1:
emails = [user.addresses[0].emails]
else:
emails = [address.email for address in user.addresses]
continue
but it doesn't help. Just referencing user.addresses in the loop as in
for user in getUtility(IUserManager).users:
x = user.addresses
continue
takes 3 minutes.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Wong, Wesley wrote:
Hi, I am noticing a performance issue with Mailman 3 when using the "mailman findmember" CLI command to search for email address or name.
A fix has now been committed for the next release. See https://gitlab.com/mailman/mailman/-/merge_requests/1239
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks for the fix, Mark. I tested the fix and query times are now under 2 s.
wesley
From: Mark Sapiro <mark@msapiro.net> Sent: Saturday, July 13, 2024 4:36 PM To: mailman-users@mailman3.org <mailman-users@mailman3.org> Subject: [MM3-users] Re: mailman findmember runs very slow
Wong, Wesley wrote:
Hi, I am noticing a performance issue with Mailman 3 when using the "mailman findmember" CLI command to search for email address or name.
A fix has now been committed for the next release. See https://gitlab.com/mailman/mailman/-/merge_requests/1239<https://gitlab.com/mailman/mailman/-/merge_requests/1239>
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/<https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org> Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/QA5LF6GWCUCKEQIWVNIJ5FHWAYSBSOPY/<https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/QA5LF6GWCUCKEQIWVNIJ5FHWAYSBSOPY>
This message sent to wesley.wong@anderson.ucla.edu
participants (2)
-
Mark Sapiro
-
Wong, Wesley