Bug 52253 - UMC login would perform better with xml.etree.cElementTree instread of xml.etree.ElementTree
UMC login would perform better with xml.etree.cElementTree instread of xml.et...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-6-errata
Assigned To: Florian Best
Dirk Wiesenthal
:
Depends on:
Blocks: 52270
  Show dependency treegraph
 
Reported: 2020-10-26 19:48 CET by Arvid Requate
Modified: 2020-11-04 14:49 CET (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): UCS Performance
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2020-10-26 19:48:18 CET
UMC/SAML-Login performance tests with 82_saml/90_concurrent_saml_login_multiprocessing  showed that UMC login would perform better with xml.etree.cElementTree instread of xml.etree.ElementTree. With the C implementation UMC Login performed 29% better.

* 90_concurrent_saml_login_multiprocessing against normal UMC:
## 32 cores
Mean time per portal login 0.203379382133 
Number of logins per second: 4.9169192546

* 90_concurrent_saml_login_multiprocessing against patched UMC:
UMC mit xml.etree.cElementTree statt xml.etree.ElementTree
## 32 cores
Mean time per portal login 0.157018792152 
Number of logins per second: 6.36866445278


The test case was 10 times 50 parallel (multiprocessing) logins.
Comment 1 Arvid Requate univentionstaff 2020-10-26 20:18:39 CET
lxml.etree might be even better but has a different API.
Comment 2 Florian Best univentionstaff 2020-10-27 14:40:30 CET
The implementation now uses cElementTree.
FYI: Python 3 already uses the C implementation by default. Strongly the merge request for UCS 5.0 is not necessary.
The error handling catches "xml.parsers.expat.ExpatError", which is probably okay. It was added in Bug #22460 / git:3fe4bd9c965fdeca586a15ee66c903c7da162dd1 (initial UMC commit in UCS 3). I could only cause ET.ParseError errors.

univention-management-console.yaml
a8b3ec6be8e4 | YAML Bug #52253

univention-management-console (11.0.5-5)
0a36eb06bece | Bug #52253: prefer cElementTree over ElementTree for performance reasons

UCS 5: merge request: https://git.knut.univention.de/univention/ucs/-/merge_requests/21
Comment 3 Dirk Wiesenthal univentionstaff 2020-11-02 10:54:13 CET
Code: OK
Performance increase: OK
YAML: OK