1 Thread = 3 interpreter launched ???

nono240 at gmail.com nono240 at gmail.com
Sat Apr 7 16:54:50 CEST 2007


Hi all, and thanks for reading !

I'm using Python 2.4.2 with an embedded platform (16MB RAM) running
Linux 2.6.20.
My main script use a thread for some reasons (more precisely a
periodic timer within a separate module).
While looking at the memory consumption, here's what i found :

  PID USER     STATUS   RSS  PPID %CPU %MEM COMMAND
  171 root     R        384   164  1.5  2.6 top
  218 root     R       4172   217  0.1 29.1 main_script.py
  216 root     S       4172   180  0.0 29.1 main_script.py
  217 root     S       4172   216  0.0 29.1 main_script.py

When creating the thread, Python forks 2 times and thus consume me
around 60% of RAM !

Is it a normal behaviour while using threads ???

It's very critical, am i missed something ?

Thank U...




More information about the Python-list mailing list