Bug 53849 - Run UDM REST API in PyPy
Run UDM REST API in PyPy
Status: NEW
Product: UCS
Classification: Unclassified
Component: UDM - REST API
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on: 50050
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-29 08:59 CEST by Daniel Tröder
Modified: 2021-09-30 14:55 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2021-09-29 08:59:45 CEST
+++ This bug was initially created as a clone of Bug #50050 +++

The UDM HTTP API service uses only 1 process. Under medium load UDM is CPU-bound, and thus the UDM HTTP API cannot deliver speedups available in multi-cpu/core systems.

--------------------------------------------

As UDM, and thus the UDM REST API, is CPU bound, executing it in PyPy (https://www.pypy.org/) can make it run up to 4 times faster with relatively small modifications.
Of cause that means not only adapting the UDM REST API to execute in PyPy, but also all UDM modules and hooks.

It could be worth it, to at least create a PoC to see possible speed improvements.
Comment 1 Florian Best univentionstaff 2021-09-29 09:04:35 CEST
We would need to execute tests for all UDM modules, hooks, syntaxes with pypy.
Sometimes pypy has some obscure differences to cpython.
Comment 2 Daniel Tröder univentionstaff 2021-09-30 14:55:06 CEST
Yes, such a test suite would be required.
It would be worth creating it for environments with high performance requirements.