Re: [Python-Dev] Documentation about Python's GC, python-dev list messages referenced in Modules/gcmodule.c not reachable anymore

2005-12-07 Thread Weber, Gregoire
Hi Neil,
Hi Tim,
Hi Simon,

your responsive and valuable answers cleared up most of the open
questions and gave a very positive impression to my project leader about
the python community and python itself. 

Thank you very much!

I'm trying to get more into the GC implementation before asking more
about some still open points.

Gregoire
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Documentation about Python's GC, python-dev list messages referenced in Modules/gcmodule.c not reachable anymore

2005-12-08 Thread Weber, Gregoire
Title: Documentation about Python's GC, python-dev list messages referenced in Modules/gcmodule.c not reachable anymore






Hi All,

Hi Neil,


While searching documentation about Pythons GC and it's behaviour I found references to the python-dev list in ``Modules/gcmodule.c``. 

But unfortunately the links to the list do not work anymore. May someone give me a hint how to find the messages (2. to 4. below).

Is the article (Link 1. below) up to date or were there major changes in  the GC strategies since year 2000?


http://svn.python.org/projects/python/trunk/Modules/gcmodule.c


  1. http://www.arctrix.com/nas/python/gc/
  2. http://www.python.org/pipermail/python-dev/2000-March/003869.html
  3. http://www.python.org/pipermail/python-dev/2000-March/004010.html
  4. http://www.python.org/pipermail/python-dev/2000-March/004022.html



Background Info:


We're seriously evaluating Python for use in embedded realtime systems and need some informations about Pythons garbage collector.

What we're interested mostly in the runtime behaviour of the GC. The main question is:


  Does it interrupt the python interpreter to collect stuff or 

  is collecting done more in the background (e.g. just incrementally 

  collecting)? This is an important question for realtime systems with

  well defined reaction times.


Just point me to documentation if available.


Gregoire



___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Real time behaviour of Pythons memory management; WAS: RE: Documentation about Python's GC,python-dev list messages referenced in Modules/gcmodule.c notreachable anymore

2006-01-04 Thread Weber, Gregoire
Garbage Collector findings

To understand pythons garbage collector better and to get
a picture about the runtime behaviour and performance 
I did some experiments:

The attached script allocates a lot of circularly self 
referencing lists. Then it instantiates a one item list.

I tuned the loop counter in such a way that the subsequent  
instantiation of the one item list triggers the garbage 
collector. The number of the circularly self referencing 
objects is around 9.


Results (Pentium4 3GHz, Python 2.4.1 on cygwin/Win2k)
-

 gc gen 1) | time msec 2) | unreachable 3)
---+--+
 None  | 0.000| All
 0 | 0.002| All
 1 | 0.007| All
 2 | 0.065| All
 None  | 0.000| None
 0 | 0.001| None
 1 | 0.003| None
 2 | 0.018| None

--> Collecting a self referencing list costs about 
0.7 usec (micro seconds)
--> Checking a non collectable self ref list costs 
about 0.2 usec (micro seconds)

Legend:

1) the generation the garbage collector has been triggered 
   to collect (None means that GC wasn't triggered)
2) time for instantiating a list with one entry in msec
3) All: All of the circularly self referencing lists were 
**unreachable** (thus got collected by the gc)
   None: None of the circularly self referencing lists were 
 **unreachable** (no garbage available to collect)


Questions
-

1. Am I correct that in a system which instantiates a lot*) 
   of containerish objects without destructing them again the 
   GC may be triggered to evaluate all generations which may 
   be very costy (see above)?

2. In a system where only generation 0 and 1 get evaluated
   (because not so much object got instantiated without beeing 
   destructed) the costs are relatively low. Correct?

*) a lot means here: 
   more than ``threshold0 * threshold1 * threshold2`` objects, 
   Python 2.4 default values are: 700*10*10 = 7


Gregoire




P.S.: Interestingely the counters found by experimenting 
  seem to depend on the platform (my platform: 
Python 2.4.1, cygwin under Win2k, the counters aren't 
valid for native Python 2.4.2 under Win2k).




gctest.py
Description: gctest.py
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com