Bug 569093
Summary: | Python 2.4's arena allocator does not release memory back to the system, leading to "high-water mark" memory usage | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Dave Malcolm <dmalcolm> | ||||
Component: | python | Assignee: | Dave Malcolm <dmalcolm> | ||||
Status: | CLOSED ERRATA | QA Contact: | Petr Šplíchal <psplicha> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 5.6 | CC: | apevec, bpeck, cpelland, dgregor, katzj, mhicks, mvadkert, mzazrivec, ohudlick, psplicha, rbinkhor, rousseau | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | python-2.4.3-40.el5 | Doc Type: | Bug Fix | ||||
Doc Text: |
Prior to version 2.5, Python's optimized memory allocator never released memory back to the system. The memory usage of a long-running Python process would resemble a "high-water mark". This update backports a fix from Python 2.5a1, which frees unused arenas, and adds a non-standard sys._debugmallocstats() function, which prints diagnostic information to stderr. Finally, when running under Valgrind, the optimized allocator is deactivated, to allow more convenient debugging of Python memory usage issues.
|
Story Points: | --- | ||||
Clone Of: | |||||||
: | 1372736 (view as bug list) | Environment: | |||||
Last Closed: | 2011-01-13 23:09:52 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 523966, 640580, 661867 | ||||||
Attachments: |
|
Description
Dave Malcolm
2010-02-28 01:57:45 UTC
Created attachment 396822 [details] Simple reproducer for this, as described by Tim Peters on upstream mailing list This is the simple reproducer for this issue given by Tim Peters in this python-dev mailing list post: http://mail.python.org/pipermail/python-dev/2006-March/061991.html This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. Typical symptom here: httpd running mod_python, serving up a dynamic website driven by a RDBMS. Queries to the db come back in the form of large numbers of tuples/dicts of objects representing the data. If a "large" query goes through, that can lead to a very large number of Python objects in-memory at once, driving up temporary memory usage. This is unsurprising, but the issue is that the memory is not released back to the system as a whole after the page is completed, leading to the httpd process being permanently much larger than it could be. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Prior to version 2.5, Python's optimized memory allocator never released memory back to the system. The memory usage of a long-running Python process would resemble a "high-water mark". This update backports a fix from Python 2.5a1, which frees unused arenas, and adds a non-standard sys._debugmallocstats() function, which prints diagnostic information to stderr. Finally, when running under Valgrind, the optimized allocator is deactivated, to allow more convenient debugging of Python memory usage issues. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0027.html |