Memory Usage of the AP Python
The memory used for the different policy sizes using a sample python application is described in this section.
Sample application
The following is a sample python application.
from appython import Protector
if __name__ == "__main__":
# Initialize the protector
protector = Protector()
# Create session with policy user
session = protector.create_session("USER1")
# Protect operation
p_out = session.protect("Protegrity1", "TE_AN_SLT13_L0R0_N")
print("Protected Data: %s" %p_out)
# Reprotect operation
r_out = session.reprotect(p_out, "TE_AN_SLT13_L0R0_N", "TE_AN_SLT13_L0R0_N")
print("Reprotected Data: %s" %r_out)
# Unprotect operation
org = session.unprotect(r_out, "TE_AN_SLT13_L0R0_N")
print("Unprotected Data: %s" %org)
Expected memory usage
The process to find the policy size and expected memory usage for different policy sizes used by the python application is described in this section.
To find the policy size:
- On Insights dashboard, under the Discover section, navigate to the troubleshooting index.
- Search using the
process.module.keyword: coreproviderfilter. - Navigate to the logs with description as Policy successfully loaded.
The
additional_info.memoryUsedfield depicts the policy size.

The following is the expected memory usage for different policy sizes used by the python application.
| Policy size | Process memory consumption |
|---|---|
| 13 MB | 42 MB |
| 38 MB | 89 MB |
| 536 MB | 979 MB |
The process memory increases substantially for a few milliseconds when the application is running in the following cases:
- The policy is replaced with another policy
- Changes are made in the current policy
Conclusion
The results for memory required by various policy sizes using the sample python application can be used to determine the memory requirements of the Python application. The results are based on memory usage of a single instance of python processes. The results exclude LogForwarder and RP Agent.
Feedback
Was this page helpful?