[issue9942] Allow memory sections to be OS MERGEABLE

2011-05-22 Thread s7v7nislands
Changes by s7v7nislands s7v7nisla...@gmail.com: -- nosy: +s7v7nislands ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9942 ___ ___ Python-bugs-list

[issue9942] Allow memory sections to be OS MERGEABLE

2011-05-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: In order to arrive at some resolution of this issue, I'm answering the original question (Should Python enable a way for folks to inform the OS of MADV_MERGEABLE memory?). The discussion has shown that the answer is no; there are no pages

[issue9942] Allow memory sections to be OS MERGEABLE

2010-10-27 Thread Konstantin Svist
Konstantin Svist fry@gmail.com added the comment: This issue sounds very interesting to me for a somewhat different reason. My problem is that I'm trying to run multiple processes on separate CPUs/cores with os.fork(). In short, the data set is the same (~2GB) and the separate processes do

[issue9942] Allow memory sections to be OS MERGEABLE

2010-10-27 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com added the comment: One possible use for this: mark the str buffers of PyUnicodeObject instances when demarshalling docstrings from disk; in theory these ought not to change, and can be quite large: the bulk of the memory overhead is stored in a separate

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: My first thought is Why is the reference counter stored with the object itself? Because if you move the reference counter out of the object, you a) add another indirection and b) depending on how you implement it require a certain amount of

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Answering the question as best I can: I don't know how the reference counter is implemented in CPython, but if it's just a field in a struct, then madvise could be sent the memory location starting with the byte immediately following the

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Kevin Hunter
Kevin Hunter hunt...@earlham.edu added the comment: Well, first, this would only work for large objects. [...] Why do you think you might have such duplication in your workload? Some of the projects with which I work involve multiple manipulations of large datasets. Often, we use Python

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, first, this would only work for large objects. [...] Why do you think you might have such duplication in your workload? Some of the projects with which I work involve multiple manipulations of large datasets. Often, we use Python

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Kevin Hunter
Kevin Hunter hunt...@earlham.edu added the comment: Why do you read it into a cStringIO? A cStringIO has the same interface as a file, so you could simply operate on the file directly. In that particular case, because it isn't actually a file. That workflow was my attempt at simplification

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-24 Thread Kevin Hunter
New submission from Kevin Hunter hunt...@earlham.edu: Should Python enable a way for folks to inform the OS of MADV_MERGEABLE memory? I can't speak for other OSs, but Linux added the ability for processes to inform the kernel that they have memory that will likely not change for a while in

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: With CPython, even objects that don't change see their reference counter modified quite frequently, just by looking at them. What kind of memory would you mark this way? -- nosy: +amaury.forgeotdarc

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-24 Thread Kevin Hunter
Kevin Hunter hunt...@earlham.edu added the comment: My first thought is Why is the reference counter stored with the object itself? I imagine there are very good reasons, however, and this is not an area in which I have much mastery. Answering the question as best I can: I don't know how the