This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sable
Recipients BreamoreBoy, flub, loewis, neologix, pitrou, sable, tim.peters
Date 2011-04-26.14:52:15
SpamBayes Score 1.0131562e-11
Marked as misclassified No
Message-id <1303829539.1.0.983983549419.issue3526@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Charles-François,

it is possible to impact the memory allocation system on AIX using some environment variables (MALLOCOPTIONS and others), but it is not very elegant (it will impact all applications running with this environment and it is difficult to ensure that those environment variables will be correctly set when distributing an application to a customer) and I am afraid most users will never hear about that and will just use the default behavior.

Concerning mmap performances, dlmalloc has a pool mechanism and Python has its own pool mechanism on top of that.
As a result, system calls to allocate memory do not happen frequently since the memory allocation is usually handled internally in those pools and dlmalloc is often faster than the native malloc.

I have been distributing a version of Python which integrates this patch with the application on which I work to various customers for the last few years and the benchmarks have not shown any significant performance degradation. On the other hand, the decrease in memory consumption has been clearly noticed and appreciated.

Also note that dlmalloc (or a derivative - ptmalloc) is part of GNU glibc which is used by most Linux systems, and is what you get when you call malloc.
http://en.wikipedia.org/wiki/Malloc#dlmalloc_and_its_derivatives

So by using dlmalloc on SunOS and AIX you would get the same level of performance for memory operations that you already probably can appreciate on Linux systems.
History
Date User Action Args
2011-04-26 14:52:19sablesetrecipients: + sable, tim.peters, loewis, pitrou, flub, neologix, BreamoreBoy
2011-04-26 14:52:19sablesetmessageid: <1303829539.1.0.983983549419.issue3526@psf.upfronthosting.co.za>
2011-04-26 14:52:16sablelinkissue3526 messages
2011-04-26 14:52:15sablecreate